smart paste from Google Docs
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 20
- Joined: Tue Jun 14, 2011 10:42 pm
smart paste from Google Docs
A common scenario is for developers to provide content in Google Docs. However, when I paste lists from Google Docs directly or from any format generated from Google Docs into a DITA topic, the list formatting is lost and the bullets or list numbers are included as part of the content. Is there any way to correct this?
-
- Posts: 9420
- Joined: Fri Jul 09, 2004 5:18 pm
Re: smart paste from Google Docs
Hi,
What version of Oxygen are you using?
What Oxygen does when content is pasted in it is to see if it also comes as an HTML flavor and it it does, Oxygen has conversion stylesheets which try to convert that HTML content to the target content (DITA or Docbook or TEI).
I tested pasting a small numbered list from Google Docs to an opened DITA topic (Oxygen 14.1) and it worked for me, Oxygen created an <ol> with list items inside.
Could you also check if this works for you with a small numbered list? If it does, the problem may be particular to a certain content. If so, maybe you could share a sample document which has this problem and we could try to perform some more tests on it.
Regards,
Radu
What version of Oxygen are you using?
What Oxygen does when content is pasted in it is to see if it also comes as an HTML flavor and it it does, Oxygen has conversion stylesheets which try to convert that HTML content to the target content (DITA or Docbook or TEI).
I tested pasting a small numbered list from Google Docs to an opened DITA topic (Oxygen 14.1) and it worked for me, Oxygen created an <ol> with list items inside.
Could you also check if this works for you with a small numbered list? If it does, the problem may be particular to a certain content. If so, maybe you could share a sample document which has this problem and we could try to perform some more tests on it.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 20
- Joined: Tue Jun 14, 2011 10:42 pm
Re: smart paste from Google Docs
I tried again copying directly from Google Docs instead of writing to a Word document and that converted lists correctly. However, paragraphs marked as "Normal text" are not enclosed in a <p> tag and are thus invalid. See "Some text" and "More text" below. Also, is there any way to mark up code samples in a Google doc and have it be converted to <codeblock> or <codeph>?
<topic id="topic_udw_yrc_z3">
<title>Topic title</title>
<topic id="topic_zcv_csc_z3">
<title>A Heading</title>
<body>Some text<ul id="ul_gdv_csc_z3">
<li>
<p>A bullet</p>
</li>
<li>
<p>Another bullet</p>
</li>
</ul>More text<ol id="ol_jdv_csc_z3">
<li>
<p>A list item</p>
</li>
<li>
<p>Another list item</p>
</li>
</ol></body>
</topic>
</topic>
<topic id="topic_udw_yrc_z3">
<title>Topic title</title>
<topic id="topic_zcv_csc_z3">
<title>A Heading</title>
<body>Some text<ul id="ul_gdv_csc_z3">
<li>
<p>A bullet</p>
</li>
<li>
<p>Another bullet</p>
</li>
</ul>More text<ol id="ol_jdv_csc_z3">
<li>
<p>A list item</p>
</li>
<li>
<p>Another list item</p>
</li>
</ol></body>
</topic>
</topic>
-
- Posts: 9420
- Joined: Fri Jul 09, 2004 5:18 pm
Re: smart paste from Google Docs
Hi,
I had more luck preserving the original formatting by choosing File->Download as Open Document Format then by opening the ODT file in Libre Office, select all, copy and then pasting in Oxygen.
Exporting to HTML, opening in the web browser and copy pasting from there also seemed to preserve the normal text as paragraphs.
Oxygen also has a web component (Java applet) so if you'll ever want to test this approach:
http://www.oxygenxml.com/oxygen_sdk.htm ... _component
Regards,
Radu
I had more luck preserving the original formatting by choosing File->Download as Open Document Format then by opening the ODT file in Libre Office, select all, copy and then pasting in Oxygen.
Exporting to HTML, opening in the web browser and copy pasting from there also seemed to preserve the normal text as paragraphs.
I have no idea, maybe you should google for it. From what I searched, probably not.Also, is there any way to mark up code samples in a Google doc and have it be converted to <codeblock> or <codeph>?
Oxygen also has a web component (Java applet) so if you'll ever want to test this approach:
http://www.oxygenxml.com/oxygen_sdk.htm ... _component
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 20
- Joined: Tue Jun 14, 2011 10:42 pm
Re: smart paste from Google Docs
Lately pasting from a Google Doc in Chrome doesn't work at all. I'm getting this error:
Could not retrieve the HTML content from the clipboard.
The text content will be used instead.
Reason: Resetting to invalid mark
The content is pasted as plain text with no markup.
This is on MacOS Yosemite.
Is there any workaround? I've tried exporting to Word, ODT, and rtf with the same result.
Could not retrieve the HTML content from the clipboard.
The text content will be used instead.
Reason: Resetting to invalid mark
The content is pasted as plain text with no markup.
This is on MacOS Yosemite.
Is there any workaround? I've tried exporting to Word, ODT, and rtf with the same result.
-
- Posts: 9420
- Joined: Fri Jul 09, 2004 5:18 pm
Re: smart paste from Google Docs
Hi,
The default Oxygen kit for Mac OSX comes without the Java VM bundled and it runs using the Java 1.6 installed on the Mac. I can reproduce the problem with it.
But I also tested using Java 1.8 for running Oxygen and copy/paste from google docs worked.
What version of Oxygen are you using?
For example we have an Oxygen 16.1 kit which comes bundled with Java 1.8:
http://www.oxygenxml.com/InstData/Edito ... gen.tar.gz
But you can also install Java 1.8 separately on your Mac. If you have an older Oxygen version it might have not been tested with Java 1.8 so you might encounter problems using it.
Regards,
Radu
The default Oxygen kit for Mac OSX comes without the Java VM bundled and it runs using the Java 1.6 installed on the Mac. I can reproduce the problem with it.
But I also tested using Java 1.8 for running Oxygen and copy/paste from google docs worked.
What version of Oxygen are you using?
For example we have an Oxygen 16.1 kit which comes bundled with Java 1.8:
http://www.oxygenxml.com/InstData/Edito ... gen.tar.gz
But you can also install Java 1.8 separately on your Mac. If you have an older Oxygen version it might have not been tested with Java 1.8 so you might encounter problems using it.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
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