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
I have just spent a few hours debugging why my form field did not display any rich text feature in my frontend. I tried several solutions including setting TINYMCE_JS_URL,TINYMCE_JS_ROOT to both CDN values and relative paths but did not work till I used the sample code on the website after viewing this stackoverflow answer which suggested defining a selector for the target elements.
After setting up the selector config in TINYMCE_DEFAULT_CONFIG, the rich text features are displayed but the docs do not state that. Is that a short coming in the documentations?
The text was updated successfully, but these errors were encountered:
It is possible that the lack of information on the selector configuration option in the Django TinyMCE documentation is a shortcoming. The selector option is used to specify the CSS selector for the element(s) that you want to apply the TinyMCE editor to.
Without this configuration, the TinyMCE editor may not be applied to the correct element, which could result in the behavior you experienced where the rich text features were not displayed.
I have just spent a few hours debugging why my form field did not display any rich text feature in my frontend. I tried several solutions including setting
TINYMCE_JS_URL
,TINYMCE_JS_ROOT
to both CDN values and relative paths but did not work till I used the sample code on the website after viewing this stackoverflow answer which suggested defining a selector for the target elements.Config that actually works:
TINYMCE_DEFAULT_CONFIG = { ".....", "selector": "textarea", "......" }
After setting up the
selector
config inTINYMCE_DEFAULT_CONFIG
, the rich text features are displayed but the docs do not state that. Is that a short coming in the documentations?The text was updated successfully, but these errors were encountered: