Is there a way to get a list of all allowed tags in CKEDitor 4.x (4.4.7 to be precise) after the editor has been initialized with all plugins, and all allowedContentRules
and disallowedContentRules
or any other datafilters have been applied?
I would like to have this list so that I can pass it on to our back-end for whitelisting. I know there is already a whitelist plugin for CKEditor which would allow me to specify the same whitelist on both front-end and back-end, but I'm afraid I may miss some tag used in some plugin which may cripple them.
Probably
CKEDITOR.filter.allowedContent
is what you're looking for. It can be accessed from theeditor.filter
property. Small example of how to do it: https://jsfiddle.net/Comandeer/tb6f0g8r/Maybe that format is not as friendly as simple string, but it conveys all information you need.