How to add custom HTML tag in CKEditor?

I want to add a custom tag as follows:

<myTag>text</myTag> 

How to apply HTML properties to a custom tag?

+5
source share
1 answer
  • Go to /admin/config/content/formats/manage/full_html
  • Check the box next to "Limit valid HTML tags and fix invalid HTML." You will get the opportunity to put your custom tag with the allowed attributes.

Limit allowed HTML tags and correct faulty HTML

  • Add your new tag with a space, for example: <mytag attribute-1 attribute-2>

Hope this helps.

+1
source

Source: https://habr.com/ru/post/1238141/


All Articles