Welcome Guest, Not a member yet? Register   Sign In
FCK Editor - limiting a users input
#1

[eluser]TheFuzzy0ne[/eluser]
Hi.

I'm looking into using FCK Editor for a forum I'm designing for a client. I can see that I can remove various toolbars and such, but is there any way I can pass those limitations into the editor itself, so that a user can't just paste an image?

I was thinking of just making the editor available to administrators, or simply stripping out input when it's submitted to the server, but I just wanted to check out my options first, in case there's an easier way to do it.

Thanks.
#2

[eluser]xwero[/eluser]
Don't allow source/code access then they only have the wysiwyg rendered output to work with. If they paste an image as a tag it will be escaped.
#3

[eluser]TheFuzzy0ne[/eluser]
Nice one. Thanks!
#4

[eluser]simshaun[/eluser]
That does not apply if they simply copy an image from somewhere on the net and paste it into the editor.
FCKEditor works similar to a true WYSIWYG where you can copy an image and paste without touching the HTML.

I think you will need to run a fairly simple preg_replace if you want to ensure no images are used.
#5

[eluser]TheFuzzy0ne[/eluser]
Ah, OK. That's what I suspected. Thanks for your input.
#6

[eluser]xwero[/eluser]
simshaun you are right but to do so you have to grab the image and drag it to the fck editor.
#7

[eluser]simshaun[/eluser]
If you simply right click and copy the image without highlighting it doesnt work, atleast in FireFox.

But, if you highlight it first and then copy/paste into fckeditor it works just fine, atleast for me. (Using Ctrl + C / Ctrl + V keys, not right click/copy image)
#8

[eluser]xwero[/eluser]
Browsers make it too easy to copy images Smile I still think it are methods for power users.

But to be on the safe side you could strip all the tags that can't be added by the editor.




Theme © iAndrew 2016 - Forum software by © MyBB