I have the following code demonstrating contenteditable property and a button that will inject bold text into the paragraph with contenteditable area. My question is how to retu
HTML:
B
JavaScript:
function doRichEditCommand(aName, aArg){ getIFrameDocument('editorWindow').execCommand(aName,false, aArg); document.getElementById('editorWindow').contentWindow.focus() }
Refer this may help you:
https://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla