![]() |
FCK Editor - limiting a users input - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: FCK Editor - limiting a users input (/showthread.php?tid=17005) |
FCK Editor - limiting a users input - El Forum - 03-23-2009 [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. FCK Editor - limiting a users input - El Forum - 03-23-2009 [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. FCK Editor - limiting a users input - El Forum - 03-23-2009 [eluser]TheFuzzy0ne[/eluser] Nice one. Thanks! FCK Editor - limiting a users input - El Forum - 03-23-2009 [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. FCK Editor - limiting a users input - El Forum - 03-23-2009 [eluser]TheFuzzy0ne[/eluser] Ah, OK. That's what I suspected. Thanks for your input. FCK Editor - limiting a users input - El Forum - 03-23-2009 [eluser]xwero[/eluser] simshaun you are right but to do so you have to grab the image and drag it to the fck editor. FCK Editor - limiting a users input - El Forum - 03-23-2009 [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) FCK Editor - limiting a users input - El Forum - 03-23-2009 [eluser]xwero[/eluser] Browsers make it too easy to copy images ![]() But to be on the safe side you could strip all the tags that can't be added by the editor. |