Override Smart Copy-Paste of XHTML document
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 3
- Joined: Wed Feb 05, 2014 3:33 pm
Override Smart Copy-Paste of XHTML document
Post by micogonzales »
Hi. I'd like to know how I can override the default copy-paste from word on an XHTML document.
For example, when I copy a bold text from word, it is inserted like this
But I want to change it so that when it's pasted, in the text mode it's:
Please help me find a solution for this.
Thanks.
For example, when I copy a bold text from word, it is inserted like this
Code: Select all
<b>This is a text.</b>
Code: Select all
<span class="font_weight_bold">This is a text.</span>
Thanks.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Override Smart Copy-Paste of XHTML document
Post by sorin_ristache »
Hello,
The default Paste action in Author mode in the Oxygen application inserts in the current XHTML document exactly the content exported by the Copy action executed in the Word application. If you are in Text mode you get only the text content on paste, but in Author mode you get the XHTML content exported by the Word application. Please make sure that the type of your Oxygen document is XHTML, not other type of XML document, and that you execute the Paste action in Author mode.
Why do you think that Word exported
but in Author mode in the Oxygen application you get the following?
Can you send us a small sample Word document for testing your case?
Regards,
Sorin
The default Paste action in Author mode in the Oxygen application inserts in the current XHTML document exactly the content exported by the Copy action executed in the Word application. If you are in Text mode you get only the text content on paste, but in Author mode you get the XHTML content exported by the Word application. Please make sure that the type of your Oxygen document is XHTML, not other type of XML document, and that you execute the Paste action in Author mode.
Why do you think that Word exported
Code: Select all
<span class="font_weight_bold">This is a text.</span>
Code: Select all
<b>This is a text.</b>
Regards,
Sorin
-
- Posts: 3
- Joined: Wed Feb 05, 2014 3:33 pm
Re: Override Smart Copy-Paste of XHTML document
Post by micogonzales »
What I mean is that I have this text in Word:
I copied and pasted it on the Author mode of Oxygen. I go to Text mode to see the tags and I see this:
So you see the tags inserted are <b>
but I want it to configure Oxygen so that what I see upon pasting is something like this:
My question is how do I do that.
Code: Select all
Hi this is a text.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<p class="MsoNormal"><b>Hi this is a text.</b></p>
</body>
</html>
but I want it to configure Oxygen so that what I see upon pasting is something like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<span class="font_weight_bold">Hi this is a text.</span>
</body>
</html>
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Override Smart Copy-Paste of XHTML document
Post by sorin_ristache »
You can modify the XHTML content exported by the Excel application by editing the following XSLT stylesheet:
For example you can add an XSLT template in this file that processes the element:
and transforms it to an element:
Regards,
Sorin
Code: Select all
[Oxygen-install-dir]\frameworks\xhtml\resources\xhtml2xhtml.xsl
Code: Select all
<p class="MsoNormal"><b>Hi this is a text.</b></p>
Code: Select all
<span class="font_weight_bold">Hi this is a text.</span>
Regards,
Sorin
Return to “SDK-API, Frameworks - Document Types”
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