Hi,
I want to use the FCKeditor for plaintext editing but want to have special plugin for special text (variables) for our users.
I've created an editor without sourceview and without all formating buttons. That way no one should be able to inserte html code.
Only one problem remains: When a newline is inserted it is html (p or br) and on submit all content is wrapped in a p tag. Is there a way to disable this behaviour and how to have newlines inserted as simple newlines? If it possible at all?
I want to use the FCKeditor for plaintext editing but want to have special plugin for special text (variables) for our users.
I've created an editor without sourceview and without all formating buttons. That way no one should be able to inserte html code.
Only one problem remains: When a newline is inserted it is html (p or br) and on submit all content is wrapped in a p tag. Is there a way to disable this behaviour and how to have newlines inserted as simple newlines? If it possible at all?
Re: FCK for plaintext
Re: FCK for plaintext
Is there a way to hook a submit action? I would like to do the replacement on the client side, because the server side is unaware of potential html tags in the edited parts. And a good degration for browsers who do not support FCK would be to do not need to replace anything in the content.
Re: FCK for plaintext
Use the OnAfterLinkedFieldUpdate event http://wiki.fckeditor.net/Developer%27s ... script_API , but if you are inserting an html editor, then you should prepare your server script to clean any unwanted html code. No matter that you have removed the buttons or how much do you think that you have protected. The FCKeditor is build on javascript and running on the client, so they can do whatever you want, if you search a little you'll find a post asking how to add a button to the toolbar from the client because the site developer didn't add a button that he wanted.
I don't understand that part. If their browser isn't supported by FCKeditor they'll get a textarea, and they can put still whatever they want. You have to do a clean up at the server to avoid any problem.
Re: FCK for plaintext
You are right with that and I'll have to do it on the server side anyway...
Thanks for your input and help.