WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#3978 closed enhancement (fixed)

Visual Editor should remember your last tab setting

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

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 (3)

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

Download all attachments as: .zip

Change History (11)

comment:1 @markjaquith8 years ago

  • 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.

comment:2 @rob1n8 years ago

  • 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?

comment:3 @foolswisdom8 years ago

  • Milestone changed from 2.2 to 2.3

comment:4 @MellerTime8 years ago

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.

comment:5 @foolswisdom8 years ago

  • 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.

comment:6 @mdawaffe8 years ago

#4486 dupe of this ticket

@mdawaffe8 years ago

comment:7 @mdawaffe8 years ago

  • 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.

@mdawaffe8 years ago

fixes bug when default tab is HTML

@mdawaffe8 years ago

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

comment:8 @ryan8 years ago

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

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

Note: See TracTickets for help on using tickets.