Re: [Xsltforms-support] Rich Text Editor
Brought to you by:
alain-couthures
From: Winona S. <wsa...@gm...> - 2024-01-03 14:14:04
|
Hi Alain, That did fix the example. Thank you. I think I have misunderstood the use of the XForms binding. So I will do a little research and see if I can get them working correctly on my more complex version of the form, which has the summary element at many different levels in the TEI record. -Winona On Wed, Jan 3, 2024 at 5:13 AM Alain Couthures < ala...@ag...> wrote: > Hi Winona, > > Looking at the simplified example, it appears that the new record does not > have the very same structure: the document root is named "TEI" with a child > named "data" whilst the pre-loaded document has the "data" element as root. > > XForms bindings are context dependant, they are not like XSLT template > match attribute values. > > Whether subforms are used should not interfere with bindings. > > Thank you for your feedback! > > --Alain > > Le 03/01/2024 00:54 CET, Winona Salesky <wsa...@gm...> a écrit : > > > Hi Alain, > This sort of works. Here is an example of multiple text editors working: > https://gist.github.com/wsalesky/00b872cd91c99344a030f0e667cb9e35 > > However, when I try to use this in my actual forms I run into issue. I > think it is because my data is loaded after the form is loaded. The user is > presented with a main form that allows them to search for records or load a > 'template' record into the form. If the data is pre-loaded, the tinyMCE > editor works, once I select and load a new record, the textarea are > displayed a regular textareas, not as tinyMCE editors. > Here is a simplified example: > https://gist.github.com/wsalesky/bf6b25b50b082c8f0bd8dcf7e7b1eaf2 > > Any thoughts on how to solve this issue? Also, many of my textareas that I > want editable will be in subforms. Not sure if that adds another layer of > complication or not. > Thanks! > -Winona > > > On Sun, Dec 31, 2023 at 8:00 AM Alain Couthures < > ala...@ag...> wrote: > > Hi Winona, > > Sorry for the delay. > > Please have a look at the tinymce.xml sample ( > https://github.com/AlainCouthures/declarative4all/blob/master/public/samples/tinymce.xml). > > > Because of compatibility issues between tinymce versions, it is required > to add data-uri and data-version attributes to allow XSLTForms to properly > manage the rich text editors. In the sample: > <script type="text/javascript" src="js/tinymce_4.5.3/tinymce.min.js" > data-uri="http://www.tinymce.com" data-version="4.5.3">/* */</script> > > In next release, XSLTForms will also check "tinymce.majorVersion + '.' + > tinymce.minorVersion", as suggested by ChatGPT ;-) > > After upgrading the repeat test case accordingly, it works as expected for > me! > > Thank you for your feedback! > > --Alain > > Le 17/12/2023 19:30 CET, Winona Salesky <wsa...@gm...> a écrit : > > > Hi All, > I'm looking into adding a rich text editor to my textarea's. I was trying > to experiment with this example: > http://www.agencexml.com/xsltforms/tinymce.xml > > But have had some trouble getting it working. My use case would include > multiple textarea's almost all of them appearing in a nested repeat > structure. I found this on the list ( > https://sourceforge.net/p/xsltforms/mailman/xsltforms-support/thread/A6AB89C8-E8E0-49C3-965F-65464934B94D%40basex.org/#msg30316903) > which suggests repeats could be a problem. Has this been solved? Has anyone > integrated a text editor into their XForms? I can mock up a > simplified example of what I am trying to do if that would be useful, but > I'm mostly looking for examples for how someone else may have solved this > issue. > > Thanks! > -Winona > > _______________________________________________ Xsltforms-support mailing > list Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > |