Re: [Xsltforms-support] TinyMCE
Brought to you by:
alain-couthures
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/ >>>> >>>> >>> >> > |