Question

Is there a way I can get the list of tags and attributes for a particular instance of ckeditor which the Advanced Content Filter will allow so that I can pass just those values to santize function in backend and strip away the rest?

We are using ckeditor 4.1 as WYSIWYG editor and rails 3.2 as backend.

Was it helpful?

Solution

You can find all rules in the filter.allowedContent array:

editorInstance.filter.allowedContent

This array contains a unified version of rules so you can assume that they are all in the same format. However, this is not an optimised format, so you may need to process it in order to extract the information which you need.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top