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

Post here questions and problems related to editing and publishing DITA content.
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

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

Post 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 543 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!
alex_jitianu
Posts: 1009
Joined: Wed Nov 16, 2005 11:11 am

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

Post 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
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

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

Post 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?
alex_jitianu
Posts: 1009
Joined: Wed Nov 16, 2005 11:11 am

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

Post by alex_jitianu »

Hi,
The issue ID is EXM-52392 (Add missing required elements inside fragments inserted by author actions)
Best regards,
Alex
Post Reply