[Xsltforms-support] Applying plugins (CSS and JS) to xforms prefixed htlm elements
Brought to you by:
alain-couthures
From: Alessandro <ca...@tu...> - 2020-05-21 09:19:11
|
Hi everybody! In the context of an XForm rendered through XSLTForms within existdb, I'd like to apply a plugin through which textareas are transformed into markdown editors (in this case I use "tailwriter" plugin). Thus I need to apply a CSS style file and a couple of JS file scripts to the following chunk of code (being finally able, of course, to save the textarea contents to an xml file stored in existdb): <body> <h1>Nota Bene</h1> <table border="0"> <tr > <td> <xf:textarea style="font-size: 16px;" mediatype="text/html" ref="/archivi/archivio[@id='{$arch_id}']/cartella[@id='{$fold_id}']/tabella[@id='{$tab_id}']/tr[@r_id='{$row_id}']/nota/nota_text" incremental="true"> </xf:textarea> </td> </tr> </table> <br/> <table border="0"> <tr> <td> <xf:submit submission="save"> <xf:label>Salva modifiche</xf:label> </xf:submit> </td> </tr> </table> </body> These are the files (plus a setting script) that need to be used: <link type="text/css" rel="stylesheet" href="resources/tailwriter/tail.writer-white.min.css"/> <script type="text/javascript" src="resources/tailwriter/tail.writer-all.js"/> <script type="text/javascript" src="resources/tailwriter/marked.min.js"/> <script type="text/javascript"> document.addEventListener("DOMContentLoaded", function(){ tail.writer("textarea", {height: [200, 500],indentTab: false,indentSize: 4,locale: "it", markup: "markdown", readonly: false,resize: true, statusbar: true,toolbar: "minimal",toolbarMultiLine: true, toolbarScrollable: true,tooltip: "top",width: "70%" }); }); </script> By simply inserting the above code into the "page.html" template of my existdb app, the hoped application of CSS and JS does not take place (it would have been too easy ;-)). So, how to obtain that result? Is that possible at all? I post my request to both exist and xsltforms help mailing lists, because I don't know on which side the issue might be appropriately dealt with... Many thanks Alex -- Inviato in modo sicuro con Tutanota. Ottieni la tua mailbox crittografata e senza pubblicità: https://tutanota.com |