开发者

Javascript WYSIWYG textarea plugins produce inconsistant results across browsers?

I'm in need of a lightweight, Javascript-based, WYSIWYG editor that transforms <textarea>s into Rich Text Editors. There are thousands of these plugins开发者_开发百科 out there (and I feel like I've demoed them all). For reasons outside of my control, I need the editor to produce legacy HTML... so it needs to write <b> instead of <strong> or <span style=...>.

Fine. No problem. There are plenty of these that purport to do just that. Here's the weirdness though: I'm finding that in a ton of these editors that I've played with, they output different things in different browsers! Chrome will output <b> but Firefox will output <span style="font-weight:bold">?!

For example, try applying bold in these editors in both Chrome and Firefox:

http://nicedit.com/

http://freshcode.co/plugins/jquery.contentEditable/demo.html

http://www.gosu.pl/steditor/

http://batiste.dosimple.ch/blog/posts/2007-09-11-1/rich-text-editor-jquery.html

See? <b> in Chrome, but <span style="font-weight:bold"> in Firefox. Weird!

Any ideas?


Instead of searching for the less known editor, you should have started with the most commonly used ones like CKEditor and TinyMCE.

Check this sample in CKEditor: http://nightly.ckeditor.com/latest/ckeditor/_samples/output_html.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜