-3

How to allow all custom user defined elements and attribute in tinymce editor. I am using below code buts its inserting my span element but removing temp attribute. Can it possible that tinymce allow all custom attributes and elements in it?

tinyMCE.activeEditor.execCommand('mceInsertContent', false, 
    "<span class=\"fnlabel\"  temp=\"footnote\">" + labelText + "</span> "
);
  • In the future, please do some research, at the very least reading the documentation. – Heretic Monkey Jul 10 '18 at 13:53
  • Thanks for your comment. My requirement is to enable all custom element andywhere in body action. But tinymce is just removing those on saving and inserting. – user3718484 Jul 10 '18 at 13:57

1 Answers1

1

You need to setup the extended_valid_elements in your editor configuration:

https://www.tiny.cloud/docs/configure/content-filtering/#extended_valid_elements

A. Llorente
  • 1,142
  • 6
  • 16