Copy markup in author mode
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 72
- Joined: Thu Mar 26, 2015 4:57 pm
Copy markup in author mode
Post by steve.cuzner »
If I select a tag, e.g., <foo>text</foo>, and copy using ctrl+c or the menu items, then paste to another application, all that is pasted is "text" Is there setting or a special copy mode that includes markup into the paste buffer?
-
- Posts: 9470
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Copy markup in author mode
Hi Steve,
Indeed the copy operation in the Author visual editing mode sets in the clipboard only the text content, with line breaks separating paragraphs.
We have an issue registered to add a special copy operation and I will add your feedback on it.
So right now you can either copy the content in the Text editing mode or maybe create a custom Author action.
For example the Javascript code to copy the XML content of the selection in the Author using a JSOperation should look something like:
Based on discussions with users who use JSOperations I created a GitHub repository which contains sample operations for doing various things, I updated the repository to contain also a sample for copy XML to clipboard:
https://github.com/oxygenxml/javascript ... operations
Regards,
Radu
Indeed the copy operation in the Author visual editing mode sets in the clipboard only the text content, with line breaks separating paragraphs.
We have an issue registered to add a special copy operation and I will add your feedback on it.
So right now you can either copy the content in the Text editing mode or maybe create a custom Author action.
For example the Javascript code to copy the XML content of the selection in the Author using a JSOperation should look something like:
Code: Select all
if(authorAccess.getEditorAccess().hasSelection()){
frag = authorAccess.getDocumentController().createDocumentFragment(authorAccess.getEditorAccess().getSelectionStart(), authorAccess.getEditorAccess().getSelectionEnd() - 1);
xmlContent = authorAccess.getDocumentController().serializeFragmentToXML(frag);
Packages.java.awt.Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new Packages.java.awt.datatransfer.StringSelection(xmlContent), null);
}
https://github.com/oxygenxml/javascript ... operations
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)
- ↳ 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