Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#45248 closed defect (bug) (fixed)

Setting _wpGutenbergCodeEditorSettings is unnecessary

Reported by: noisysocks's profile noisysocks Owned by: pento's profile pento
Milestone: 5.0 Priority: normal
Severity: normal Version: 5.0
Component: Editor Keywords: has-patch fixed-5.0
Focuses: Cc:

Description

The HTML block used to use wp.codeEditor to add syntax highlighting, but this was [later removed](https://github.com/WordPress/gutenberg/pull/10396). Setting window. _wpGutenbergCodeEditorSettings when the block editor loads is therefore unnecessary.

Attachments (1)

45248.diff (624 bytes) - added by noisysocks 6 years ago.

Download all attachments as: .zip

Change History (9)

@noisysocks
6 years ago

#1 @noisysocks
6 years ago

  • Keywords has-patch added; needs-patch removed

#2 @noisysocks
6 years ago

This means that wp_get_code_editor_settings which was added in r43761 is no longer necessary. Not sure if we should remove it or not—it's likely a useful API for plugins including Gutenberg.

Thoughts, @pento?

#3 @pento
6 years ago

Will we be looking at adding the code editor back in at some point? It seems the main issue is that we need to figure out a way to do lazy loading, then it can come back.

#4 @noisysocks
6 years ago

Maybe. It's not a sure thing. There's also talk in https://github.com/WordPress/gutenberg/issues/10423 of moving from CodeMirror to a different library.

#5 @pento
6 years ago

  • Milestone changed from Awaiting Review to 5.0
  • Owner changed from noisysocks to pento

I'm inclined to leave r43761 in. CodeMirror is the most likely thing we'll use, even if we wait for CodeMirror 6.

#6 @pento
6 years ago

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

In 43857:

Block Editor: Remove CodeMirror settings.

CodeMirror is no longer used in the block editor, so we don't need to load the settings.

Props noisysocks.
Fixes #45248.

#7 @SergeyBiryukov
6 years ago

  • Keywords fixed-5.0 added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for trunk.

#8 @jeremyfelt
6 years ago

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

In 44223:

Block Editor: Remove CodeMirror settings.

CodeMirror is no longer used in the block editor, so we don't need to load the settings.

Merges [43857] from the 5.0 branch to trunk.

Props noisysocks.
Fixes #45248.

Note: See TracTickets for help on using tickets.