Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#45351 closed defect (bug) (invalid)

Add the Classic Editor's default TinyMCE init settings to the Classic Block instance init settings

Reported by: azaozz's profile azaozz Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: TinyMCE Keywords:
Focuses: Cc:


There are a few WordPress specific init settings that should probably be added. Things like keep_styles and end_container_on_empty_block change the way the editor behaves. We probably want these.

Also missing are some things that affect content "cleanup": relative_urls, remove_script_host, convert_urls, entities, entity_encoding. Finally browser_spellcheck should be set to true.

Change History (3)

#1 @azaozz
6 years ago

As far as I know no issues resulting from missing settings have been reported yet, and some of the changes from these settings are pretty subtle, but thinking better to match the Classic editor init settings exactly in the Classic block.

The default init settings for the Classic editor:

#2 @azaozz
6 years ago

Ugh, I'm definitely getting too tired :)

It's right there, been staring me in the face the whole time. The TinyMCE init settings from script-loader are used only to override some of the default TinyMCE settings that come from print_default_editor_scripts(), used by enqueue_default_editor(), called by wp_enqueue_editor(). Then the classic block just does wp.oldEditor.initialize( [extra settings] ) where the extra settings are those outputted from script-loader :)

Well, this seems to need a bit of documentation so others don't have to look it up again.

#3 @azaozz
6 years ago

  • Milestone 5.0 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Can probably add that bit of docs to the new function introduced in (to avoid conflict).

Note: See TracTickets for help on using tickets.