I have two editors in my application. One is tinyMCE and other is different one. Is there any tinyMCE public methods that I can use to filter html tags and css that I can use for other editor.
pasteRetainStyleProperties = ['font-weight', 'font-style', 'font-size'];
pasteValidElements = ['b', 'strong', 'i', 'em'];
This is similar to the tinyMCE 4 feature. However I have to filter HTML string in the similar way. I am trying to build this for other editor. Hence I am wondering instead of building it from scratch is there any tinyMCE methods that I can use outside tinyMCE. Or any other 3rd party library help me achieve the same.
Any help would be greatly appreciated.
Thanks, Shridhar
I believe, TinyMCE 5 has almost exactly the same options as that you've mentioned in the code block:
However, all the settings, defined in the tinymce.init()
function cannot be changed without reinitialization. Reinitialization can be done very fast. You will need to perform 4 steps:
getContent()
destroy()
setContent()
to add the content saved on step 1.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.