Re: [Xsltforms-support] custom buttons in TinyMCE (4.3.12) with XSLTForms (638)
Brought to you by:
alain-couthures
From: C. M. Sperberg-M. <cm...@bl...> - 2017-02-06 16:15:16
|
> On Feb 5, 2017, at 2:38 PM, C. M. Sperberg-McQueen <cm...@bl...> wrote: > > Short description: I don't seem to be having any luck making custom > buttons work with TinyMCE in XSLTForms. Can anyone help? Perhaps I see the source of the problem. Looking at xsltforms.js this morning, I see that the function XsltForms_input.prototype.initInput unconditionally assigns a value to initinfo.setup; unless I am even more confused than usual, this will have the side effect of ignoring any value supplied by the user for the ’setup’ property of the TinyMCE initialization object. (That would explain why my buttons aren’t showing up.) I suppose one could simply say “If the user has supplied a setup() function, use it”, and make it the user’s responsibility to define the appropriate actions for the KeyUp, Change, Undo, and Redo events (by copying what’s in those lines of xsltforms.js). It might be cleaner to add a user hook to the default setup() function. That is, if the user supplies a property named (say) ‘Xsltforms_usersetup’ in the TinyMCE initialization object, then the default setup function calls that user-supplied function. What do you think? ******************************************** C. M. Sperberg-McQueen Black Mesa Technologies LLC cm...@bl... http://www.blackmesatech.com ******************************************** |