JAVASCRIPT » Javascript DHTML

  Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg

Firefox 3 -has attribute ContentEditable on all HTML elements


Firefox 3 is expanding its rich WYSIWYG editing capabilities by adding support for the contentEditable attribute. Setting contentEditable to “true” allows you to make parts of a document editable. Firefox already supports using designMode to make an entire document editable. (NOTE: requires Firefox3.a6+ or a browser that supports contentEditable) The new contentEditable features support the same API as designMode for interacting with the editable element: * document.execCommand - Executes the given command. * document.queryCommandEnabled - Determines whether the given command can be executed on the document in its current state. * document.queryCommandIndeterm - Determines whether the current selection is in an indetermined state. * document.queryCommandState - Determines whether the given command has been executed on the current selection. * document.queryCommandValue - Determines the current value of the document, range, or current selection for the given command.
Examples
Here is an example of using contentEditable to make a simple rich editor in HTML.

Testing contenteditable



This is the content
This is more editable content in a different div

Free   Version: n/a   Platform(s): All   Updated:  July 18, 2008

Developer:EPSILONSYS.com Demo Download  
Rated by: 5 user(s)  
Follow Navioo On Twitter

Submit a resource