Welcome Guest Search | Active Topics | Sign In | Register

Problem with manipulate link with editor Options
karn
Posted: Thursday, February 11, 2010 8:29:41 AM
Rank: Advanced Member
Groups: Member

Joined: 10/20/2008
Posts: 39
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???
eo_support
Posted: Thursday, February 11, 2010 3:39:30 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

This will be covered together with the other issue:

http://www.essentialobjects.com/forum/postst4240_InsertOrEditLink-with-specific-style.aspx

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.