Javascript Access to data
Question:
I want to be able to dynamically alter the value of the HTML editor, eg textfield.value = textfield.value + 'foo'
as far as I can tell I would have to do this and simultaneously alter the actual HTML displayed by in the editor, how do I access this? I presume it uses innerHTML? ... Answer:
You can do it with dmxedit_setHTML('textfield', dmxedit_getHTML('textfield') + 'foo');
I want to be able to dynamically alter the value of the HTML editor, eg textfield.value = textfield.value + 'foo'
as far as I can tell I would have to do this and simultaneously alter the actual HTML displayed by in the editor, how do I access this? I presume it uses innerHTML? ... Answer:
You can do it with dmxedit_setHTML('textfield', dmxedit_getHTML('textfield') + 'foo');
dmxedit_getHTML(textarea) gets the current html content of the editor
dmxedit_setHTML(textarea, html) inserts new HTML into the editor
Comments
Be the first to write a comment
You must me logged in to write a comment.