Skip to main content
Participating Frequently
August 5, 2009
Question

Removing a link

  • August 5, 2009
  • 1 reply
  • 818 views

When I apply a link using the EditManager, my markup looks like this for example:

<TextFlow xmlns="http://ns.adobe.com/textLayout/2008">

<p><span>some </span>

<a href="http://www.adobe.com"><span>test</span></a>

<span> link</span></p>

</TextFlow>

Then when I want to remove the link I select the link and do this as recommended in the docs:

editManager.applyLink(null, null, true);

Then the markup looks like this:

<TextFlow xmlns="http://ns.adobe.com/textLayout/2008">

<p><span>some </span>

<a><span>test</span></a>

<span> link</span></p>

</TextFlow>

All that has happend is that the href attribute of the <a> tag has been stripped. Now because I have a config.defaultLinkNormalFormat defined for my links the text inside the left over <a> tag still has a different color.

This doesn't seem right, there has to be a better way to remove links (including the <a> tag)?

Cheers.

This topic has been closed for replies.

1 reply

Participating Frequently
August 6, 2009

Hi,

This sounds like a bug. For now, try passing "" (empty string) as the first parameter; that seems to work.

Thanks

Abhishek

(Adobe Systems Inc.)

cash0Author
Participating Frequently
August 6, 2009

Ok, the empty string seems to work for now. Thanks.