Page 1 of 1

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

Posted: Mon Sep 23, 2019 12:49 pm
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 173 times

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

Posted: Mon Sep 23, 2019 3:38 pm
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

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

Posted: Mon Sep 23, 2019 3:58 pm
by Oleksii
Ok, thanks. The preferences option is Ok in my case.