Line breaks on empty elements in Author Mode

Oxygen general issues.
Seb
Posts: 23
Joined: Mon Feb 20, 2017 8:03 pm

Line breaks on empty elements in Author Mode

Post by Seb »

I have a question regarding line break handling in oXygen Author Mode on empty elements. It is related to topic10259.html

Suppose, I have this XML:

Code: Select all

<p>This is an example of an original text, where a line break occurs in bet<lb type="inWord"/>
ween a word.</p>
In my framework, Author Mode actually breaks the line at that position, even though I tried these things in CSS:

Code: Select all

lb[type=inWord] {
content: "";
-oxy-display-tags: none;
}

lb[type=inWord] {
display: none;
}
I also have tried to set "//lb[@type="inWord"]' as a mixed content element in Editor > Format > XML without any effect in author mode.
How can I achieve that such elements do not result in possible line breaks?
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Line breaks on empty elements in Author Mode

Post by Radu »

Hi,

What you did in the CSS only affects the way in which the content is displayed to the end user and not the actual way in which the XML gets serialized.
In the Oxygen Preferences->Editor / Format page there is a "Line width" setting. Usually when the text in a paragraph will go over that limit, Oxygen will try to break the line at the closest whitespace. So you can increase that limit.
Or if you have the latest Oxygen version (18.1) in the Preferences->"Editor / Edit Modes / Author" page you have a "Compatibility with other tools" setting which you can probably set to "Break lines only after elements displayed as blocks".

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Seb
Posts: 23
Joined: Mon Feb 20, 2017 8:03 pm

Re: Line breaks on empty elements in Author Mode

Post by Seb »

Hi Radu,

thanks for the reply.

None of these settings seem to have any effect. The word is still broken in Author mode.

Just to make sure that I have not been too unspecific about the issue, let me give you two screenshots:

Text Mode:
Image

Author Mode:
Image

The word "accusam" is broken in between, when it happens to be at the end of a line in Author Mode. But I do not want that behavior.
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Line breaks on empty elements in Author Mode

Post by Radu »

Hi,

Thanks for the screenshot, I thought you wanted to control the XML serialization but now I see you want the rendering to avoid visual breaking the line at that particular inline element. I agree that by default it should not do that, I will add an issue on our side for this. But I do not have a workaround for you right now.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Seb
Posts: 23
Joined: Mon Feb 20, 2017 8:03 pm

Re: Line breaks on empty elements in Author Mode

Post by Seb »

Hi Radu,

sounds good. Will you update this threat when this has been resolved? Then I'd activate the notifier service.
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Line breaks on empty elements in Author Mode

Post by Radu »

Hi,

Yes, we always try to update the forum thread where a certain feature was requested. Also in general it's best that for each post you check the "Notify me" checkbox.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Line breaks on empty elements in Author Mode

Post by Radu »

Hi,

Just to update this thread, we released Oxygen 20.1 and it should no longer attempt to break the line after inline element tags if they are followed by text.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply