i'd like to surround a selected text node with a user-defined tag called "meta:value". using the dom level 2 my javascript is something like this :

var range = selection.getRangeAt(0); (that range is supposed to enclose a text node)
var metaValue = editor.document.createElement("meta:value");


try{ range.surroundContents(metaValue);
}
catch(e){
        alert(e);
        }

that gives me the following exception : "Index or size is negative or greater than the allowed amount code" (NS_ERROR_DOM_INDEX_SIZE_ERR)

what's wrong ?

aTdHvAaNnKcSe

Fabrice

_______________________________________________
mozilla-editor mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-editor

Reply via email to