What is the best solution for something that support:
I would like to have a nice and usable interface to change data on a profile. It must support bold, italic and multi-line text and being sure that no malicious code can be injected.
I am looking mostly for the Javascript side but if it come with some PHP code for the backend, it would be nice.
FCK Editor which is now CKEditor
I use TinyMCE (http://tinymce.moxiecode.com/). It should have the majority of the functionality you need.
I've seen a few options:
Also see http://en.wikipedia.org/wiki/Online_rich-text_editor and http://blog.insicdesigns.com/2009/07/rounding-up-the-best-javascript-wysiwyg-and-markup-editor/
I correctly use NicEdit but I would have changed to aloha-editor , an HTML5 WYSIWYG editor, if I had the time.
That said, I would not recommend any of those WYSIWYG editors as the html output is not only poor but also breaks the overall design by introducing a lot of inline styling that you probably did not expect for.
The only reason I use such an editor is that the client strictly asked for one. If you choose to use this method anyway, you would probably have to preprocess the user input. If I have a choice I use Markdown.
[EDIT: Added an example] As you can see in the html output below, what you see in not always what you get...
WYSIWYG Example:
Markdown Example:
I might be wrong (and please let me know if i am), but i don't believe TinyMCE nor CKedit do in place editing (that is, they do not use the contenteditable="true" without creating an iframe).
As far as i can tell, only nicedit ( http://nicedit.com/demos.php?demo=4 ) and google closure ( http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/editor/seamlessfield.html ) are able to edit inline.
I hope i'm wrong :) cheers!
I'll recommend TinyMCE .
EDIT: And @wajiw beat me to it. Good sign though. :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.