WordPress/wp-includes/js
Weston Ruter 90bedf8f9d Editor: Add CodeMirror-powered code editor with syntax highlighting, linting, and auto-completion.
* Code editor is integrated into the Theme/Plugin Editor, Additional CSS in Customizer, and Custom HTML widget. Code editor is not yet integrated into the post editor, and it may not be until accessibility concerns are addressed.
* The CodeMirror component in the Custom HTML widget is integrated in a similar way to TinyMCE being integrated into the Text widget, adopting the same approach for integrating dynamic JavaScript-initialized fields.
* Linting is performed for JS, CSS, HTML, and JSON via JSHint, CSSLint, HTMLHint, and JSONLint respectively. Linting is not yet supported for PHP.
* When user lacks `unfiltered_html` the capability, the Custom HTML widget will report any Kses-invalid elements and attributes as errors via a custom Kses rule for HTMLHint.
* When linting errors are detected, the user will be prevented from saving the code until the errors are fixed, reducing instances of broken websites.
* The placeholder value is removed from Custom CSS in favor of a fleshed-out section description which now auto-expands when the CSS field is empty. See #39892.
* The CodeMirror library is included as `wp.CodeMirror` to prevent conflicts with any existing `CodeMirror` global.
* An `wp.codeEditor.initialize()` API in JS is provided to convert a `textarea` into CodeMirror, with a `wp_enqueue_code_editor()` function in PHP to manage enqueueing the assets and settings needed to edit a given type of code.
* A user preference is added to manage whether or not "syntax highlighting" is enabled. The feature is opt-out, being enabled by default.
* Allowed file extensions in the theme and plugin editors have been updated to include formats which CodeMirror has modes for: `conf`, `css`, `diff`, `patch`, `html`, `htm`, `http`, `js`, `json`, `jsx`, `less`, `md`, `php`, `phtml`, `php3`, `php4`, `php5`, `php7`, `phps`, `scss`, `sass`, `sh`, `bash`, `sql`, `svg`, `xml`, `yml`, `yaml`, `txt`.

Props westonruter, georgestephanis, obenland, melchoyce, pixolin, mizejewski, michelleweber, afercia, grahamarmfield, samikeijonen, rianrietveld, iseulde.
See #38707.
Fixes #12423, #39892.

Built from https://develop.svn.wordpress.org/trunk@41376


git-svn-id: http://core.svn.wordpress.org/trunk@41209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-13 06:08:47 +00:00
..
codemirror Editor: Add CodeMirror-powered code editor with syntax highlighting, linting, and auto-completion. 2017-09-13 06:08:47 +00:00
crop
imgareaselect
jcrop
jquery External Libraries: Update jQuery Form (unused in core) to the latest version, 4.2.1. 2017-08-05 13:00:47 +00:00
mediaelement Media: Upgrade MediaElement.js to `4.2.5-74e01a40` fixing missing `mejs.MediaElement` reference. 2017-08-28 19:29:47 +00:00
plupload Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
swfupload Upload: improve legacy SWFUpload event handlers for current jQuery. 2017-04-14 16:43:44 +00:00
thickbox Administration: Thickbox: Fix conflicts with the Plugin details and native Thickbox modals. 2017-09-09 14:14:43 +00:00
tinymce TinyMCE: fix cases where an additional empty link is created while updating an image with a link. 2017-08-26 16:34:46 +00:00
admin-bar.js
admin-bar.min.js
api-request.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
api-request.min.js REST API: Allow overriding `jQuery.ajax` calls from within wp-admin 2017-08-02 16:45:44 +00:00
autosave.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
autosave.min.js
backbone.min.js
colorpicker.js
colorpicker.min.js
comment-reply.js Docs: improve JS docs for `comment-reply.js` 2017-08-24 17:58:44 +00:00
comment-reply.min.js
customize-base.js Customize: Add global notifications area. 2017-09-12 07:03:46 +00:00
customize-base.min.js Customize: Add global notifications area. 2017-09-12 07:03:46 +00:00
customize-loader.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
customize-loader.min.js
customize-models.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
customize-models.min.js
customize-preview-nav-menus.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
customize-preview-nav-menus.min.js Customize: Fix ability to shift-click on placeholder/pre-saved nav menu items in preview to focus on corresponding control. 2016-12-10 23:47:41 +00:00
customize-preview-widgets.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
customize-preview-widgets.min.js
customize-preview.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
customize-preview.min.js Customize: Do not show `cursor: not-allowed` on audio/video track titles within playlists in preview. 2017-09-06 18:00:43 +00:00
customize-selective-refresh.js Docs: Remove "being being" dittography from inline comments. 2017-09-09 14:49:44 +00:00
customize-selective-refresh.min.js Customize: Run a partial's fallback behavior (full refresh) when selective refresh fails due to a script error. 2017-05-17 00:01:40 +00:00
customize-views.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
customize-views.min.js Customize: Prevent vertical clipping of thumbnail in header image customizer control. 2017-02-20 00:10:49 +00:00
heartbeat.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
heartbeat.min.js
hoverIntent.js
hoverIntent.min.js
imagesloaded.min.js
json2.js
json2.min.js
masonry.min.js
mce-view.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
mce-view.min.js TinyMCE: Fix cursor position after updating a wpview node. Fix hiding the inline toolbar on editor blur. 2017-04-19 22:10:42 +00:00
media-audiovideo.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
media-audiovideo.min.js Media: Upgrade MediaElement.js from 2.22.0 to 4.2.3. 2017-08-01 04:43:51 +00:00
media-editor.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
media-editor.min.js
media-grid.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
media-grid.min.js Media: library grid view - improve browser history support. 2017-07-10 19:08:41 +00:00
media-models.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
media-models.min.js
media-views.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
media-views.min.js REST API: Allow overriding `jQuery.ajax` calls from within wp-admin 2017-08-02 16:45:44 +00:00
quicktags.js Editor: manually trigger `change` event when text is modified from JS. 2017-05-11 00:29:41 +00:00
quicktags.min.js Editor: manually trigger `change` event when text is modified from JS. 2017-05-11 00:29:41 +00:00
shortcode.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
shortcode.min.js Shortcodes: Allow using single quotes for empty value attributes. 2017-07-11 00:54:41 +00:00
swfobject.js
tw-sack.js
tw-sack.min.js
twemoji.js Emoji: Update Twemoji to 2.5.0. 2017-08-14 02:04:45 +00:00
twemoji.min.js Emoji: Update Twemoji to 2.5.0. 2017-08-14 02:04:45 +00:00
underscore.min.js
utils.js Move `sanitizeText` and `stripTags` from press this to `wp.sanitize`. 2017-07-15 15:48:46 +00:00
utils.min.js
wp-a11y.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
wp-a11y.min.js Accessibility: Make Safari 10 + VoiceOver announce repeated, identical, `wp.a11y.speak()` messages. 2017-04-19 19:53:42 +00:00
wp-ajax-response.js
wp-ajax-response.min.js
wp-api.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
wp-api.min.js WP-API JS Client: Add helpers to get a model or collection by route. 2017-09-04 16:01:43 +00:00
wp-auth-check.js
wp-auth-check.min.js
wp-backbone.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
wp-backbone.min.js
wp-custom-header.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
wp-custom-header.min.js
wp-embed-template.js
wp-embed-template.min.js
wp-embed.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
wp-embed.min.js Embeds: Correctly remove security attribute from iframes in IE 10 and IE 11. 2016-11-23 13:38:33 +00:00
wp-emoji-loader.js Emoji: Fix typo in `browserSupportsEmoji()` comment. 2017-06-25 07:05:42 +00:00
wp-emoji-loader.min.js Emoji: Fix the flag and emoji5 tests not working correctly. 2017-05-29 03:21:42 +00:00
wp-emoji-release.min.js Emoji: Update Twemoji to 2.5.0. 2017-08-14 02:04:45 +00:00
wp-emoji.js
wp-emoji.min.js
wp-hooks.js Add `wp.hooks` - JavaScript actions and filters. 2017-09-12 12:54:45 +00:00
wp-hooks.min.js Add `wp.hooks` - JavaScript actions and filters. 2017-09-12 12:54:45 +00:00
wp-list-revisions.js
wp-list-revisions.min.js
wp-lists.js
wp-lists.min.js
wp-pointer.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
wp-pointer.min.js
wp-sanitize.js Move `sanitizeText` and `stripTags` from press this to `wp.sanitize`. 2017-07-15 15:48:46 +00:00
wp-sanitize.min.js Move `sanitizeText` and `stripTags` from press this to `wp.sanitize`. 2017-07-15 15:48:46 +00:00
wp-util.js Docs: JSDoc improvements for namespaces. 2017-09-08 18:42:49 +00:00
wp-util.min.js
wpdialog.js
wpdialog.min.js
wplink.js Editor: manually trigger `change` event when text is modified from JS. 2017-05-11 00:29:41 +00:00
wplink.min.js Editor: manually trigger `change` event when text is modified from JS. 2017-05-11 00:29:41 +00:00
zxcvbn-async.js
zxcvbn-async.min.js
zxcvbn.min.js Libraries: Update zxcvbn from version 1.0 to 4.4.1 2016-12-13 11:23:42 +00:00