auto-p element in new li not working reliably

Post here questions and problems related to editing and publishing DITA content.
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

auto-p element in new li not working reliably

Post by Patrik »

Hi,

on my computer when typing character within an empty li element oXygen will automatically insert a new p element. That's great.
However, for one of my collegues (using the same framework and files) this feature is not always working. In some places it does, in others it doesn't. I have no idea where to look for a deeper analysis. Any hints?

Thanks and regards,
Patrik
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: auto-p element in new li not working reliably

Post by alex_jitianu »

Hi Patrik,

Tis behavior is driven by the schema. If you type inside an element that doesn't accept text then we try to find solution. Firstly, we try a few framework-dependent solutions. For DITA, one of these solution is to try wrapping the text inside a paragraph. If your framework extends the Built-in DITA framework then this will apply for you too (the Java extension controlling this is ro.sync.ecss.extensions.dita.DITAExtensionsBundle.getAuthorSchemaAwareEditingHandler()). The next step is to try some solutions based on the context. For example if you are editing next to an element that accepts text (for example you type just after/before a "p" element) we will wrap the text inside a similar element.
However, for one of my collegues (using the same framework and files) this feature is not always working. In some places it does, in others it doesn't.
I guess that sometimes, in some contexts, the text is permitted by the schema and as a result no wrapping is performed.

I hope this helps understanding what is happening...

Best regards,
Alex
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: auto-p element in new li not working reliably

Post by Patrik »

Hi Alex,

thanks for the explanation. Unfortunately it didn't explain the different behavior since I've tested with identical files and identical frameworks.

However, I could finally identify the responsible difference: These solution-strategies you described seem to be only triggered when ths setting is enabled: Editor / Edit Modes / Author / Schema Aware / Typing / "Reject action when its result is invalid". This one was disabled for my collegue. Enabling it solved the problem...

Regards,
Patrik
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: auto-p element in new li not working reliably

Post by alex_jitianu »

Hi Patrik,

This is very strange because this flag shouldn't influence the applied strategies. I've managed to reproduce this behavior myself so I will add an issue to investigate and fix it.

Best regards,
Alex
Post Reply