A
A
Alex2019-05-06 16:51:43
DLE
Alex, 2019-05-06 16:51:43

How to enable HTML comments in FroalaEditor (WYSIWYG) in DLE?

Good afternoon!
Question on setting up the parser /engine/classes/parse.class.php SMS DLE
I'm trying to get the parser to pass HTML comments into the FroalaEditor (WYSIWYG), but for some reason it does not respond to the HTML.AllowedComments and HTML.AllowedCommentsRegexp directives.
I tried to add to the parse.class.php file after the line:

$parse_config->set('HTML.Allowed', implode(",",$tagsArray) );

settings (in order):
$parse_config->set('HTML.AllowedComments', array('<!-- noindex -->' => true, '<!--/ noindex -->' => true) );
$parse_config->set('HTML.AllowedComments', array('noindex' => true, 'noindex' => true) );
$parse_config->set('HTML.AllowedCommentsRegexp', '%<!--\/*\s*noindex\s*-->%');
$parse_config->set('HTML.AllowedCommentsRegexp', '%noindex%');

but the parser does not respond to a single line and removes HTML comments from the news.
Tried adding to the block:
if ($def = $parse_config->maybeGetRawHTMLDefinition()) {

settings:
$def->addElement('!-- noindex --', 'Block', 'Flow', 'Common');
$def->addElement('!-- /noindex --', 'Block', 'Flow', 'Common');

but that also did nothing.
How can I allow comments in the news? Moreover, we are not talking about the noindex tag - it is just an example.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question