Log in or register to post comments
Last post
gazillion's picture
Joined: 30/11/2009
Posts: 27
Stripping tags
Hey,

I tried searching for this issue in the forum but I can't find a thread with an answer. I'm using a stripped down version of the editor with only the strong, em, ul, ol, and li tags, I want to strip out anything else. Thing is the editor still allows people to paste tags into the editor.

I plan on stripping out bad tags on the server side once the form is submitted but I would like them to see what they're allowed to insert in real time (without having to wait to see what the server allows).

I'm guessing the editor already has this built in and that my google-fu just sucks :oops:
mvl
mvl's picture
Joined: 26/02/2010
Posts: 2
Re: Stripping tags
I have exactly the same question. Although I could write a handler for the paste event, I assume that ckEditor has a way of dealing with allowed/forbidden tags already. To me, it does not make sense that buttons in the menu can be disabled, but the corresponding tags are still allowed when pasting. The behaviour when pasting tags that are not allowed should be configurable: either remove the elements that are not allowed, or pass them through a custom filter, or fail to paste with a warning or error message.
jelo's picture
Joined: 15/05/2010
Posts: 3
Re: Stripping tags
Subscribed...

I cannot find documentation about this in the code. Does anybody know how to implement this feature? Thanks, Jens