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 badges2 Answers
Reset to default 6I 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:
- Install simditor at the version 2.3.22 with webpack(Run
yarn add [email protected]
in Rails 6) import 'simple-module';
import 'simple-hotkeys';
import 'simple-uploader';
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
评论列表(0条)