inject the editor some where else
Reported by schelmo | September 18th, 2009 @ 06:10 AM | in 0.5
Hi all,
i have a little problem with injecting the editor somewhere else
in the dom
example code:
<div class="source">
<div class="editor-container">
<textarea class="editor"></textarea>
</div>
</div> <div class="target"></div> <div class="button">inject bottom to top</div> <script type="text/javascript">
window.addEvent('domready', function () {
new MooEditable(document.getElement('textarea'));
document.getElement('div.button').addEvent('mouseup', function () {
document.getElement('div.editor-container').inject(document.getElement('div.target'));
});
});
the error message is:
</script>
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) nsIDOMNSHTMLDocument.execCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://dev/html/js/MooEditable.js :: anonymous :: line 400" data: no]
someone of you got an idea how to solve it? perhaps a re-render or sth like this ?
best regards
georg
Comments and changes to this ticket
-
schelmo September 18th, 2009 @ 06:23 AM
okey kust found the attach/detach methods. works now.
thx anyway :) -
Lim Chee Aun November 7th, 2009 @ 07:39 AM
- State changed from new to invalid
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A simple web-based WYSIWYG editor, written in Mootools.