3

I am trying to add category link in the CMS block.

<ul class="list-unstyled">
<li><a href="{{store url=''}}test-collection.html">Test Collection</a></li>
</ul>

When I hide/show editor, it removes "test-collection.html" from the code. New output:

<ul class="list-unstyled">
<li><a href="{{store url=''}}">Test Collection</a></li>
</ul>

In previous versions, it was working fine. Help, please.

0

One of the possible solution for this

Go this file: lib/web/mage/adminhtml/wysiwyg/tiny_mce/html5-schema.js

Replace this:

['a', 'href target rel media hreflang type charset name rev shape coords download', phrasingContent],

With this:

['a', 'href target rel media hreflang type charset name rev shape coords download', flowContent],

Good approach to override this file in your custom theme

The reason this fixes the issue is that the flowContent array includes block level tags and inline tags unlike the phrasingContent array which includes only inline elements.

The first element of this array is the a the tag we want to fix, the second array entry appears to be attributes allowed on a tags, and the third array entry (the one we care about) appears to be allowed children.

Reference: https://github.com/magento/magento2/blob/2.3-develop/lib/web/tiny_mce_4/tinymce.min.js

OR

If you check out to the TinyMCE 3 configuration archive above, there are some settings which would allow you to disable it, for example this one:

Reference: http://archive.tinymce.com/wiki.php/Configuration3x:verify_html

I hope this will help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.