Page 1 of 1

cc_config.xml automatic element insertion no longer works for <note> elements

Posted: Sat Feb 04, 2023 9:16 pm
by chrispitude
For elements that allow both block elements and plaintext (such as <note> and <li>), we try to avoid plaintext. So in our cc_config_ext.xml file, we have entries like this:

Code: Select all

<elementProposals path="dd" insertElements="p"/>
<elementProposals path="li" insertElements="p"/>
<elementProposals path="note" insertElements="p"/>
We noticed that auto-insertion for <note> elements worked in v24.1 but stopped working in v25.0.

Testcase here:
oxygen_note_content_completion.zip
(17.04 KiB) Downloaded 100 times

I see that v25.0 uses a note action like this:

image.png
image.png (45.7 KiB) Viewed 540 times

I guess I could modify or override this action to insert a <p> in the XML fragment. But before I do that, is there some better way I should resolve this? Or could I request an enhancement for insertion actions to also consider content completion entries, at the fragment's caret position or by some other heuristic?

It would be nice to have both the power of custom actions and the simplicity and central configurability of the content completion files.

Thanks!

Re: cc_config.xml automatic element insertion no longer works for <note> elements

Posted: Mon Feb 06, 2023 6:38 pm
by alex_jitianu
Hi Chris,

I see that you've also found the culprit... Right now, the only solution is to edit the action's inserted fragment and put the 'p' element in it. I will record a feature request to automatically consider required elements, either those provided from the schema or from the content completion entries.

Best regards,
Alex

Re: cc_config.xml automatic element insertion no longer works for <note> elements

Posted: Mon Feb 06, 2023 11:00 pm
by chrispitude
Thanks Alex! I will modify our action for now.

Can you let me know the issue ID for the enhancement to consider element insertion proposals in action-inserted fragments?

Re: cc_config.xml automatic element insertion no longer works for <note> elements

Posted: Tue Feb 07, 2023 5:21 pm
by alex_jitianu
Hi,
The issue ID is EXM-52392 (Add missing required elements inside fragments inserted by author actions)
Best regards,
Alex