You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, my JavaScript skills are not yet developed enough, to apply any of the proposed solutions (This is also the reason, why I was very happy to find HTMX, which solves a lot of my issue, where JS would be required)
django-tinymce knows to automatically evaluate javascript functions if they are defined in python strings for specific configuration options, like "setup". So in your settings.py:
# All of the below are the defaults from django-tinymce's documentation TINYMCE_DEFAULT_CONFIG= {
"theme": "silver",
"height": 500,
"menubar": False,
"plugins": "advlist,autolink,lists,link,image,charmap,print,preview,anchor,""searchreplace,visualblocks,code,fullscreen,insertdatetime,media,table,paste,""code,help,wordcount",
"toolbar": "undo redo | formatselect | ""bold italic backcolor | alignleft aligncenter ""alignright alignjustify | bullist numlist outdent indent | ""removeformat | help",
# Add a setup function to apply a fix for HTMX:"setup": "function (editor) {editor.on('change', function () {tinymce.triggerSave();});}",
}
I don't get the content of the HTMLField if I use this in a dynamically loaded view with HTMX.
StackOverflow seems to have already some questions regarding this issue:
Unfortunately, my JavaScript skills are not yet developed enough, to apply any of the proposed solutions (This is also the reason, why I was very happy to find HTMX, which solves a lot of my issue, where JS would be required)
#416 mentions a similar issue, but with bootstrap
The text was updated successfully, but these errors were encountered: