how can I use 'smart paste' from the TEI framework in anothe
Posted: Thu Feb 19, 2015 12:51 pm
Hi,
I'm developing an Oxygen project dealing with TEI conformant documents and would like to offer my users 'smart paste' functionality in Author mode. I had noticed that 'smart paste' didn't work out-of-the-box, and is apparently a feature that has to be catered for by the framework (see http://www.oxygenxml.com/forum/topic10060.html). I've totally no Java skills, but since we're producing TEI P5 files, the feature is available in the TEI framework, and that framework is shipped with Oxygen, I decided I might as well just try and borrow the relevant code from there.
I have tried to copy what I thought were relevant items from the TEI framework (I'll attach screenshots from the Oxygen "Preferences" menu):
This seems to work only partially: when images are dragged into a document, they are now successfully converted to TEI <graphic> elements. Yet, styling information (bold, italics,...) from Word documents is not preserved when pasting.
I've tested by pasting the same test Word fragment into a TEI file (using the TEI framework), which does preserve the styling information, though. Apparently I'm missing something: perhaps a stylesheet is not correctly applied?
What should I do to make full use of the TEI framework's smart paste feature in another Oxygen project?
Best,
Ron
I'm developing an Oxygen project dealing with TEI conformant documents and would like to offer my users 'smart paste' functionality in Author mode. I had noticed that 'smart paste' didn't work out-of-the-box, and is apparently a feature that has to be catered for by the framework (see http://www.oxygenxml.com/forum/topic10060.html). I've totally no Java skills, but since we're producing TEI P5 files, the feature is available in the TEI framework, and that framework is shipped with Oxygen, I decided I might as well just try and borrow the relevant code from there.
I have tried to copy what I thought were relevant items from the TEI framework (I'll attach screenshots from the Oxygen "Preferences" menu):
- set the classpath to:
- ${frameworks}/tei/tei.jar
- ${frameworks}/tei/resources/
- ${frameworks}/tei/i18n/
- -selecting the TEIP5ExtensionsBundle in the "Extensions" tab

This seems to work only partially: when images are dragged into a document, they are now successfully converted to TEI <graphic> elements. Yet, styling information (bold, italics,...) from Word documents is not preserved when pasting.
I've tested by pasting the same test Word fragment into a TEI file (using the TEI framework), which does preserve the styling information, though. Apparently I'm missing something: perhaps a stylesheet is not correctly applied?
What should I do to make full use of the TEI framework's smart paste feature in another Oxygen project?
Best,
Ron