materialNote
materialNote copied to clipboard
Compiling in Webpack
Hello.
I'm building this into a Laravel app using Laravel Mix and webpack, and I did finally get it to compile and show up on the page, but ... every time a click on a toolbar button the preventDefault() doesn't execute and the page reloads.
The JD is required like so:
window.$ = window.jQuery = require('jquery');
require('./plugins/ckMaterializeOverrides');
require('codemirror');
require('codemirror/mode/xml/xml');
window.materialnote = require('./plugins/materialNote');
Then in my template I have this:
$('#editor').materialnote({
toolbar: [
['style', ['style', 'bold', 'italic', 'underline', 'strikethrough']],
['fonts', ['fontsize', 'fontname']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['ckMedia', ['ckImageUploader', 'ckVideoEmbeeder']],
['misc', ['link', 'picture', 'table', 'hr', 'codeview', 'fullscreen']],
['undo', ['undo', 'redo', 'help']]
],
height: 550,
minHeight: 100,
defaultBackColor: '#fff'
});
As I said it does populate my textarea, but fails to function properly.
Any help would be appreciated.