-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add settings to enable visual or text editor for TinyMCE #6179
base: main
Are you sure you want to change the base?
Conversation
To initialize a quicktags-only textarea, you can call:
However, it does not appear well unless the textarea is wrapped with |
We'll need to fix #6178 as a prerequisite for this |
@@ -99,6 +101,17 @@ const TinyMCE = ( { | |||
settings.toolbar4 = settings.toolbar4.replace( 'wp_add_media,', '' ).replace( ',wp_add_media', '' ).replace( 'wp_add_media', '' ); | |||
} | |||
|
|||
if ( ! enableTinyMCE && ! enableQuicktags ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to address other areas like in onSetup
and the first useEffect
perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically checking enableTinyMCE before calling other tinymce/editor specific functions elsewhere in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is close
Description
This will allow users to optionally disable the visual editor or the quicktags.
Related GitHub issue(s)
Fixes #6176
Changelog text for these changes
PR checklist