Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add custom html tag in CKEditor?

I want to add a custom tag like this:

<myTag>text</myTag>

How do I apply HTML properties to a custom tag?

like image 983
user3615304 Avatar asked Nov 09 '22 23:11

user3615304


1 Answers

  • Navigate to /admin/config/content/formats/manage/full_html
  • Tick on "Limit allowed HTML tags and correct faulty HTML". You will get an option to put your custom tag with allowed attributes.

Limit allowed HTML tags and correct faulty HTML

  • Add your new tag(s) separated by space, eg: <mytag attribute-1 attribute-2>

Hope this helps.

like image 167
shubham porwal Avatar answered Nov 30 '22 10:11

shubham porwal