Opened 6 years ago
Closed 6 years ago
#45248 closed defect (bug) (fixed)
Setting _wpGutenbergCodeEditorSettings is unnecessary
Reported by: | noisysocks | Owned by: | 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)
Change History (9)
#3
@
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
@
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
@
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.
Note: See
TracTickets for help on using
tickets.
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?