-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Site Editor: Force visual editor in browse mode #47329
Conversation
Size Change: +3 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
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.
LGTM, thanks!
Another option would be to trigger an action like we do here
|
Personally I think it's fine that we preserve the previously selected editor mode, if we click |
Personally, I thought that the editor mode saved in the store should not be switched without explicit user intervention. Does it depend on preference which is better? 🤔 |
yeah, if it's a preference, the current PR is the way to go to avoid messing with that preference. |
I would like to know the preferences of others, who would you prefer? |
Let's merge this one :) |
Fixes: #47194
What?
This PR forces the visual editor to appear when the site editor is in browse mode.
Why?
As reported in #47194, if you switch to the code editor and then return to browse mode, the code editor is retained and you can edit the code. My understanding is that the browse mode is to check the appearance of the template, not the code, and should not be able to edit the content.
How?
In browse mode, the visual editor is displayed regardless of the editor mode setting. This PR doesn't change the mode stored in the store. This is because I believe that switching between editor modes should be done explicitly by the user.
Testing Instructions
Switch the editor mode to code editor and check the following points:
Ctrl
+Shift
+Alt
+M
⇧
+⌥
+⌘
+M
Screenshots or screencast
9c3bb470e08a88aae21bd94543deb10b.mp4