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)
Change History (9)
#3
@
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
@
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
@
8 years ago
- Milestone Awaiting Review → 5.0
- Owner changed from to
I'm inclined to leave r43761 in. CodeMirror is the most likely thing we'll use, even if we wait for CodeMirror 6.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This means that
wp_get_code_editor_settingswhich 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?