General XMetaL Discussion
jmillerfs February 22, 2011 at 10:24 pm
Insert->Inline Element dialog bypasses OnInsertElement scriptsFebruary 22, 2011 at 10:24 pmParticipants 1Replies 2Last Activity 11 years, 4 months ago
XMetal Author Enterprise Edition
We've run into an issue in which inserting elements from a particular dialog doesn't seem to be paying attention to our CTM and macro file customizations. We're trying to customize the insertion behavior of “pre” and “ph” elements (among several others) so that those elements are always inserted with a special child element.
By setting up OnInsertElement tags with InsertElemScript for these two element types (as well as overrides of the enter key, On_ElementList_Insert and On_ElementList_Surrond), we are able to achieve the desired behavior in most situations. However, when using the “Inline Element…” dialog (accessible from the Insert menu), XMetaL does not seem to use the InsertElemScript instructions or call any of our other macros. Mini-templates are also ignored.
Does anyone have any ideas about how we might be able to customize the behavior when inserting elements from this dialog?
Thanks.Derek Read February 23, 2011 at 12:42 am
Reply to: Insert->Inline Element dialog bypasses OnInsertElement scriptsFebruary 23, 2011 at 12:42 am
It sounds like you are customizing / extending the DITA authoring functionality. If so then what you are attempting to do is not something we support.
I'm not saying it is impossible to do in theory (in fact in some cases some things can be done fairly easily) however, the DITA functionality is not meant to be extended or modified in this fashion. The basic issue here is that the DITA authoring experience is itself a customization layer that is integrated into XMetaL Author and what you are probably trying to do is perform customization on top of that, or next to it. Some of the DITA editing functionality is done in CTM files but most of it is done through scripting and it will always (for the most part) win. Most likely you would need to start making modifications to the various .mcr and .js files that make up the DITA customization and that is not supported, and in the case of the “Inline Element…” dialog you might also need to make some changes to that particular XFT form (though the scripts that drive it are mostly externalized in .js files as well).
What I would recommend is that if the feature you wish to have might be of general use to all users of the product that you submit a feature request (through the regular support channels for either partners or clients) requesting the feature. If this looks more like a very specific feature (one that is not of general interest) then it might be possible to have our Professional Services team look into extending the DITA functionality for specific use cases.jmillerfs February 23, 2011 at 11:28 pm
Reply to: Insert->Inline Element dialog bypasses OnInsertElement scriptsFebruary 23, 2011 at 11:28 pm
Thanks Derek. With that information and understanding of the DITA authoring layer, I was able to locate the proper XFT file and am on the way to implementing the custom behavior.
- You must be logged in to reply to this topic.