I've spent some time the last few days playing with the TinyMCE rich-text editor widget Alain has now integrated into XSLTForms. Congratulations and thanks to all who helped make that work!
It looks pretty promising in several ways, but I have run into one issue: when I try to add buttons to the toolbar, they do not appear. When I try the same Javascript code in TinyMCE by itself, however, they do. A TinyMCE-only example showing successful addition of buttons to the toolbox is at http://blackmesatech.com/2012/06/testcase/tinymce-test.xhtml In this example, I've added three buttons, for tagging the selection with the non-XHTML elements 'person', 'place', or 'org'. (Because I don't have suitable button images, I've used some randomly chosen emoticons from the TinyMCE 'emotions' plugin; the sunglasses are for the 'person' tag, the smiley for 'place', and the tongue-out face is for 'org'.) To use the new buttons, select some text and then click one of the buttons to tag it as a place, person, or organization name. Use the HTML code editor (the rightmost button) to see the tagging. (Eventually I hope to figure out how to make TinyMCE style the new elements so the tagging is visible, but that hasn't happened yet.) A parallel example showing TinyMCE running with XSLTForms is at http://blackmesatech.com/2012/06/testcase/xstlforms-test.xhtml As can be seen, the built-in buttons of the widget behave normally but the new buttons do not appear. At first I thought that this was, perhaps, just a failure to locate the image specified for the button, so I experimented with different ways of pointing to the GIF images, including an absolute URI. On reflection, I wonder whether the problem is a different one: my customization of TinyMCE relies on TinyMCE to run the setup() function I've specified when initializing a new editor, thus causing the new editor to run the AddButton() method. If the integration of TinyMCE with XSLTForms modifies the initialization of TinyMCE, the setup() function I've defined might not run at all. (This just occurred to me, so I have not yet actually tried putting a breakpoint into the Javascript to see if it runs.) Any ideas? If there is another better way to customize TinyMCE in the XSLTForms context, I'm happy to do this a different way. Thanks for any help anyone can give me. Michael Sperberg-McQueen -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net **************************************************************** ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Xsltforms-support mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xsltforms-support
