WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 22 months ago

#41897 closed defect (bug)

Code Editor: Add reusable code editor Customizer control — at Version 1

Reported by: westonruter Owned by:
Milestone: 4.9 Priority: high
Severity: normal Version:
Component: Customize Keywords: has-patch commit has-dev-note
Focuses: Cc:

Description (last modified by westonruter)

With the introduction of CodeMirror in #12423 the Custom CSS functionality in the Customizer (#35395) was updated to make use of the new code editor. However, the initial integration in [41376] was not done in a way that would allow for the code to be re-used in other places (such as adding other instances of code editor controls) or to facilitate plugins to extend and customize how the Custom CSS control behaves (currently core and Jetpack conflict).

I suggest that the code that is currently hard-coded for the custom_css textarea control be abstracted into a general WP_Customiz_Code_Editor control which then can be used for Custom CSS and also for adding code editing for anywhere else that a plugin may want it. It can then be cleanly extended by Jetpack.

Change History (2)

Note: See TracTickets for help on using tickets.