views:

44

answers:

3

Hi.

I want to write a very simple WYSIWYG editor, but i don't understand how do they work :( I've tried to read sources of tinyMCE but stuck in all those classes and functions. As I know they're creating iframe then do some black magic there and everything works. The question is: what do those editors do with iframe so it becomes editable?

Thank you.

+1  A: 

The keywords are contentEditable and designMode.

Good sources to get started:

Pekka
A: 

very simple means you want little extension? In such case, you will like http://code.google.com/p/jwysiwyg/

Its constructor is really simple, but not good for extension works. You can search JQuery. I think there's huge amount of HTML editor or rich text editor available. By the way, the HTML editor inside Extjs is the worst thing I have ever seen.

Nemo
A: 

Google released yesterday an open source editor:
http://closuretools.blogspot.com/2010/07/introducing-closure-library-editor.html

A quick look at it shows an IFRAME with the BODY tag with the attribute: contentEditable

Mic