inInlineContext not working as expected
Posted: Tue Feb 25, 2014 7:06 pm
Hi,
Is there a way to configure authorAccess.getDocumentController().inInlineContext(caretOffset) ?
I am asking because it does not work as I expected; it seems to always return true.
I have a custom DTD with the following declaration:
and an instance
My code is
If I place the cursor inside a para element, inInlineContext() returns true; which is correct; but when the cursor is between the 2 para elements, inInlineContext returns also true; which is incorrect.
What am I missing ?
Pascale
Is there a way to configure authorAccess.getDocumentController().inInlineContext(caretOffset) ?
I am asking because it does not work as I expected; it seems to always return true.
I have a custom DTD with the following declaration:
Code: Select all
<!ELEMENT block (label, ( para | list | tablecontainer | graphiccontainer )*)
Code: Select all
<block><label>The block label</label><para>First para</para><para>Second para</para></block>
Code: Select all
final int caretOffset = authorAccess.getEditorAccess().getCaretOffset();
if (authorAccess.getDocumentController().inInlineContext(caretOffset))
{
// insert my inline element
}
else
{
// insert my block element
}
What am I missing ?
Pascale