Home Forums General XMetaL Discussion How to automatically paste plain text Reply To: How to automatically paste plain text

Derek Read

Reply to: How to automatically paste plain text

The simplest way to do this is in Plain Text view.

If that is not an option then you will need to live with the paste feature implemented by the customization for the specific DTD you are using and the built-in capabilities of XMetaL Author Essential/Enterprise/XMAX that you are using unless you can have the person that created the customization make changes to it or add the specific feature you want. That will vary greatly depending on which DTD / customization you are authoring to and the exact specifications for what you want to be inserted.

If you implemented the paste capabilities for your customization then you can look at all the various different APIs that XMetaL Author Essential/Enterprise/XMAX implements (search for “paste” in the Programmers Guide) and implement a macro that will do exactly what you want. In almost all cases you are going to want to keep some form of markup, so it is usually not desirable to strip it all away or convert the markup itself into characters that don't result in markup being inserted.

Does “plain text” for you mean to not escape characters such as “<", ">” and “&”?
If you paste something such as text does that mean you want it to appear exactly as that in the XML, so the resulting markup would be this: <para>text</para>