simple, cross-browser rich text editor - does it exist?
Moderator: General Moderators
simple, cross-browser rich text editor - does it exist?
I need a simple, cross-browser, XHTML-compliant, WYSIWYG rich-text editor.
Something lightweight. Nothing like FCKEditor or TinyMCE, that is.
I have seen editors like nicEdit, Whizzywig and MooEditable, all of which are great! But all of them suffer from the same flaw - they're not really cross-browser; that is, the behavior of the ENTER key is unpredictable - sometimes breaks, sometimes paragraphs.
Apparently, this problem is far more complicated than you would think. The ENTER key behavior method in TinyMCE, for example, is 220 lines of code - and that's just the method itself, not all of the DOM-management, range-handling, etc. that it relies on.
It doesn't look like there's any simple solution to this problem. Semantic, consistent XHTML is an absolute requirement for the projects I work on, and therefore we can't use any of these editors.
Quick fixes have been attempted by several of them, including MooEditable and Whizzywig, which I've been trying to fix for months myself. But it seems rather hopeless...
I'm to the point where I consider dropping WYSIWYG-editing altogether. If the only alternative is 150+KB of mostly unused JavaScript, in the form of TinyMCE or FCKEditors (the only two editors I know of that handle the ENTER key correctly), maybe my customers would be better off using a simple markup of some sort.
Needless to say, a lot of them would object strongly to that.
Has anyone ever heard of a scalable editor, or editor of reasonable size, that handles the ENTER key, and correctly produces paragraphs? I must have tried out 30-40 editors at this point, and if it exists, I'm not finding it...
Any help/ideas would be greatly appreciated!
Something lightweight. Nothing like FCKEditor or TinyMCE, that is.
I have seen editors like nicEdit, Whizzywig and MooEditable, all of which are great! But all of them suffer from the same flaw - they're not really cross-browser; that is, the behavior of the ENTER key is unpredictable - sometimes breaks, sometimes paragraphs.
Apparently, this problem is far more complicated than you would think. The ENTER key behavior method in TinyMCE, for example, is 220 lines of code - and that's just the method itself, not all of the DOM-management, range-handling, etc. that it relies on.
It doesn't look like there's any simple solution to this problem. Semantic, consistent XHTML is an absolute requirement for the projects I work on, and therefore we can't use any of these editors.
Quick fixes have been attempted by several of them, including MooEditable and Whizzywig, which I've been trying to fix for months myself. But it seems rather hopeless...
I'm to the point where I consider dropping WYSIWYG-editing altogether. If the only alternative is 150+KB of mostly unused JavaScript, in the form of TinyMCE or FCKEditors (the only two editors I know of that handle the ENTER key correctly), maybe my customers would be better off using a simple markup of some sort.
Needless to say, a lot of them would object strongly to that.
Has anyone ever heard of a scalable editor, or editor of reasonable size, that handles the ENTER key, and correctly produces paragraphs? I must have tried out 30-40 editors at this point, and if it exists, I'm not finding it...
Any help/ideas would be greatly appreciated!
Re: simple, cross-browser rich text editor - does it exist?
(sorry, not bumping, just need to subscribe to this post, and there doesn't seem to be a link to do that...)
Re: simple, cross-browser rich text editor - does it exist?
If you're using the default template, there's a "Subscribe topic" near the top of the posts.
What you're asking for is not simple. It's simple to describe, but certainly not to implement. Your customers would certainly have smaller, cleaner code if they hand coded itself, but generally the customer that wants a WYSIWYG editor is not the kind of customer that can do it by hand.
Here's a lightweight, jQuery based, super simple editor: http://www.ajaxbestiary.com/2007/11/13/ ... in-jquery/ .
What you're asking for is not simple. It's simple to describe, but certainly not to implement. Your customers would certainly have smaller, cleaner code if they hand coded itself, but generally the customer that wants a WYSIWYG editor is not the kind of customer that can do it by hand.
Here's a lightweight, jQuery based, super simple editor: http://www.ajaxbestiary.com/2007/11/13/ ... in-jquery/ .
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: simple, cross-browser rich text editor - does it exist?
Yeah, still no paragraphs in FF2...pickle wrote:Here's a lightweight, jQuery based, super simple editor: http://www.ajaxbestiary.com/2007/11/13/ ... in-jquery/ .
Re: simple, cross-browser rich text editor - does it exist?
I am now leaning towards a server-side solution - stripping and cleaning the posted HTML, transforming double-breaks into paragraphs, etc...
It seems solving this problem on the client-side is simply not feasible.
It seems solving this problem on the client-side is simply not feasible.
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: simple, cross-browser rich text editor - does it exist?
WYMeditor looks promising, but it's not what I would consider truly complete yet.
Re: simple, cross-browser rich text editor - does it exist?
Kieran, thanks for the WYMeditor link! The RTE issue is a painful one and this one looks promising.
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: simple, cross-browser rich text editor - does it exist?
I live to give 
Re: simple, cross-browser rich text editor - does it exist?
Thanks, Kieran - I knew about WYMEditor, but it's not exactly WYSIWYG. And, unfortunately, that's what most clients want - try telling them, but they just don't know what's good for them 
I remember examining WYMEditor and finding it to be, basically, a WYSIWYG editor with a peculiar stylesheet. But since it has the required functionality, I wonder if it would be possible to replace it's stylesheet to achieve something more WYSIWYG like... hmm...
For the time being, I like nicEdit, which I have been started trying to modify to better suit my needs. It too does not consistently do paragraphs, but uses a simpler approach and at least consistently does breaks - currently I've settled for a simple solution where double-breaks are transformed to paragraphs on the server-side. It's not what I wanted, but it's the best I can do right now, it seems...
I remember examining WYMEditor and finding it to be, basically, a WYSIWYG editor with a peculiar stylesheet. But since it has the required functionality, I wonder if it would be possible to replace it's stylesheet to achieve something more WYSIWYG like... hmm...
For the time being, I like nicEdit, which I have been started trying to modify to better suit my needs. It too does not consistently do paragraphs, but uses a simpler approach and at least consistently does breaks - currently I've settled for a simple solution where double-breaks are transformed to paragraphs on the server-side. It's not what I wanted, but it's the best I can do right now, it seems...
Re: simple, cross-browser rich text editor - does it exist?
If I look at the demo of WYMEditor it does work like a WYSIWYG. What's about it thats not? I really do like the approach. Using semantic elements which are styled the normal way. Much better then having people write real HTML (and forgetting to close elements etc)mindplay wrote:Thanks, Kieran - I knew about WYMEditor, but it's not exactly WYSIWYG. And, unfortunately, that's what most clients want - try telling them, but they just don't know what's good for them
I remember examining WYMEditor and finding it to be, basically, a WYSIWYG editor with a peculiar stylesheet. But since it has the required functionality, I wonder if it would be possible to replace it's stylesheet to achieve something more WYSIWYG like... hmm...
It's always so annoying when clients start 'designing' the content of web pages. Have you spend hours fine-tuning the typography of the website, they come and start making everything big and red, underlined while not being links, etc etc. Normally when they ask me how to do stuff like that I just tell them they can't. Or at least that they have a limited set of markup (headers, paragraphs, bold, links etc) they can use and that it's in their best interest to leave the styling to me (the stylesheet).
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: simple, cross-browser rich text editor - does it exist?
matthijs++matthijs wrote:It's always so annoying when clients start 'designing' the content of web pages. Have you spend hours fine-tuning the typography of the website, they come and start making everything big and red, underlined while not being links, etc etc. Normally when they ask me how to do stuff like that I just tell them they can't. Or at least that they have a limited set of markup (headers, paragraphs, bold, links etc) they can use and that it's in their best interest to leave the styling to me (the stylesheet).
I refuse to give people "font access" in wysiwyg editors - instead giving them a subset of tags and classes. Makes a world of difference!