admin管理员组文章数量:1417070
What is the best solution for something that support:
- rich editor
- edit in place
- placeholder
- save HTML and strip out malicious etc.
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 e with some PHP code for the backend, it would be nice.
What is the best solution for something that support:
- rich editor
- edit in place
- placeholder
- save HTML and strip out malicious etc.
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 e with some PHP code for the backend, it would be nice.
Share Improve this question asked Nov 16, 2010 at 0:48 Chris CinelliChris Cinelli 4,8394 gold badges29 silver badges40 bronze badges 2- TinyMCE is nice a rich editor. CKEditor is even nicer but it is not free. – Chris Cinelli Commented Nov 16, 2010 at 1:00
- For what I know they do not have built in edit-in-place, place holder. Correct? – Chris Cinelli Commented Nov 16, 2010 at 1:02
6 Answers
Reset to default 2FCK Editor which is now CKEditor
it is free.
I use TinyMCE (http://tinymce.moxiecode./). It should have the majority of the functionality you need.
I've seen a few options:
- CKEditor (my personal favorite)
- TinyMCE (also very popular)
- NicEdit
- YUI's Rich Text Editor (part of much larger, and very good, YUI framework)
- Google's Closure Editor (part of Google's closure framework, what you get in GMail etc.)
- Dijit Editor (if you're using the Dojo framework)
- OpenWYSIWYG (true open source)
- jwysiwyg (for jQuery)
Also see http://en.wikipedia/wiki/Online_rich-text_editor and http://blog.insicdesigns./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 remend 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./demos.php?demo=4 ) and google closure ( http://closure-library.googlecode./svn/trunk/closure/goog/demos/editor/seamlessfield.html ) are able to edit inline.
I hope i'm wrong :) cheers!
I'll remend TinyMCE.
EDIT: And @wajiw beat me to it. Good sign though. :)
本文标签: phpRich edit in placeStack Overflow
版权声明:本文标题:php - Rich edit in place - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745258099a2650222.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论