Text Editors TimeMCE and Datatables.net #3713
Replies: 2 comments
-
That sounds pretty reasonable to me. WIth Leptos, as with any framework, the key thing is basically that TinyMCE and the framework probably won't play well together -- So give each one its own little area of the DOM to work on, and don't try to use the framework to touch the internals of the text area, etc. But yes it's very possible to simply inline some JS like this! There's an example in the repo that is written almost like a tutorial of the dos/don'ts when integrating server rendering and a client-side JS library. It uses HighlightJS I think, which is a more complicated integration than what you're doing, so it may be overkill -- but feel free to consult it of course! |
Beta Was this translation helpful? Give feedback.
-
Thanks for reply and confirming. I will have a look at the example and give it a try. I have narrowed the options down to leptos or possibly htmx with actix or axum has back end. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an existing server rendered bootstrap application which makes extensive use of the TinyMCE editor and datatables. I need to rewrite the server backend and I'm trying to get my head around whether to use rust with leptos or stick with node.
TinyMCE and data tables both use a js config in the html page plus an Ajax url and the backend responds with JSON. For example if you have a form which is an invoice and you have a TinyMCE text area for the description plus a data table for the invoice items. The form is generated in Leptos and the HTML would include the js config for the editor and datatables. The browser would load the scripts via CDN and in the page something like which is seems I do via JS snippets ie include something like
'''new DataTable('#example', {
order: [[3, 'desc']]
});
Is this hybrid approach using Leptos for the form and with server function to return the json for datatables practical and worth pursuing or am I missing the point ?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions