Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#45248 closed defect (bug) (fixed)

Setting _wpGutenbergCodeEditorSettings is unnecessary

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

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 8 years ago.

Download all attachments as: .zip

Change History (9)

@noisysocks
8 years ago

#1 @noisysocks
8 years ago

  • Keywords has-patch added; needs-patch removed

#2 @noisysocks
8 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
8 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
8 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
8 years ago

  • Milestone Awaiting Review → 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
8 years ago

  • Resolution → fixed
  • Status assigned → 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
8 years ago

  • Keywords fixed-5.0 added
  • Resolution fixed
  • Status closed → reopened

Reopening for trunk.

#8 @jeremyfelt
8 years ago

  • Resolution → fixed
  • Status reopened → 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.