Thread: [Xsltforms-support] TinyMCE
Brought to you by:
alain-couthures
From: Mark L. <tin...@gm...> - 2014-04-09 21:30:40
|
Hi, I’m getting an odd error with the TinyMCE example at http://www.agencexml.com/xsltforms/tinymce.xml When I load it into Safari 7.03 I get the following : TypeError: 'null' is not an object (evaluating 's.getRng') If I dismiss the alert, everything works ok though. Any ideas? Rgds, Mark Lawson |
From: Mark B. <ma...@te...> - 2015-03-24 11:38:07
|
Apologies if the following reflects the fact that I don’t follow this list closely. Returning to xsltforms to update an old site, I find that TinyMCE in our site is very broken, and the example at http://www.agencexml.com/xsltforms/tinymce.xml (r595) shows the same symptoms. The first carriage return generates an extra <p> </p> and each subsequent keystroke generates the character keyed together with a <p> tag. This is true in Safari, Chrome and Firefox. This doesn’t seem to be in the issues list in GitHub or SourceForge (which is canonical?). Thanks for any help. -- Mark Barratt |
From: Alain C. <ala...@ag...> - 2015-03-25 21:06:07
|
Hello Mark, I have now added support for TinyMCE 4.X in latest build on source repositories and I have updated www.agencexml.com accordingly. Thank you for your feed back! --Alain Le 24/03/2015 12:14, Mark Barratt a écrit : > Apologies if the following reflects the fact that I don’t follow this list closely. > > Returning to xsltforms to update an old site, I find that TinyMCE in our site is very broken, and the example at http://www.agencexml.com/xsltforms/tinymce.xml (r595) shows the same symptoms. The first carriage return generates an extra <p> </p> and each subsequent keystroke generates the character keyed together with a <p> tag. This is true in Safari, Chrome and Firefox. > > This doesn’t seem to be in the issues list in GitHub or SourceForge (which is canonical?). > > Thanks for any help. > > -- > Mark Barratt > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Mark B. <ma...@te...> - 2015-03-26 11:32:58
|
Thank you, Alain This community is really lucky to have you. We do realise and appreciate it. best Mark > On 25 Mar 2015, at 20:53, Alain Couthures <ala...@ag...> wrote: > > Hello Mark, > > I have now added support for TinyMCE 4.X in latest build on source repositories and I have updated www.agencexml.com accordingly. > > Thank you for your feed back! > > --Alain > > Le 24/03/2015 12:14, Mark Barratt a écrit : >> Apologies if the following reflects the fact that I don’t follow this list closely. >> >> Returning to xsltforms to update an old site, I find that TinyMCE in our site is very broken, and the example at http://www.agencexml.com/xsltforms/tinymce.xml (r595) shows the same symptoms. The first carriage return generates an extra <p> </p> and each subsequent keystroke generates the character keyed together with a <p> tag. This is true in Safari, Chrome and Firefox. >> >> This doesn’t seem to be in the issues list in GitHub or SourceForge (which is canonical?). >> >> Thanks for any help. >> >> -- >> Mark Barratt >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming The Go Parallel Website, sponsored >> by Intel and developed in partnership with Slashdot Media, is your hub for all >> things parallel software development, from weekly thought leadership blogs to >> news, videos, case studies, tutorials and more. Take a look and join the >> conversation now. http://goparallel.sourceforge.net/ >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support > -- Mark Barratt Text Matters We help explain things using design | language | systems | process improvement ma...@te... | +44 (0)118 986 8313 http://www.textmatters.com | Twitter @mark_barratt | Skype mark_barratt |
From: Kristian K. <kri...@ek...> - 2015-05-04 05:54:58
|
Hello! I wanted to try out TinyMCE but I can't find the new version in the repositories. I have struggled quite some hours now going through the files I get from Git clone and SVN checkout of the SourceForge repository[1]. Still I can't find anything else than version 3.4.6 of TinyMCE. I also set up the tXs building system and built the three main components but this didn't do the trick, obviously perhaps. How can I find the latest build in the source repository? Greetings Kristian K [1] http://sourceforge.net/p/xsltforms/code/ci/master/tree/ and http://sourceforge.net/p/xsltforms/svn/HEAD/tree/ 25.03.2015 22:53, Alain Couthures kirjutas: > Hello Mark, > > I have now added support for TinyMCE 4.X in latest build on source > repositories and I have updated www.agencexml.com accordingly. > > Thank you for your feed back! > > --Alain > > Le 24/03/2015 12:14, Mark Barratt a écrit : >> Apologies if the following reflects the fact that I don’t follow this list closely. >> >> Returning to xsltforms to update an old site, I find that TinyMCE in our site is very broken, and the example at http://www.agencexml.com/xsltforms/tinymce.xml (r595) shows the same symptoms. The first carriage return generates an extra <p> </p> and each subsequent keystroke generates the character keyed together with a <p> tag. This is true in Safari, Chrome and Firefox. >> >> This doesn’t seem to be in the issues list in GitHub or SourceForge (which is canonical?). >> >> Thanks for any help. >> >> -- >> Mark Barratt >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming The Go Parallel Website, sponsored >> by Intel and developed in partnership with Slashdot Media, is your hub for all >> things parallel software development, from weekly thought leadership blogs to >> news, videos, case studies, tutorials and more. Take a look and join the >> conversation now. http://goparallel.sourceforge.net/ >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: Alain C. <ala...@ag...> - 2015-05-04 17:47:58
|
Hello Kristian, I will add a supported version of TinyMCE in repositories soon. If you look at source of http://www.agencexml.com/xsltforms/tinymce.xml, you will see this line: <script type="text/javascript" src="xsltforms/scripts/tinymce_4.0.21/tinymce.min.js <http://www.agencexml.com/xsltforms/xsltforms/scripts/tinymce_4.0.21/tinymce.min.js>" data-uri="http://www.tinymce.com" data-version="4.0.21">/* */</script> I am confident that latest TinyMCE version should work with XSLTForms as 4.0.21 does. Thank you for your feedback! --Alain Le 04/05/2015 07:54, Kristian Kankainen a écrit : > Hello! > > I wanted to try out TinyMCE but I can't find the new version in the > repositories. I have struggled quite some hours now going through the > files I get from Git clone and SVN checkout of the SourceForge > repository[1]. Still I can't find anything else than version 3.4.6 of > TinyMCE. I also set up the tXs building system and built the three main > components but this didn't do the trick, obviously perhaps. > > How can I find the latest build in the source repository? > > Greetings > Kristian K > > [1] http://sourceforge.net/p/xsltforms/code/ci/master/tree/ and > http://sourceforge.net/p/xsltforms/svn/HEAD/tree/ > > |
From: Kristian K. <kri...@ek...> - 2015-05-05 06:39:23
|
Thank you Alain! I got it working now with the latest code from the repository and the latest stable tinymce. What I don't understand is why TinyMCE doesn't interpret the <p> tags I have in my nodeset that is bound to the textarea? The XML is read in to the instance using <xforms:instance src="myfile.xml"> and looking at the element that the nodeset bound to TinyMCE it does include several <p> elements, but only the text nodes are copied to the editor. Is this because of XPath and how should I get around it? All the best wishes Kristian 04.05.2015 20:47, Alain Couthures kirjutas: > Hello Kristian, > > I will add a supported version of TinyMCE in repositories soon. > > If you look at source of > http://www.agencexml.com/xsltforms/tinymce.xml, you will see this line: > > <script type="text/javascript" > src="xsltforms/scripts/tinymce_4.0.21/tinymce.min.js > <http://www.agencexml.com/xsltforms/xsltforms/scripts/tinymce_4.0.21/tinymce.min.js>" > data-uri="http://www.tinymce.com" data-version="4.0.21">/* */</script> > > I am confident that latest TinyMCE version should work with XSLTForms > as 4.0.21 does. > > Thank you for your feedback! > > --Alain > > Le 04/05/2015 07:54, Kristian Kankainen a écrit : >> Hello! >> >> I wanted to try out TinyMCE but I can't find the new version in the >> repositories. I have struggled quite some hours now going through the >> files I get from Git clone and SVN checkout of the SourceForge >> repository[1]. Still I can't find anything else than version 3.4.6 of >> TinyMCE. I also set up the tXs building system and built the three main >> components but this didn't do the trick, obviously perhaps. >> >> How can I find the latest build in the source repository? >> >> Greetings >> Kristian K >> >> [1]http://sourceforge.net/p/xsltforms/code/ci/master/tree/ and >> http://sourceforge.net/p/xsltforms/svn/HEAD/tree/ >> >> > |
From: Alain C. <ala...@ag...> - 2015-05-06 19:39:29
|
Hello Kristian, Could you please post an explicit test case? Textarea content should be a serialization (with < and >), not effective tags (with < and >). Regards, --Alain Le 05/05/2015 08:39, Kristian Kankainen a écrit : > Thank you Alain! > > I got it working now with the latest code from the repository and the > latest stable tinymce. > > What I don't understand is why TinyMCE doesn't interpret the <p> tags > I have in my nodeset that is bound to the textarea? > > The XML is read in to the instance using <xforms:instance > src="myfile.xml"> and looking at the element that the nodeset bound to > TinyMCE it does include several <p> elements, but only the text nodes > are copied to the editor. Is this because of XPath and how should I > get around it? > > All the best wishes > Kristian > > 04.05.2015 20:47, Alain Couthures kirjutas: >> Hello Kristian, >> >> I will add a supported version of TinyMCE in repositories soon. >> >> If you look at source of >> http://www.agencexml.com/xsltforms/tinymce.xml, you will see this line: >> >> <script type="text/javascript" >> src="xsltforms/scripts/tinymce_4.0.21/tinymce.min.js >> <http://www.agencexml.com/xsltforms/xsltforms/scripts/tinymce_4.0.21/tinymce.min.js>" >> data-uri="http://www.tinymce.com" data-version="4.0.21">/* */</script> >> >> I am confident that latest TinyMCE version should work with XSLTForms >> as 4.0.21 does. >> >> Thank you for your feedback! >> >> --Alain >> >> Le 04/05/2015 07:54, Kristian Kankainen a écrit : >>> Hello! >>> >>> I wanted to try out TinyMCE but I can't find the new version in the >>> repositories. I have struggled quite some hours now going through the >>> files I get from Git clone and SVN checkout of the SourceForge >>> repository[1]. Still I can't find anything else than version 3.4.6 of >>> TinyMCE. I also set up the tXs building system and built the three main >>> components but this didn't do the trick, obviously perhaps. >>> >>> How can I find the latest build in the source repository? >>> >>> Greetings >>> Kristian K >>> >>> [1]http://sourceforge.net/p/xsltforms/code/ci/master/tree/ and >>> http://sourceforge.net/p/xsltforms/svn/HEAD/tree/ >>> >>> >> > |
From: Kristian K. <kri...@ek...> - 2015-05-14 21:39:37
|
Hello again! Okey, I now understood and accepted that the content has to be serialized. But I now get un-clean input from the TinyMCE equipped fields. I get (serialized) <br data-mce-bogus="1"> elements saved in my database. I understand TinyMCE uses these elements internally so that users can put the cursor inside empty elements when clicking. But these bogus elements should be automatically cleaned away before the form data gets sent to the server! Reading the whole thread about the problem, this post [1] by the main developer says that: > Use the proper API:s tinymce.activeEditor.getContent() or save etc. > Raw HTML should never be stored or extracted. TinyMCE never produces > any internal data-mce-bogus output if you use our methods for content > extraction. Could this be the problem in XSLTForms, that the proper API isn't used? I'm sorry I can't look at the code myself. This is my TinyMCE config in XSLTForms: > <schema xmlns="http://www.w3.org/2001/XMLSchema" > targetNamespace="http://www.agencexml.com/xsltforms/rte"> > <simpleType name="standardHTML"> > <restriction base="xf:HTMLFragment" xsltforms:rte="TinyMCE"/> > <annotation> > <appinfo> > { > element_format : "xhtml", > browser_spellcheck: true, > entity_encoding: "numeric", > cleanup: true, > plugins: [ > "autolink lists link charmap", > "searchreplace code fullscreen", > "insertdatetime paste" > ], > toolbar: "undo redo | bold italic underline | > alignleft aligncenter alignright alignjustify | bullist numlist > outdent indent | link | charmap", > statusbar : false > } > </appinfo> > </annotation> > </simpleType> > </schema> I use version 4.1.9 of TinyMCE and I think the XSLTForms code is version 614. Can I send some more information for reproducing this? Thank you in advance Kristian K [1] http://www.tinymce.com/forum/viewtopic.php?pid=109291#p109291 06.05.2015 22:39, Alain Couthures kirjutas: > Hello Kristian, > > Could you please post an explicit test case? Textarea content should > be a serialization (with < and >), not effective tags (with < > and >). > > Regards, > > --Alain > > Le 05/05/2015 08:39, Kristian Kankainen a écrit : >> Thank you Alain! >> >> I got it working now with the latest code from the repository and the >> latest stable tinymce. >> >> What I don't understand is why TinyMCE doesn't interpret the <p> tags >> I have in my nodeset that is bound to the textarea? >> >> The XML is read in to the instance using <xforms:instance >> src="myfile.xml"> and looking at the element that the nodeset bound >> to TinyMCE it does include several <p> elements, but only the text >> nodes are copied to the editor. Is this because of XPath and how >> should I get around it? >> >> All the best wishes >> Kristian >> >> 04.05.2015 20:47, Alain Couthures kirjutas: >>> Hello Kristian, >>> >>> I will add a supported version of TinyMCE in repositories soon. >>> >>> If you look at source of >>> http://www.agencexml.com/xsltforms/tinymce.xml, you will see this line: >>> >>> <script type="text/javascript" >>> src="xsltforms/scripts/tinymce_4.0.21/tinymce.min.js >>> <http://www.agencexml.com/xsltforms/xsltforms/scripts/tinymce_4.0.21/tinymce.min.js>" >>> data-uri="http://www.tinymce.com" data-version="4.0.21">/* */</script> >>> >>> I am confident that latest TinyMCE version should work with >>> XSLTForms as 4.0.21 does. >>> >>> Thank you for your feedback! >>> >>> --Alain >>> >>> Le 04/05/2015 07:54, Kristian Kankainen a écrit : >>>> Hello! >>>> >>>> I wanted to try out TinyMCE but I can't find the new version in the >>>> repositories. I have struggled quite some hours now going through the >>>> files I get from Git clone and SVN checkout of the SourceForge >>>> repository[1]. Still I can't find anything else than version 3.4.6 of >>>> TinyMCE. I also set up the tXs building system and built the three main >>>> components but this didn't do the trick, obviously perhaps. >>>> >>>> How can I find the latest build in the source repository? >>>> >>>> Greetings >>>> Kristian K >>>> >>>> [1]http://sourceforge.net/p/xsltforms/code/ci/master/tree/ and >>>> http://sourceforge.net/p/xsltforms/svn/HEAD/tree/ >>>> >>>> >>> >> > |
From: Alain C. <ala...@ag...> - 2015-05-18 20:26:39
|
Hello Kristian, This forum post seems too old to be related to TinyMCE4. With TinyMCE3, the getContent() method worked perfectly for each event that XSLTForms has to capture. Unfortunately, with TinyMCE4, there is a major issue using this method as soon as a new line is entered... That is why I had to search for an alternative solution and the innerHTML property seems good enough except for some extra attributes that you have noticed. Do you think that some regular expression could remove them? --Alain Le 14/05/2015 23:39, Kristian Kankainen a écrit : > Hello again! > > Okey, I now understood and accepted that the content has to be > serialized. But I now get un-clean input from the TinyMCE equipped fields. > > I get (serialized) <br data-mce-bogus="1"> elements saved in my > database. I understand TinyMCE uses these elements internally so that > users can put the cursor inside empty elements when clicking. But > these bogus elements should be automatically cleaned away before the > form data gets sent to the server! > Reading the whole thread about the problem, this post [1] by the main > developer says that: >> Use the proper API:s tinymce.activeEditor.getContent() or save etc. >> Raw HTML should never be stored or extracted. TinyMCE never produces >> any internal data-mce-bogus output if you use our methods for content >> extraction. > > Could this be the problem in XSLTForms, that the proper API isn't > used? I'm sorry I can't look at the code myself. This is my TinyMCE > config in XSLTForms: >> <schema xmlns="http://www.w3.org/2001/XMLSchema" >> targetNamespace="http://www.agencexml.com/xsltforms/rte"> >> <simpleType name="standardHTML"> >> <restriction base="xf:HTMLFragment" xsltforms:rte="TinyMCE"/> >> <annotation> >> <appinfo> >> { >> element_format : "xhtml", >> browser_spellcheck: true, >> entity_encoding: "numeric", >> cleanup: true, >> plugins: [ >> "autolink lists link charmap", >> "searchreplace code fullscreen", >> "insertdatetime paste" >> ], >> toolbar: "undo redo | bold italic underline | >> alignleft aligncenter alignright alignjustify | bullist numlist >> outdent indent | link | charmap", >> statusbar : false >> } >> </appinfo> >> </annotation> >> </simpleType> >> </schema> > I use version 4.1.9 of TinyMCE and I think the XSLTForms code is > version 614. > > Can I send some more information for reproducing this? > > Thank you in advance > Kristian K > > [1] http://www.tinymce.com/forum/viewtopic.php?pid=109291#p109291 > |
From: Kristian K. <kri...@ek...> - 2015-05-19 11:56:57
|
The thing that irritate me the most with these bogus elements, is that they seem not be valid according to my TinyMCE settings. Since I keep getting <br> instead of <br /> I can't parse the input as XML. My current solution is to delete (in the serialised string) the bogus elements, convert <br> to <br/> and then parse the (hopefully valid) xml and delete all the rest of the @data-mce* attributes. This is very fragile and I would insist in using the API method since that is what it is there for... What is the major issue using it in XSLTForms? Looking at the TinyMCE4 API documentation it doesn't seem to have changed and is still the supposed way of getting "clean" content from the editor. Kristian 18.05.2015 23:26, Alain Couthures kirjutas: > Hello Kristian, > > This forum post seems too old to be related to TinyMCE4. With > TinyMCE3, the getContent() method worked perfectly for each event that > XSLTForms has to capture. Unfortunately, with TinyMCE4, there is a > major issue using this method as soon as a new line is entered... > > That is why I had to search for an alternative solution and the > innerHTML property seems good enough except for some extra attributes > that you have noticed. Do you think that some regular expression could > remove them? > > --Alain > > Le 14/05/2015 23:39, Kristian Kankainen a écrit : >> Hello again! >> >> Okey, I now understood and accepted that the content has to be >> serialized. But I now get un-clean input from the TinyMCE equipped >> fields. >> >> I get (serialized) <br data-mce-bogus="1"> elements saved in my >> database. I understand TinyMCE uses these elements internally so that >> users can put the cursor inside empty elements when clicking. But >> these bogus elements should be automatically cleaned away before the >> form data gets sent to the server! >> Reading the whole thread about the problem, this post [1] by the main >> developer says that: >>> Use the proper API:s tinymce.activeEditor.getContent() or save etc. >>> Raw HTML should never be stored or extracted. TinyMCE never produces >>> any internal data-mce-bogus output if you use our methods for >>> content extraction. >> >> Could this be the problem in XSLTForms, that the proper API isn't >> used? I'm sorry I can't look at the code myself. This is my TinyMCE >> config in XSLTForms: >>> <schema xmlns="http://www.w3.org/2001/XMLSchema" >>> targetNamespace="http://www.agencexml.com/xsltforms/rte"> >>> <simpleType name="standardHTML"> >>> <restriction base="xf:HTMLFragment" xsltforms:rte="TinyMCE"/> >>> <annotation> >>> <appinfo> >>> { >>> element_format : "xhtml", >>> browser_spellcheck: true, >>> entity_encoding: "numeric", >>> cleanup: true, >>> plugins: [ >>> "autolink lists link charmap", >>> "searchreplace code fullscreen", >>> "insertdatetime paste" >>> ], >>> toolbar: "undo redo | bold italic underline | >>> alignleft aligncenter alignright alignjustify | bullist numlist >>> outdent indent | link | charmap", >>> statusbar : false >>> } >>> </appinfo> >>> </annotation> >>> </simpleType> >>> </schema> >> I use version 4.1.9 of TinyMCE and I think the XSLTForms code is >> version 614. >> >> Can I send some more information for reproducing this? >> >> Thank you in advance >> Kristian K >> >> [1] http://www.tinymce.com/forum/viewtopic.php?pid=109291#p109291 >> > |
From: Alain C. <ala...@ag...> - 2015-05-19 20:14:25
|
Hello Kristian, I think that I have just found a workaround for the getContent() issue with TinyMCE4 when adding a line: I have added a test to avoid useless setContent() call when value is actually unchanged... Please have a look at latest revision (rev.615). Thank you for your feedback! --Alain Le 19/05/2015 10:12, Kristian Kankainen a écrit : > The thing that irritate me the most with these bogus elements, is that > they seem not be valid according to my TinyMCE settings. Since I keep > getting <br> instead of <br /> I can't parse the input as XML. > > My current solution is to delete (in the serialised string) the bogus > elements, convert <br> to <br/> and then parse the (hopefully valid) > xml and delete all the rest of the @data-mce* attributes. > > This is very fragile and I would insist in using the API method since > that is what it is there for... What is the major issue using it in > XSLTForms? Looking at the TinyMCE4 API documentation it doesn't seem > to have changed and is still the supposed way of getting "clean" > content from the editor. > > Kristian > > 18.05.2015 23:26, Alain Couthures kirjutas: >> Hello Kristian, >> >> This forum post seems too old to be related to TinyMCE4. With >> TinyMCE3, the getContent() method worked perfectly for each event >> that XSLTForms has to capture. Unfortunately, with TinyMCE4, there is >> a major issue using this method as soon as a new line is entered... >> >> That is why I had to search for an alternative solution and the >> innerHTML property seems good enough except for some extra attributes >> that you have noticed. Do you think that some regular expression >> could remove them? >> >> --Alain >> >> Le 14/05/2015 23:39, Kristian Kankainen a écrit : >>> Hello again! >>> >>> Okey, I now understood and accepted that the content has to be >>> serialized. But I now get un-clean input from the TinyMCE equipped >>> fields. >>> >>> I get (serialized) <br data-mce-bogus="1"> elements saved in my >>> database. I understand TinyMCE uses these elements internally so >>> that users can put the cursor inside empty elements when clicking. >>> But these bogus elements should be automatically cleaned away before >>> the form data gets sent to the server! >>> Reading the whole thread about the problem, this post [1] by the >>> main developer says that: >>>> Use the proper API:s tinymce.activeEditor.getContent() or save etc. >>>> Raw HTML should never be stored or extracted. TinyMCE never >>>> produces any internal data-mce-bogus output if you use our methods >>>> for content extraction. >>> >>> Could this be the problem in XSLTForms, that the proper API isn't >>> used? I'm sorry I can't look at the code myself. This is my TinyMCE >>> config in XSLTForms: >>>> <schema xmlns="http://www.w3.org/2001/XMLSchema" >>>> targetNamespace="http://www.agencexml.com/xsltforms/rte"> >>>> <simpleType name="standardHTML"> >>>> <restriction base="xf:HTMLFragment" xsltforms:rte="TinyMCE"/> >>>> <annotation> >>>> <appinfo> >>>> { >>>> element_format : "xhtml", >>>> browser_spellcheck: true, >>>> entity_encoding: "numeric", >>>> cleanup: true, >>>> plugins: [ >>>> "autolink lists link charmap", >>>> "searchreplace code fullscreen", >>>> "insertdatetime paste" >>>> ], >>>> toolbar: "undo redo | bold italic underline | >>>> alignleft aligncenter alignright alignjustify | bullist numlist >>>> outdent indent | link | charmap", >>>> statusbar : false >>>> } >>>> </appinfo> >>>> </annotation> >>>> </simpleType> >>>> </schema> >>> I use version 4.1.9 of TinyMCE and I think the XSLTForms code is >>> version 614. >>> >>> Can I send some more information for reproducing this? >>> >>> Thank you in advance >>> Kristian K >>> >>> [1] http://www.tinymce.com/forum/viewtopic.php?pid=109291#p109291 >>> >> > |
From: Kristian K. <kri...@ek...> - 2015-05-21 19:38:44
|
I now removed the TinyMCE fields from my production code and moved it to a development branch. Thus it is unclear when I can give you further feedback. Since the html I got from the tinymce editor isn't xhtml I need to solve the problem of having html as textual data in my xml. Right now I got tired of the problem and reverted back to pure text instead. The text get's converted into <p>aragraphs in my xml database, thus searching for example a string in the second paragraph is easily done with XPath. With the html it became a nightmare :( If anyone has good pointers for best practices on handling (non-xml) html inside xml, I'm eager to read and learn. Thank you very much, Alain. I will try to get back to TinyMCE, it would help my users but now it seriously impacted and started to tear on my XRX design. Kristian 19.05.2015 23:14, Alain Couthures kirjutas: > Hello Kristian, > > I think that I have just found a workaround for the getContent() issue > with TinyMCE4 when adding a line: I have added a test to avoid useless > setContent() call when value is actually unchanged... > > Please have a look at latest revision (rev.615). > > Thank you for your feedback! > > --Alain > > Le 19/05/2015 10:12, Kristian Kankainen a écrit : >> The thing that irritate me the most with these bogus elements, is >> that they seem not be valid according to my TinyMCE settings. Since I >> keep getting <br> instead of <br /> I can't parse the input as XML. >> >> My current solution is to delete (in the serialised string) the bogus >> elements, convert <br> to <br/> and then parse the (hopefully valid) >> xml and delete all the rest of the @data-mce* attributes. >> >> This is very fragile and I would insist in using the API method since >> that is what it is there for... What is the major issue using it in >> XSLTForms? Looking at the TinyMCE4 API documentation it doesn't seem >> to have changed and is still the supposed way of getting "clean" >> content from the editor. >> >> Kristian >> >> 18.05.2015 23:26, Alain Couthures kirjutas: >>> Hello Kristian, >>> >>> This forum post seems too old to be related to TinyMCE4. With >>> TinyMCE3, the getContent() method worked perfectly for each event >>> that XSLTForms has to capture. Unfortunately, with TinyMCE4, there >>> is a major issue using this method as soon as a new line is entered... >>> >>> That is why I had to search for an alternative solution and the >>> innerHTML property seems good enough except for some extra >>> attributes that you have noticed. Do you think that some regular >>> expression could remove them? >>> >>> --Alain >>> >>> Le 14/05/2015 23:39, Kristian Kankainen a écrit : >>>> Hello again! >>>> >>>> Okey, I now understood and accepted that the content has to be >>>> serialized. But I now get un-clean input from the TinyMCE equipped >>>> fields. >>>> >>>> I get (serialized) <br data-mce-bogus="1"> elements saved in my >>>> database. I understand TinyMCE uses these elements internally so >>>> that users can put the cursor inside empty elements when clicking. >>>> But these bogus elements should be automatically cleaned away >>>> before the form data gets sent to the server! >>>> Reading the whole thread about the problem, this post [1] by the >>>> main developer says that: >>>>> Use the proper API:s tinymce.activeEditor.getContent() or save >>>>> etc. Raw HTML should never be stored or extracted. TinyMCE never >>>>> produces any internal data-mce-bogus output if you use our methods >>>>> for content extraction. >>>> >>>> Could this be the problem in XSLTForms, that the proper API isn't >>>> used? I'm sorry I can't look at the code myself. This is my TinyMCE >>>> config in XSLTForms: >>>>> <schema xmlns="http://www.w3.org/2001/XMLSchema" >>>>> targetNamespace="http://www.agencexml.com/xsltforms/rte"> >>>>> <simpleType name="standardHTML"> >>>>> <restriction base="xf:HTMLFragment" >>>>> xsltforms:rte="TinyMCE"/> >>>>> <annotation> >>>>> <appinfo> >>>>> { >>>>> element_format : "xhtml", >>>>> browser_spellcheck: true, >>>>> entity_encoding: "numeric", >>>>> cleanup: true, >>>>> plugins: [ >>>>> "autolink lists link charmap", >>>>> "searchreplace code fullscreen", >>>>> "insertdatetime paste" >>>>> ], >>>>> toolbar: "undo redo | bold italic underline | >>>>> alignleft aligncenter alignright alignjustify | bullist numlist >>>>> outdent indent | link | charmap", >>>>> statusbar : false >>>>> } >>>>> </appinfo> >>>>> </annotation> >>>>> </simpleType> >>>>> </schema> >>>> I use version 4.1.9 of TinyMCE and I think the XSLTForms code is >>>> version 614. >>>> >>>> Can I send some more information for reproducing this? >>>> >>>> Thank you in advance >>>> Kristian K >>>> >>>> [1] http://www.tinymce.com/forum/viewtopic.php?pid=109291#p109291 >>>> >>> >> > |
From: Alain C. <ala...@ag...> - 2015-05-26 20:06:13
|
Hello Kristian, Converting HTML into XHTML is not very difficult and I have already coded this in Javascript sometimes ago. After that, the parse() XPath function can be used to integrate the result from the RTE into an instance. Please don't hesitate to contact me back if you need this after all. --Alain Le 21/05/2015 21:38, Kristian Kankainen a écrit : > I now removed the TinyMCE fields from my production code and moved it > to a development branch. Thus it is unclear when I can give you > further feedback. Since the html I got from the tinymce editor isn't > xhtml I need to solve the problem of having html as textual data in my > xml. Right now I got tired of the problem and reverted back to pure > text instead. The text get's converted into <p>aragraphs in my xml > database, thus searching for example a string in the second paragraph > is easily done with XPath. With the html it became a nightmare :( > > If anyone has good pointers for best practices on handling (non-xml) > html inside xml, I'm eager to read and learn. > > Thank you very much, Alain. I will try to get back to TinyMCE, it > would help my users but now it seriously impacted and started to tear > on my XRX design. > > Kristian > > 19.05.2015 23:14, Alain Couthures kirjutas: >> Hello Kristian, >> >> I think that I have just found a workaround for the getContent() >> issue with TinyMCE4 when adding a line: I have added a test to avoid >> useless setContent() call when value is actually unchanged... >> >> Please have a look at latest revision (rev.615). >> >> Thank you for your feedback! >> >> --Alain >> >> Le 19/05/2015 10:12, Kristian Kankainen a écrit : >>> The thing that irritate me the most with these bogus elements, is >>> that they seem not be valid according to my TinyMCE settings. Since >>> I keep getting <br> instead of <br /> I can't parse the input as XML. >>> >>> My current solution is to delete (in the serialised string) the >>> bogus elements, convert <br> to <br/> and then parse the (hopefully >>> valid) xml and delete all the rest of the @data-mce* attributes. >>> >>> This is very fragile and I would insist in using the API method >>> since that is what it is there for... What is the major issue using >>> it in XSLTForms? Looking at the TinyMCE4 API documentation it >>> doesn't seem to have changed and is still the supposed way of >>> getting "clean" content from the editor. >>> >>> Kristian >>> >>> 18.05.2015 23:26, Alain Couthures kirjutas: >>>> Hello Kristian, >>>> >>>> This forum post seems too old to be related to TinyMCE4. With >>>> TinyMCE3, the getContent() method worked perfectly for each event >>>> that XSLTForms has to capture. Unfortunately, with TinyMCE4, there >>>> is a major issue using this method as soon as a new line is entered... >>>> >>>> That is why I had to search for an alternative solution and the >>>> innerHTML property seems good enough except for some extra >>>> attributes that you have noticed. Do you think that some regular >>>> expression could remove them? >>>> >>>> --Alain >>>> >>>> Le 14/05/2015 23:39, Kristian Kankainen a écrit : >>>>> Hello again! >>>>> >>>>> Okey, I now understood and accepted that the content has to be >>>>> serialized. But I now get un-clean input from the TinyMCE equipped >>>>> fields. >>>>> >>>>> I get (serialized) <br data-mce-bogus="1"> elements saved in my >>>>> database. I understand TinyMCE uses these elements internally so >>>>> that users can put the cursor inside empty elements when clicking. >>>>> But these bogus elements should be automatically cleaned away >>>>> before the form data gets sent to the server! >>>>> Reading the whole thread about the problem, this post [1] by the >>>>> main developer says that: >>>>>> Use the proper API:s tinymce.activeEditor.getContent() or save >>>>>> etc. Raw HTML should never be stored or extracted. TinyMCE never >>>>>> produces any internal data-mce-bogus output if you use our >>>>>> methods for content extraction. >>>>> >>>>> Could this be the problem in XSLTForms, that the proper API isn't >>>>> used? I'm sorry I can't look at the code myself. This is my >>>>> TinyMCE config in XSLTForms: >>>>>> <schema xmlns="http://www.w3.org/2001/XMLSchema" >>>>>> targetNamespace="http://www.agencexml.com/xsltforms/rte"> >>>>>> <simpleType name="standardHTML"> >>>>>> <restriction base="xf:HTMLFragment" >>>>>> xsltforms:rte="TinyMCE"/> >>>>>> <annotation> >>>>>> <appinfo> >>>>>> { >>>>>> element_format : "xhtml", >>>>>> browser_spellcheck: true, >>>>>> entity_encoding: "numeric", >>>>>> cleanup: true, >>>>>> plugins: [ >>>>>> "autolink lists link charmap", >>>>>> "searchreplace code fullscreen", >>>>>> "insertdatetime paste" >>>>>> ], >>>>>> toolbar: "undo redo | bold italic underline | >>>>>> alignleft aligncenter alignright alignjustify | bullist numlist >>>>>> outdent indent | link | charmap", >>>>>> statusbar : false >>>>>> } >>>>>> </appinfo> >>>>>> </annotation> >>>>>> </simpleType> >>>>>> </schema> >>>>> I use version 4.1.9 of TinyMCE and I think the XSLTForms code is >>>>> version 614. >>>>> >>>>> Can I send some more information for reproducing this? >>>>> >>>>> Thank you in advance >>>>> Kristian K >>>>> >>>>> [1] http://www.tinymce.com/forum/viewtopic.php?pid=109291#p109291 >>>>> >>>> >>> >> > |
From: Alain C. <ala...@ag...> - 2014-04-10 20:05:34
Attachments:
tinymce.xhtml
|
Hi Mark, Unfortunately, Apple decided not to provide Windows version of Safari after 5.1.7. I am not able to reproduce this issue but I think that some try/catch could fix this... This example at agencexml.com is currently using TinyMCE 3.4.6. You could try this very same example form with a more recent TinyMCE 3.x version. With rev.593, TinyMCE 4.0 is now also supported. Two attributes have to be added at the script element to identify it: data-uri="http://www.tinymce.com" and data-version="4.0". Please find attached a test form. Thank you for your feedback! -Alain Le 09/04/2014 23:30, Mark Lawson a écrit : > Hi, > > I’m getting an odd error with the TinyMCE example at http://www.agencexml.com/xsltforms/tinymce.xml > > When I load it into Safari 7.03 I get the following : > > TypeError: 'null' is not an object (evaluating 's.getRng') > > If I dismiss the alert, everything works ok though. Any ideas? > > Rgds, > > Mark Lawson > > > > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: Isidro V. V. <jv...@gm...> - 2014-04-13 14:53:55
|
Hi, I am trying to get use the ref attribute in a label element but apparently it doesn't seems to work. <xf:repeat nodeset="Customers"> <tr> <td> <xf:trigger> <xf:label ref="CustomerName"/> </xf:trigger> </td> ... </tr> </xf:repeat> According to specification (http://www.w3.org/TR/xforms11/#ui-commonelems-label) it should be possible, but I would like to ask Alan if it is implemented or if anyone has used it Thanks Isidro |