I try a other solution for InsertOrEditLink with specific style(cf my previously post), i change my code later for make what i want(if you advance on my problem with getCurrentElement
now i do this, a simple button(who work after with a listbox) cut the selected text and insert a link with the text
Quote: function slink() {
var editor = eo_GetObject("Editor1");
var test = editor.getSelection();
editor.execCommand("Cut", "");
test = "<a href='http://www.google.fr' style='background-color:#888888'>" + test + "</a> "
editor.execCommand("InsertHTML", test);
}
i call this function with
Quote:<input type="button" onclick="slink();" />
i recup the selected text, i cut(for delete the texte) et insert html.
it works almost ...
Under IE8,IE6,IE7
can't delete link(with the toobar) if i add a bold,italic,style on the link
When i selected too many or text with style, the text is inserted at the end of document
Under firefox
After call the function slink when i want write Follow my new link, the link continue(with the style), i can't write normal after.My mistake that ok
can't delete link(with the toobar) if i add a bold,italic,style on the link
Any idea???