Skip to main content
April 29, 2011
Question

Error in return result from EditManger.applylink()?

  • April 29, 2011
  • 1 reply
  • 542 views

Hi there,

Just  wondering if there's an  error in what the EditManager.applylink method  is returning. If I select  a text area with paragraphs (carriage  returns) and use the applyLink method, it will spilt the text up and  make several link elements, one inside each paragraph. Ie. if the user  selects more than one line of  text and formats it as a link the  applylink method will spilt the text  up in several link elements. The  applyLink method will however only  return the first of these  link elements. I need to get hold of all the  link elements made by the  applyLinks method. Would it not make more sense  to return an Array with  all link elements created? Or even better, place all paragraps inside one linkElement, and return this?

This topic has been closed for replies.

1 reply

Adobe Employee
April 30, 2011

You are right. We chose just to return the first link for simplicity.

We will decide later whether to fix it. If yes, a new api would be provided to the users and the original one would remain what it is.

Thanks for your suggestion.

May 2, 2011

Thanks!

But it makes me wonder why you chose to return anything at all. I would actually say that this is a serious API error, since the way it is implemented now is not consistent. Never a good thing when designing an API.

Anyway,  thanks for the answer. I'll try to work around this and come up with  some other way to get hold of all the link elements created.