DITA and XMetaL Discussion
XMetaL Community Forum › DITA and XMetaL Discussion › Copy and paste into DITA
-
gcrews February 21, 2013 at 6:18 pm
Copy and paste into DITA
February 21, 2013 at 6:18 pmParticipants 0Replies 1Last Activity 9 years, 11 months agoXMetaL(R) Author Enterprise 7.0
Version#: 7.0.0.111Is it possible to modify copy and pasted code from an HTML webpage? Specifically, I want to be able to “map” an HTML tag to a DITA on a copy and paste operation. For example, change
to
instead of stripping the tag out. I created the following macro but the DropText only seems to only contain text and no tags or anything. [code]
function dropTextMod () {
var strDrop = ActiveDocument.DropText;
Application.Alert(strDrop);
}
dropTextMod();
]]>
[/code]Derek Read February 21, 2013 at 7:59 pm
Reply to: Copy and paste into DITA
February 21, 2013 at 7:59 pmSince there is already HTML conversion in our DITA functionality it would probably be best (though dangerous) to extend the existing code using your own logic. That way there is a greater chance that your code will work. Of course this would be unsupported since this part of the system is considered closed.
Note that the current code is quite messy. The initial design and logic was migrated from another project and then because end users should never see it it was never “made nice”. So, there are things in there that do nothing and probably some questionable logic as well. Ultimately I'd like to see it rewritten so that it is possible for people like yourself to inject additional logic, but since it is “good enough” that might be a hard sell.
-
AuthorPosts
- You must be logged in to reply to this topic.