#11 ✓invalid
schelmo

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">

&lt;div class=&quot;editor-container&quot;&gt;
    &lt;textarea class=&quot;editor&quot;&gt;&lt;/textarea&gt;
&lt;/div&gt;



</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'));
    });
});



</script>
the error message is:

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

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.

New-ticket Create new ticket

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.

People watching this ticket

Pages