Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hi, all...
I'd like to paste a code sample between <codeblock> tags for a DITA topic in Arbortext Editor 5.3 M010. The code sample is itself DITA XML. How can I paste this text and have Arbortext ignore tags, e.g. by automatically converting angle brackets and other characters that must be escaped into entities? Or some other way to do this...whatever works.
I don't want to have to create the entities by hand before pasting. Oxygen, for example,does this for you when you paste.
The code to paste looks like this:
<map>
<title>Information Model</title>
<topicmeta>
<author>John Smith</author>
</topicmeta>
<topicref format="dita" href="c_RevisionHistory.dita"></topicref>
<topicref format="dita" href="c_Introduction.dita"></topicref>
...
</map>
Thanks!
Steve
Thanks, Clay and Paul...
Clay, your suggestion worked fine. However, after adding the menu choice to the Edit menu, it disappeared after I opened a document. I guess that is because the Edit menu changes depending on context. Do either of you have a way of making the new menu choice stick around?
Paul, your way seems more straightforward, but I like the idea of a single keystroke that pastes the clipboard as text. This way, we don't have to worry about "modes." (Am I in "paste as text" mode or "paste as XML" mode?). I find that users don't do well with modes, and research by Apple Computer confirms this. This is why the very first Macintosh (actually, the Lisa), used an insertion point cursorand did away with insert or overwrite modes.
I suppose I could write a small script that sets sgmlselection=off, does a paste (can I do that from a script?), and then sets sgmlselection back on, and I could map a key to that script.
May I ask you to comment, please?
Thanks!
In Reply to Paul Grosso: