diff --git a/.eslintrc.json b/.eslintrc.json index 7bfdaa16916bd5..04c5835b68c06e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -18,8 +18,7 @@ } }, "globals": { - "wp": true, - "tinymce": true + "wp": true }, "plugins": [ "react", diff --git a/blocks/api/parser.js b/blocks/api/parser.js index fd38a8e2e53740..5b1e16f767941f 100644 --- a/blocks/api/parser.js +++ b/blocks/api/parser.js @@ -1,6 +1,7 @@ /** * External dependencies */ +import tinymce from 'tinymce'; import { parse as hpqParse } from 'hpq'; import { escape, unescape, pickBy } from 'lodash'; diff --git a/blocks/editable/tinymce.js b/blocks/editable/tinymce.js index 531f215fb6c467..9e230c9d51800a 100644 --- a/blocks/editable/tinymce.js +++ b/blocks/editable/tinymce.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import tinymce from 'tinymce'; + export default class TinyMCE extends wp.element.Component { componentDidMount() { this.initialize(); diff --git a/webpack.config.js b/webpack.config.js index 374beeb391617e..80654973dbf514 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -22,7 +22,8 @@ const config = { externals: { react: 'React', 'react-dom': 'ReactDOM', - 'react-dom/server': 'ReactDOMServer' + 'react-dom/server': 'ReactDOMServer', + tinymce: 'tinymce' }, resolve: { modules: [