Skip to main content
Participant
July 14, 2011
Question

setting active cursor at the beginning of a flowElement

  • July 14, 2011
  • 1 reply
  • 422 views

Hi, I have this issue when the active cursor is at the last position of a flowLeafElement, I can't find a way to force to switch to the beginning of the next FlowLeafElement so it gets the next object formatting.

Imagine the text hello world having the current definition as <span id="firstId">hello </span><span id="secondId">world</span>, if I have the cursor a position 6 the cursor gets placed here <span id="someId">hello |</span><span>world</span> but what I really want to achieve is to force the cursor here <span id="someId">hello </span><span>|world</span> so when the user starts typing, it will append text to the beginning of "secondId" SpanElement.

Is there a way to achieve this?

This topic has been closed for replies.

1 reply

Adobe Employee
July 15, 2011

TLF may provide you a new API (or an additional paramter for the original API) to get the following element's format when the cursor is between the two elements in the future. But now, if you want to get the format of the following element, pls make the cursor inside the following element, for example cursor += 1;

Participant
July 15, 2011

The problem with cursor +1 is that in my case the cursor will be placed at hello w|orld which isn't the desired behavior. It seems I'll have to take a look at text decoration so I can mark specific words as non editable, clearly I can't rely on a span definition for that.