Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Custom CSS: Re-use CodeMirror bundled in Core and the new code editor API #7776

Closed
westonruter opened this Issue Sep 13, 2017 · 4 comments

Comments

Projects
None yet
5 participants
Contributor

westonruter commented Sep 13, 2017

CodeMirror has just landed in WordPress 4.9-alpha: https://core.trac.wordpress.org/changeset/41376

The Custom CSS extensions in Jetpack should be updated to build on top of the new code editor APIs rather than include separate copies.

For previous Custom CSS work which moved the feature into the Customizer with WordPress 4.7, see #5539.

/cc @georgestephanis

Contributor

westonruter commented Sep 16, 2017

I need to improve the extensibility of the control in core first.

Contributor

westonruter commented Sep 16, 2017

As noted by @BinaryMoon, Jetpack and core's Custom CSS currently conflict and cause an error: https://twitter.com/binarymoon/status/909028797504217088

This is not the fault of Jetpack but it is the fault of core not adding the code editor to the control in a way that makes it extensible. I'm going to introduce a WP_Customize_Code_Editor_Control which Jetpack can then extend. See https://core.trac.wordpress.org/ticket/41897

Contributor

westonruter commented Sep 16, 2017

I've opened an initial pull request for core to introduce WP_Customize_Code_Editor_Control in PHP and wp.customize.CodeEditorControl in JS. I'll try adding a PR to get Jetpack to make use of them when available.

Please review: xwp/wordpress-develop#257

@dereksmart dereksmart added [Pri] BLOCKER and removed [Pri] High labels Oct 18, 2017

Member

georgestephanis commented Oct 25, 2017

Resolved in #8028

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment