ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, i'm not sure where to post this, really, but here goes..
I have a site where i want admin users to edit content, usually through texarea and input tags, like text descriptions, prices, etc. For the textarea, i've been fiddling with TinyMCE, but it's not exactly fulfilling my expectations.
My main concerns are to strip odd stuff from the user text, filter sql injection (although these specific users won't screw around), keep the strings unicode and keep the html format (b and i tags, although i use span with styles). All to eb stored in a MySQL database (already set to utf8_bin). I've searched some php functions (like mysql_real_escape_string) but haven't found the correct combination yet.
TinyMCE - or something similar - seemed to be ideal, but... it uses javascript, which i'd like to avoid (but don't think will be able to); only works on IE and Firefox (i also tried Midori and Opera).
I don't want to use a CMS.
Any suggestions?
Oh, look, i've just typed this in a similar thingy!
I'd suggest widgEditor - back when it was available as a plugin for my favourite CMS (CMS Made Simple), I made it the default for all editors, and they were as satisfied as I was (I don't normally use WYSIWYG, though - I like my HTML to stay as lean and correct as possible). widgEditor does a pretty neat job overall, I think. And it's Free Software - get it here.
Sadly, I'm no coder to revive the plugin (it's no longer compatible with recent versions of the CMS). I've tried, but I seem to miss important steps. Sicut transit gloria mundi...
John VV, the other two posters got what i wanted. Are you gonna suggest gedit or emacs as a webapp to your website users? I wasn't asking for an IDE, but rather a "fancy" way for website users to submit preformatted text i can send/get to/from a database.
nl2br is, in my opinion, the most intuitive for your users; if they put a newline in the textarea, they will get a newline. Using [ br ] requires extra handling that not everybody will understand.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.