Line wraps in code block?
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 102
- Joined: Fri Oct 19, 2018 2:19 am
Line wraps in code block?
I have noticed that text within <codeblock> tags do not line wrap in the editor. When compiled as WebHelp, they also do not line wrap unless there is an explicit line break within the code. But this code does wrap when PDF is the output.
My question: It was probably by design that code blocks do not wrap in the editor, to preserve the integrity of the code. But is there a way to "force" these lines to wrap in the editor? I have some topics where a single long line of code causes so much horizontal scrolling that it becomes very cumbersome to edit the topic, and some edits are missed because they occur out of view.
I already have the "Line wrap" option turned on in Options > Preferences > Editor > Edit Modes > Text.
My question: It was probably by design that code blocks do not wrap in the editor, to preserve the integrity of the code. But is there a way to "force" these lines to wrap in the editor? I have some topics where a single long line of code causes so much horizontal scrolling that it becomes very cumbersome to edit the topic, and some edits are missed because they occur out of view.
I already have the "Line wrap" option turned on in Options > Preferences > Editor > Edit Modes > Text.
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Line wraps in code block?
Hi,
The visual Author editing mode is CSS-based so you need to add an extra CSS selector in the CSSs used for editing:
You can find advice here about how to add your own CSS for DITA visual editing:
https://blog.oxygenxml.com/topics/customizeDITACSS.html
Regards,
Radu
The visual Author editing mode is CSS-based so you need to add an extra CSS selector in the CSSs used for editing:
Code: Select all
*[class~="topic/pre"] {
white-space:pre-wrap !important;
}
https://blog.oxygenxml.com/topics/customizeDITACSS.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service