Hi Alain,
Just checking in on this issue. You said you already had a fix? Any
chance I can get a patched xsltforms.js?
Thanks for your help,
-Winona


On Mon, Jan 22, 2024 at 10:07 AM Winona Salesky <wsale...@gmail.com> wrote:
>
> Hi Alain,
> Thanks for getting back to me and for working on a fix, that will be so 
> helpful.
> I did try the latest version of XSLTForms, but it required a lot of rewriting 
> of the forms I already had and I was pressed for time. I hope to have time in 
> the near future to take another look.
> -Winona
>
>
> On Sun, Jan 21, 2024 at 3:13 PM Alain Couthures 
> <alain.couthu...@agencexml.com> wrote:
>>
>> Hi Winona,
>>
>> This issue is due to remaining ids in dependencies which should have been 
>> removed when unloading the subform.
>>
>> I have already a workaround for preventing the exception. I will look for a 
>> fix as soon as possible.
>>
>> I will probably not release some 1.3.1 release but I will send you a patched 
>> xsltforms.js instead.
>>
>> Please give a try to latest XSLTForms release to help me to locate other 
>> issues.
>>
>> --Alain
>>
>> Le 15/01/2024 17:19 CET, Winona Salesky <wsale...@gmail.com> a écrit :
>>
>>
>> Hi Alain,
>> Thank you so much for all your help with my XForms. I'm having some trouble 
>> integrating the TinyMCE example into my much more complex forms set up. I 
>> have tried to create a simplified example that still produces the error I am 
>> getting. Any chance you could help me debug this?
>> Example here: 
>> https://gist.github.com/wsalesky/d24ce3ebcbc00f673b3d4a44202cb83b
>>
>> If I choose the msContents subform from the menu, the TinyMCE text editor 
>> works as expected, I can then toggle to my other subform (msIdentifier), but 
>> if I then attempt to toggle back to the msContents form again I get the 
>> following error (XSLTForms v 1.3):
>>
>> XSLTForms Exception
>> Error dispatching event 'forms-revalidate' :
>> TypeError: Cannot read properties of undefined (reading 'length') at new 
>> XsltForms_exprContext(../xsltforms.js:4121:43)
>>
>>
>> Toggling between these subforms without the TinyMCE additions work without 
>> error, but I'm unsure what exactly is causing the error with the addition of 
>> the TinyMCE code. Do you have any suggestions or insights?
>> Thank you again for your help,
>> -Winona
>>
>>
>>
>>
>>
>> On Wed, Jan 3, 2024 at 9:13 AM Winona Salesky <wsale...@gmail.com> wrote:
>>
>> 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 
>> <alain.couthu...@agencexml.com> 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 <wsale...@gmail.com> 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 
>> <alain.couthu...@agencexml.com> 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 <wsale...@gmail.com> 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 Xsltforms-support@lists.sourceforge.net 
>> https://lists.sourceforge.net/lists/listinfo/xsltforms-support


_______________________________________________
Xsltforms-support mailing list
Xsltforms-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to