Page 1 of 1

auto-p element in new li not working reliably

Posted: Tue Apr 18, 2017 11:53 am
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

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

Posted: Thu Apr 20, 2017 10:32 am
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

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

Posted: Mon May 22, 2017 11:42 am
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

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

Posted: Fri May 26, 2017 9:22 am
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