Split Paragraph on Enter (Instead of Showing Content Completion List)
Question
How to split the paragraph on Enter instead of showing the content completion list?
Answer
To obtain this behavior, edit your document type and in the Document Type configuration dialog box go to the Author tab, then Actions subtab, and add your own split action. This action must have the Enter shortcut key associated and must trigger your own custom operation that handles the split.
So, when you press Enter, your Java operation is invoked and it will be your responsibility to split the paragraph using the current API (probably creating a document fragment from the cursor offset to the end of the paragraph, removing the content and then inserting the created fragment after the paragraph).
This solution has as a drawback. Oxygen XML Editor plugin hides the Content Completion
Assistant when you press Enter. If you
want to show allowed child elements at that certain offset, implement your own content
proposals window using the ro.sync.ecss.extensions.api.AuthorSchemaManager
API to use information from the associated schema.