Ticket #3978 (closed enhancement: fixed)

Opened 5 years ago

Last modified 4 years ago

Visual Editor should remember your last tab setting

Reported by: matt Owned by: mdawaffe
Priority: high Milestone: 2.5
Component: Administration Version: 2.1.2
Severity: minor Keywords: has-patch needs-testing
Cc: rob1n

Description

Whatever tab you're on in the visual editor, be it editor or code, if you leave the page when you load next time the same tab should be auto-selected.

Attachments

3978.diff Download (8.4 KB) - added by mdawaffe 4 years ago.
3978b.diff Download (8.2 KB) - added by mdawaffe 4 years ago.
fixes bug when default tab is HTML
3978c.diff Download (8.4 KB) - added by mdawaffe 4 years ago.
fixes bug when default tab is HTML and you are editing a pre-existing post

Change History

  • Keywords needs-patch added

+1

Cookie-stored preference should be good enough here. If you want to use something permanently you'd just change the RTE option.

  • Cc rob1n added

IMO this is debatable. It could be expected that you just start with a fresh slate (the default when you have RTE enabled -- the RTE) whenever you load up the writing interface. Besides, if you use the code view most of the time, might as well switch over to it, right?

  • Milestone changed from 2.2 to 2.3

I like the idea of a cookie preference. Just because you use the code view 99% of the time doesn't mean you should have to go into your profile and flip the RTE back on the 1% of the time you want to use it.

  • Milestone changed from 2.3 (trunk) to 2.4 (future)

+1 MellerTime completely agree! I regularly end up disabling the Visual to work around a bug or two and then don't re-enable for a long time, because the problems occur when the post is first edited in the TinyMCE.

#4486 dupe of this ticket

  • Keywords has-patch needs-testing added; needs-patch removed
  • Owner changed from anonymous to mdawaffe
  • Status changed from new to assigned

3978.diff

  1. Stores editor preference in wordpress_editor_{$user_id} cookie with long expire time.
  2. Loads page with correct editor for that user.
  3. wpSetDefaultEditor( editor ): JS function to set cookie.
  4. wp_default_editor(): PHP function that checks cookie. Is filtered so that a plugin can store this editor preference info in the DB instead of the cookie.

fixes bug when default tab is HTML

fixes bug when default tab is HTML and you are editing a pre-existing post

comment:8   ryan4 years ago

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [6567]) Remember last editor chosen. Props mdawaffe. fixes #3978

Note: See TracTickets for help on using tickets.