-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
WYSIWYG field not picking up last used visual vs text setting, not loading in text can change some HTML #6176
Comments
The field was recently revamped with React and it looks like the Visual/Code views are not maintained on each page load. I wonder if there's a way to offer the WYSIWYG field without the Visual tab option and just use the quick tags code version. |
Yes there is. We could add two fields to the Editor settings: |
@sc0ttkclark @zrothauser |
I've got an initial fix for the setting of the default editor on the page -- however it's not running at the right time to switch the editors. Code is in this change: 7f0aa07 (and subsequent commits on 2.8.1) |
I'm removing the defaultEditor handling for now, the solution would still present the problem reported since it loads as visual editor and then switches to the HTML editor (causing the HTML mess up). I suggest using the Code field type for now @dweuste |
I'm also not fond of the default editor option. |
A question as this is still being worked on. Is there a way to make the code editor add or interpret line breaks? Getting clients to wrap all text in spans hasn't been super consistent, and years old code end up doing some strange things without them. |
In the WYSIWYG field, there are times you have to use the Text Editor rather than the Visual Editor. It is still superior to the standard code editor because clients can still highlight and bold and italicize and link and not have to worry about paragraph tags, but when the editor switches to Visual, it breaks the code if there were some non-standard things. An example of this is adding text in between list items (text
text ). Normally this isn't an issue because once the editor is in Text mode, it doesn't switch unless you tell it to. But after 2.8, that's no longer the case, now after each page refresh, it reverts to Visual Editor and breaks that previous code, so you have to re-do whatever you previously did every single time you want to edit. This is mainly an issue in WooCommerce pages if that matters.The text was updated successfully, but these errors were encountered: