title: Silverstripe 4 tinyMCE not working
body: <p>Just installed SS4 via composer, everything seems to be working fine on my local machine but the WYSIWYG editor doesn't seem to be working, getting a load of console errors referring to tinyMCE and the vendor.js and webpack.</p>
  
  <p>I am using webpack as a compiler but can't figure out why its not working.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Regards</p>
  
  <p>Anish</p>
  
  <p><a href="https://i.stack.imgur.com/LXkSK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LXkSK.png" alt="enter image description here"></a></p>
  
  <p>webpack config:</p>
  
  <pre><code>var debug = process.env.NODE_ENV !== "production";
  var webpack = require('webpack');
  var externalJS = require('./js/externals');
  
  module.exports = {
      mode: 'development',
      externals: externalJS(debug),
      context: __dirname +"/src",
      devtool: 'source-map',
      entry: {
          head: __dirname + "/src/themes/pixellabs/js/head/head.js",
          styles: __dirname + "/src/themes/pixellabs/scss/styles.scss",
          foot: __dirname + "/src/themes/pixellabs/js/foot/foot.js",
      },
      output: {
          path: __dirname + "/src/themes/pixellabs/js/",
          filename: "[name].min.js"
      },a
      watchOptions: {
          aggregateTimeout: 300 // The default
      },
      module: {
          rules: [
              {
                  test: /\.scss$/,
                  use: [
                      {
                          loader: 'file-loader',
                          options: {
                              name: '[name].css',
                              outputPath: '../css/'
                          }
                      },
                      {
                          loader: 'extract-loader'
                      },
                      {
                          loader: 'imports-loader'
                      },
                      {
                          loader: 'css-loader',
                          options: {
                              minimize: true,
                              sourceMap: true
                          }
                      },
                      {
                          loader: 'postcss-loader'
                      },
                      {
                          loader: 'sass-loader',
                          options: {
                              sourceMap: true
                          }
                      }
                  ]
              },
              {
                  test: /\.(png|jpg|svg)/,
                  use: [
                      {loader: "url-loader"}
                  ]
              }
          ],
      },
      plugins: debug ? [] : [
          new webpack.ProvidePlugin({
              $: "jquery",
              jQuery: "jquery",
              "window.jQuery": "jquery"
          }),
          new webpack.optimize.UglifyJsPlugin({
              mangle: false,
              sourcemap: true
          }),
  
      ],
  };
  </code></pre>
  
  <p>Composer output:</p>
  
  <pre><code>composer/ca-bundle                        1.1.1              Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.
  composer/installers                       v1.5.0             A multi-framework Composer library installer
  doctrine/instantiator                     1.0.5              A small, lightweight utility to instantiate objects in PHP without invoking their constructors
  embed/embed                               v3.3.1             PHP library to retrieve page info using oembed, opengraph, etc
  google/recaptcha                          1.1.3              Client library for reCAPTCHA, a free service that protect websites from spam and abuse.
  guzzlehttp/psr7                           1.4.2              PSR-7 message implementation that also provides common utility methods
  heyday/silverstripe-responsive-images     2.0.0              Configure and send a series of image size options to the client without loading any resources until a media query can be executed.
  intervention/image                        2.4.1              Image handling and manipulation library with support for Laravel integration
  league/flysystem                          1.0.44             Filesystem abstraction: Many filesystems, one API.
  m1/env                                    2.1.0              Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.
  marcj/topsort                             1.1.0              High-Performance TopSort/Dependency resolving algorithm
  monolog/monolog                           1.23.0             Sends your logs to files, sockets, inboxes, databases and various web services
  myclabs/deep-copy                         1.7.0              Create deep copies (clones) of your objects
  nikic/php-parser                          v3.1.5             A PHP parser written in PHP
  paragonie/random_compat                   v2.0.12            PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
  phpdocumentor/reflection-common           1.0.1              Common reflection classes used by phpdocumentor to reflect the code structure
  phpdocumentor/reflection-docblock         3.3.2              With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
  phpdocumentor/type-resolver               0.4.0             
  phpspec/prophecy                          1.7.6              Highly opinionated mocking framework for PHP 5.3+
  phpunit/php-code-coverage                 4.0.8              Library that provides collection, processing, and rendering functionality for PHP code coverage information.
  phpunit/php-file-iterator                 1.4.5              FilterIterator implementation that filters files based on a list of suffixes.
  phpunit/php-text-template                 1.2.1              Simple template engine.
  phpunit/php-timer                         1.0.9              Utility class for timing
  phpunit/php-token-stream                  1.4.12             Wrapper around PHP's tokenizer extension.
  phpunit/phpunit                           5.7.27             The PHP Unit Testing framework.
  phpunit/phpunit-mock-objects              3.4.4              Mock Object library for PHPUnit
  psr/cache                                 1.0.1              Common interface for caching libraries
  psr/container                             1.0.0              Common Container Interface (PHP FIG PSR-11)
  psr/http-message                          1.0.1              Common interface for HTTP messages
  psr/log                                   1.0.2              Common interface for logging libraries
  psr/simple-cache                          1.0.1              Common interfaces for simple caching
  sebastian/code-unit-reverse-lookup        1.0.1              Looks up which function or method a line of code belongs to
  sebastian/comparator                      1.2.4              Provides the functionality to compare PHP values for equality
  sebastian/diff                            1.4.3              Diff implementation
  sebastian/environment                     2.0.0              Provides functionality to handle HHVM/PHP environments
  sebastian/exporter                        2.0.0              Provides the functionality to export PHP variables for visualization
  sebastian/global-state                    1.1.1              Snapshotting of global state
  sebastian/object-enumerator               2.0.1              Traverses array structures and object graphs to enumerate all referenced objects
  sebastian/recursion-context               2.0.0              Provides functionality to recursively process PHP variables
  sebastian/resource-operations             1.0.0              Provides a list of PHP built-in functions that operate on resources
  sebastian/version                         2.0.1              Library that helps with managing the version number of Git-hosted PHP projects
  silverstripe-themes/simple                dev-master 4d546a4 The SilverStripe simple theme (default SilverStripe 3 theme)
  silverstripe/admin                        1.1.0              SilverStripe admin interface
  silverstripe/asset-admin                  1.1.0              Asset management for the SilverStripe CMS
  silverstripe/assets                       1.1.0              SilverStripe Assets component
  silverstripe/campaign-admin               1.1.0              SilverStripe campaign admin interface
  silverstripe/cms                          4.1.0              The SilverStripe Content Management System
  silverstripe/config                       1.0.4              SilverStripe configuration based on YAML and class statics
  silverstripe/errorpage                    1.1.0              ErrorPage component for SilverStripe CMS
  silverstripe/framework                    4.1.0              The SilverStripe framework
  silverstripe/graphql                      1.1.0              GraphQL server for SilverStripe models and other data
  silverstripe/recipe-cms                   1.1.0              SilverStripe recipe for fully featured page and asset content editing
  silverstripe/recipe-core                  1.1.0              SilverStripe framework-only core recipe
  silverstripe/recipe-plugin                1.2.0              Helper plugin to install SilverStripe recipes
  silverstripe/redirectedurls               dev-master 042ece4 Provides a system for users to configure arbitrary redirections in the CMS
  silverstripe/reports                      4.1.0              Reports module for SilverStripe CMS
  silverstripe/siteconfig                   4.1.0              Site wide settings administration.
  silverstripe/vendor-plugin                1.3.3              Allows vendor modules to expose directories to the webroot
  silverstripe/versioned                    1.1.0              SilverStripe Versioned component
  swiftmailer/swiftmailer                   v5.4.9             Swiftmailer, free feature-rich PHP mailer
  symbiote/silverstripe-gridfieldextensions 3.1.1              A collection of useful grid field components
  symfony/cache                             v3.4.8             Symfony Cache component with PSR-6, PSR-16, and tags
  symfony/config                            v3.4.8             Symfony Config Component
  symfony/filesystem                        v3.4.8             Symfony Filesystem Component
  symfony/finder                            v3.4.8             Symfony Finder Component
  symfony/polyfill-apcu                     v1.7.0             Symfony polyfill backporting apcu_* functions to lower PHP versions
  symfony/polyfill-mbstring                 v1.7.0             Symfony polyfill for the Mbstring extension
  symfony/translation                       v2.8.39            Symfony Translation Component
  symfony/yaml                              v3.4.8             Symfony Yaml Component
  undefinedoffset/sortablegridfield         2.0.4              Adds drag and drop functionality to SilverStripe 4.x's GridField
  webmozart/assert                          1.3.0              Assertions to validate method input/output with nice error messages.
  webonyx/graphql-php                       v0.8.0             A PHP port of GraphQL reference implementation
  </code></pre>