Hello,
I am using TeamSite FormsPub (with tinyMCE) with SitePublisher to enable multi-lingual content. Content is stored in DCRs under templatedata and displayed via an external SitePublisher/Livesite component. I have a problem with links to pages within DCRs: i need to re-write them from:
href="/sites/sdc/lite/index.page"
to
href="$PAGE_LINK[lite/index]"
Looking into the tinyMce docco delivered with TeamSite (the html files, not the tinyMce chapter in the Formspub dev guide), i see that it is possible to define a custom js callback function for the insert link action (file $IW_HOME/httpd/iw/tinymce/docs/option_insertlink_callback.html), which sounds like just the ticket for what i am trying to do, but i can't get it to work.
Here's what i have tried:
- i have defined a custom config in $IW_HOME/httpd/iw/tinymce/config/custom_config.js, and pointed tinyMCE towards it in the external-editor-config attribute of the appropriate textarea element of my datacapture.cfg file. I know that's working because my toolbar customizations, etc, are being picked up.
- i have written a very simple function to act as the callback handler. Right now it just gives an alert
- try as i might, i cannot figure out how to get this function to be called. I have tried:
IWTinyMCECustomConfig("sdc_config", "insertlink_callback","myCBfunc");
(does nothing)
IWTinyMCECustomConfig("sdc_config", "insertlink_callback",myCBfunc);
(throws an error and stops tinyMce from loading.)
Does anybody have any idea what i am doing wrong? The docco says to use a syntax like:
tinyMCE.init({
insertlink_callback : "myCBfunc"
});
... but i can't see where to put this. If i put it in the custom_config.js file it throws an error saying that tinyMCE is not defined??
Thanks in advance for any help or insights you may have.
Regards,
/t