Access tags in clipboard data to convert them to xml

Dear Community,

I am trying to access the tag data in the clipboard after selecting and copying a source segment from the editor to change them to xml.

For example: the user selects [TagHyperlink>https://www.sdl.com<TagHyperlink] the result in the clipboard should be <some_xml_tag>www.sdl.com</some_xml_tag>

My approach so far looks like this:

IDataObject dataObject = System.Windows.Forms.Clipboard.GetDataObject();
if (dataObject.GetDataPresent(typeof(AbstractMarkupData)))
{

    //Trados Segment found, do something
}

but AbstractMarkupData seems not to be the right type. I tried Segment aswell without success.

Is there any solution to this?

Thank you very much in advance and best regards,
Kai

Parents Reply Children