WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 18 months ago

#20822 closed defect (bug) (fixed)

Switching visual/html on wp_editor used on front end not saved as new default

Reported by: jb510 Owned by: azaozz
Milestone: 3.9 Priority: normal
Severity: minor Version: 3.3.2
Component: Editor Keywords:
Focuses: Cc:

Description

Using the wp_editor on the frontend it doesn't default to the last used state it defaults to the last used state on the back end.

I did find that using:
add_filter( 'wp_default_editor', create_function(, 'return "tinymce";') );

inside the function I am using to replace the front end comments with the visual editor worked around this a for me by defaulting to visual which works as well for me in this case as last used, but the default should probably change globally when a logged in user toggles between the two _or_ should get saved independently.

Attachments (2)

wysiwyg-comments.php (701 bytes) - added by jb510 3 years ago.
20822.patch (1.5 KB) - added by azaozz 18 months ago.

Download all attachments as: .zip

Change History (5)

@jb5103 years ago

comment:1 @nacin19 months ago

  • Component changed from General to Editor

comment:2 @azaozz18 months ago

  • Milestone changed from Awaiting Review to 3.9

Yes, the filter 'wp_default_editor' can be used to override which editor is shown first. We probably can add another arg to wp_editor() that overrides the default as it would be more convenient for plugins.

@azaozz18 months ago

comment:3 @azaozz18 months ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 27093:

When using wp_editor(), make it easier to specify which editor is shown first, fixes #20822

Note: See TracTickets for help on using tickets.