Line breaks on empty elements in Author Mode

<oXygen/> general issues.
Seb
Posts: 18

Line breaks on empty elements in Author Mode

Mon Apr 03, 2017 4:46 pm

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: 5585

Re: Line breaks on empty elements in Author Mode

Tue Apr 04, 2017 11:06 am

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: 18

Re: Line breaks on empty elements in Author Mode

Tue Apr 04, 2017 12:43 pm

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: 5585

Re: Line breaks on empty elements in Author Mode

Tue Apr 04, 2017 3:19 pm

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: 18

Re: Line breaks on empty elements in Author Mode

Mon Apr 10, 2017 1:12 pm

Hi Radu,

sounds good. Will you update this threat when this has been resolved? Then I'd activate the notifier service.
Radu
Posts: 5585

Re: Line breaks on empty elements in Author Mode

Mon Apr 10, 2017 1:23 pm

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: 5585

Re: Line breaks on empty elements in Author Mode

Mon Jun 18, 2018 3:51 pm

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

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 3 guests