Custom formatting code
Oxygen general issues.
-
- Posts: 8
- Joined: Fri Mar 04, 2011 3:28 pm
Custom formatting code
I have a question about how I can custom "join and normalize" within certain elements only.
When I hit "ctr+j" the entire text normalizes. But I would like to "join and normalize" only what is contained within each <p></p>. I can do this by hand, by selecting the individual paragraph and the hitting ctr+j. But I would rather not do this manually for each paragraph. Can you tell me how I can do this automatically for a specified element. (i.e. for the all my <p></p> elements.)
Thanks for your help
When I hit "ctr+j" the entire text normalizes. But I would like to "join and normalize" only what is contained within each <p></p>. I can do this by hand, by selecting the individual paragraph and the hitting ctr+j. But I would rather not do this manually for each paragraph. Can you tell me how I can do this automatically for a specified element. (i.e. for the all my <p></p> elements.)
Thanks for your help

-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Custom formatting code
Hello,
You can do this automatically for all <p></p> elements by using the Find/Replace(Ctrl+F) dialog.
Text to find: \s+
Replace with: <space>
Use the actual space character: ' '
XPath: //p
Enable:
Regular expression
Press "Replace All" and all whitespaces from <p></p> elements will be normalized
Regards,
Adrian
You can do this automatically for all <p></p> elements by using the Find/Replace(Ctrl+F) dialog.
Text to find: \s+
Replace with: <space>
Use the actual space character: ' '
XPath: //p
Enable:
Regular expression
Press "Replace All" and all whitespaces from <p></p> elements will be normalized
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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