Customize Content Completion

Post here questions and problems related to oXygen frameworks/document types.
Posts: 47

Re: Customize Content Completion

Fri Feb 20, 2015 5:34 pm


we are using the Eclipse Oxygen Author in Version 15.2.

What would be the best approach, if I want to extend the content completion. The use case:
I want to create this structure:

Code: Select all

<h1> <p></p></h1>

So everytime, if the author choose a <h1> element, the content completion has to add a <p>-element. The problem is the <p>-elemnt is not required. Also I do not want to make it optional.

Best regards
Denis Zygann
KGU Consulting GmbH
Posts: 653

Re: Customize Content Completion

Mon Feb 23, 2015 10:45 am

Hello Denis,

The easiest way would be to replace the default entries with author actions. If we were to take your sample as a starting point:
1. you must create an author action. THe action must use the operation ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation and the fragment to insert must be <h1> <p></p></h1>.
2. On the Content Completion page you must add the previously created action in the content completion (select the action in the Available Actions and put it in the Current Actions)
3. In the same Content completion page, remove the default action that adds a h1 element (the one that comes from the schema). To do that you must add an entry in the table Filter - Remove content completion items.
Best regards,

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 0 guests