WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#20609 new defect (bug)

<p> tags in Editor not working on editing with wp_editor, wenn disabling media_buttons or quicktags

Reported by: julian42 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: Cc:

Description

When disabling the media_buttons or quicktags via the third argument in wp_editor via a settings array, <p> tags are not displayed any more, so there are no line breaks any more in the editor. Only " " is in the source code. The Problem also occurs, when changing 'quicktags' or 'media_buttons' in class-wp-editor.php in the core to false. wpautop is still true.

Change History (2)

comment:1 Bueltge2 years ago

  • Cc frank@… added

comment:2 azaozz2 years ago

This is caused by not running the content for the editor through wp_richedit_pre(). That's done when both editors are used but not when only TinyMCE or only Quicktags is used.

Not sure what would be the best way to handle this. Seems logical to always run these filters, however the content is escaped beforehand in all places in core that only use Quicktags. Perhaps another option in wp_editor()'s $settings array that would turn default filters on or off?

Note: See TracTickets for help on using tickets.