Prevent format copying into a DITA-table (Author view)

Post here questions and problems related to editing and publishing DITA content.
Oleksii
Posts: 84
Joined: Wed Jul 19, 2017 6:04 pm
Location: Austria
Contact:

Prevent format copying into a DITA-table (Author view)

Post by Oleksii »

Hi,
when copying code from our web-interface (click on a musical element) and paste it into a DITA-table Author view, an element

Code: Select all

<pre>
is added automatically.
It would be basically OK, but also an ID is added which is same for all <pre>-Elements and causes a validation error.
Is it possible to manage this behavior?
Please, see the screenshots in the attachment.
Oleksii

copy-paste-dita.zip
(36.53 KiB) Downloaded 182 times
Kind regards,
Oleksii Sapov-Erlinger
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Prevent format copying into a DITA-table (Author view)

Post by Radu »

Hi Oleksii,

When you copy something from the web browser and paste in Oxygen, Oxygen receives HTML content. It then applies this XSLT stylesheet:

OXYGEN_INSTALL_DIR\frameworks\dita\resources\xhtml2ditaDriver.xsl

to convert the HTML content to DITA so one possibility would be to add some further processing to the XSLT stylesheet there. I do not know where exactly that ID comes from but it's inside the HTML fragment received by Oxygen from the Web Browser.
As other workarounds:
- If you right click inside the Author visual editing mode there is a "Paste Special" submenu which allows you to "Paste as Text".
- In the Oxygen Preferences->"Editor / Edit Modes / Author / Schema-Aware" page you can uncheck the "Convert external content on paste" checkbox.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Oleksii
Posts: 84
Joined: Wed Jul 19, 2017 6:04 pm
Location: Austria
Contact:

Re: Prevent format copying into a DITA-table (Author view)

Post by Oleksii »

Ok, thanks. The preferences option is Ok in my case.
Kind regards,
Oleksii Sapov-Erlinger
Post Reply