Make WordPress Core

Opened 17 years ago

Closed 16 years ago

#3978 closed enhancement (fixed)

Visual Editor should remember your last tab setting

Reported by: matt's profile matt Owned by: mdawaffe's profile 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 16 years ago.
3978b.diff (8.2 KB) - added by mdawaffe 16 years ago.
fixes bug when default tab is HTML
3978c.diff (8.4 KB) - added by mdawaffe 16 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)

#1 @markjaquith
17 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.

#2 @rob1n
17 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?

#3 @foolswisdom
17 years ago

  • Milestone changed from 2.2 to 2.3

#4 @MellerTime
17 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.

#5 @foolswisdom
17 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.

#6 @mdawaffe
17 years ago

#4486 dupe of this ticket

@mdawaffe
16 years ago

#7 @mdawaffe
16 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.

@mdawaffe
16 years ago

fixes bug when default tab is HTML

@mdawaffe
16 years ago

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

#8 @ryan
16 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.