question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Laravel Elixir Issue

See original GitHub issue

I am trying to use tinymce with VueJs so decided to import it as an npm module rather than download and add a script tag to a template.

I have version 4.3.12 and I don’t receive any errors when running Gulp, however, I receive the following console error when I run the page in Google Chrome.

theme.js:14 Uncaught TypeError: Cannot read property 'Factory' of undefined

I am not sure what the issue is referring to and cannot seem to find much information on the internet about it. I thought it would be useful to log it here so I can get some feedback from the tinymce team and other users.

Here is an example script of how I am using it in my app - please note this is within a Vue file - so FileName.vue which gets compiled down using gulp.

require('tinymce/tinymce.min.js');

export default {
    ready: function() {
        tinyMCE.init({
            selector: '#test'
        });
    },

Is it possible to confirm if this is a known issue, or if you have any information I can refer to in order to resolve the problem.

Any help is greatly appreciated.

Michael

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
spockecommented, May 24, 2016

We don’t support loading tinymce as a common js module at this point since you need to load the skin css files, plugins and themes as well and stitching those together might be difficult. However we have looked into this issue in the past and it’s something we would want people to do since it’s a common pattern. But the lazy loading feature of tinymce makes it a bit harder.

0reactions
hezhongfengcommented, Aug 2, 2017
import tinymce from 'tinymce/tinymce';
import 'tinymce/langs/zh_CN.js';
import 'tinymce/themes/modern/theme';
import 'tinymce/skins/lightgray/skin.min.css';
import 'tinymce/skins/lightgray/content.min.css';
import 'tinymce/plugins/hr/plugin';
import 'tinymce/plugins/image/plugin';
import 'tinymce/plugins/imagetools/plugin';
import 'tinymce/plugins/link/plugin';
import 'tinymce/plugins/textcolor/plugin';
import 'tinymce/plugins/colorpicker/plugin';
import 'tinymce/plugins/lists/plugin';
import 'tinymce/plugins/advlist/plugin';
import 'tinymce/plugins/paste/plugin';

Hi @fyrkant This is my code.And it work well. But tinymce.js will get langs/zh_CN.js skins/lightgray/skin.min.css and skins/lightgray/content.min.css still. Do you know how to solve it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compiling Assets (Laravel Elixir)
Laravel Elixir provides a clean, fluent API for defining basic Gulp tasks for your Laravel application. Elixir supports common CSS and JavaScript ...
Read more >
Issues · JeffreyWay/laravel-elixir-webpack-official - GitHub
Laravel Echo dies, when using gulp, because of missing pusher-js. #51 opened on Jan 21, 2017 by jeffz2012 · Custom output filename issue....
Read more >
Elixir Issues - Laracasts
I am getting error on gulp watch,how can i fix this ,please help me.i followed the instruction of ... Elixir Issues. I am...
Read more >
How to fix the below errors while trying to install laravel-elixir ...
Run npm install gulp-sass --save-dev; Run npm install. If it's still not working, try updating laravel-elixir too. Edit it's line in package.
Read more >
laravel-elixir | Yarn - Package Manager
Laravel Elixir provides a clean, fluent API for defining basic Gulp tasks for ... Fixed an issue where passing a negated path (to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found