DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Copy and paste into DITA

  • gcrews

    Copy and paste into DITA

    Participants 0
    Replies 1
    Last Activity 8 years, 4 months ago

    XMetaL(R) Author Enterprise 7.0
    Version#: 7.0.0.111

    Is 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]

    Reply

    Derek Read

    Reply to: Copy and paste into DITA

    Since 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.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support