javascript - Simditor with webpack - Stack Overflow

How to pile Simditor with Webpack?I'm trying to pile Simditor using Laravel Mix, But I'm gett

How to pile Simditor with Webpack?

I'm trying to pile Simditor using Laravel Mix, But I'm getting the following error:

Uncaught TypeError: Simditor.connect is not a function

Here is my js file:

window.$ = window.jQuery = require('jquery');
import 'simple-module';
import 'simditor';

$(document).ready(function () {
    $('.input.text-editor').each(function () {
        var editor = new Simditor({
            textarea: $(this).find('textarea')
        });
    });
});

Any ideia why I'm getting this error?

Editor website: simditor.tower.im

How to pile Simditor with Webpack?

I'm trying to pile Simditor using Laravel Mix, But I'm getting the following error:

Uncaught TypeError: Simditor.connect is not a function

Here is my js file:

window.$ = window.jQuery = require('jquery');
import 'simple-module';
import 'simditor';

$(document).ready(function () {
    $('.input.text-editor').each(function () {
        var editor = new Simditor({
            textarea: $(this).find('textarea')
        });
    });
});

Any ideia why I'm getting this error?

Editor website: simditor.tower.im

Share Improve this question edited Dec 5, 2018 at 20:29 Caio Kawasaki asked Dec 5, 2018 at 20:13 Caio KawasakiCaio Kawasaki 2,9607 gold badges39 silver badges73 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

I tried several versions of simditor with webpack installation, one of it worked, after version 2.3.22, JS library directories of simditor and all dependencies bee different than previous versions.

Here are my steps:

  1. Install simditor at the version 2.3.22 with webpack(Run yarn add [email protected] in Rails 6)
  2. import 'simple-module';
  3. import 'simple-hotkeys';
  4. import 'simple-uploader';
  5. import Simditor from 'simditor';

It works!

I just found it out, that you cannot build that library with webpack, you need to download the library and include the files separately to html.

Tried all, and btw You need to include

mobilecheck.js
jquery.min.js
module.js
hotkeys.js
simditor.js

For this library to work!

I was using Symfony webpack encore.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744895542a4599672.html

相关推荐

  • javascript - Simditor with webpack - Stack Overflow

    How to pile Simditor with Webpack?I'm trying to pile Simditor using Laravel Mix, But I'm gett

    1天前
    50

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信