Skip to content
Snippets Groups Projects
Commit 239a8a28 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Merge branch 'summernote' of github.com:noesya/osuny into summernote

parents a3abbe2b f3361dc9
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@
//= require trix
//= require summernote/summernote-bs5.min
//= require sortablejs/Sortable
//= require summernote/summernote-bs5
//= require slug/slug
//= require cocoon
//= require_self
......
/* eslint no-alert: 'off' */
/*global $, FormData */
// window.b2bylon.summernote.sendFile = function (file, toSummernote) {
// 'use strict';
// var data = new FormData();
// data.append('file', file);
// $.ajax({
// data: data,
// type: 'POST',
// headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') },
// url: '/admin/summernote_blobs',
// cache: false,
// contentType: false,
// processData: false,
// success: function (successData) {
// if (typeof successData.errors !== 'undefined' && successData.errors !== null) {
// return $.each(successData.errors, function (errorKey, messages) {
// return $.each(messages, function (messageKey, message) {
// return window.alert(message);
// });
// });
// }
// return toSummernote.summernote('pasteHTML', successData.node);
// }
// });
// };
//
// window.b2bylon.summernote.addConfig('pico', {
// toolbar: [
// ['style', ['bold', 'italic']],
// ['font', ['superscript', 'subscript']],
// ['code', ['codeview']]
// ]
// });
//
// window.b2bylon.summernote.addConfig('newsletters', {
// toolbar: [
// ['style', ['bold', 'italic']],
// ['link', ['linkDialogShow', 'unlink']],
// ['code', ['codeview']]
// ]
// });
//
// window.b2bylon.summernote.addConfig('nano', {
// toolbar: [
// ['style', ['bold', 'italic']],
// ['font', ['superscript', 'subscript']],
// ['alignment', ['ul']],
// ['code', ['codeview']]
// ]
// });
//
// window.b2bylon.summernote.addConfig('mini', {
// toolbar: [
// ['headline', ['style']],
// ['style', ['bold', 'italic']],
// ['font', ['superscript', 'subscript']],
// ['alignment', ['ul', 'ol', 'paragraph']],
// ['insert', ['hr']],
// ['link', ['linkDialogShow', 'unlink']],
// ['code', ['codeview']]
// ],
// styleTags: ['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']
// });
//
// window.b2bylon.summernote.addConfig('full', {
// disableDragAndDrop: false,
// toolbar: [
// ['headline', ['style']],
// ['style', ['bold', 'italic']],
// ['font', ['superscript', 'subscript']],
// ['alignment', ['ul', 'ol', 'paragraph']],
// ['insert', ['hr']],
// ['link', ['linkDialogShow', 'unlink']],
// ['media', ['picture']],
// ['code', ['codeview']]
// ],
// popover: {
// image: [
// ['remove', ['removeMedia']]
// ]
// }
// }, 'mini');
//
// window.b2bylon.summernote.configs.full.callbacks.onImageUpload = function (files) {
// 'use strict';
// window.b2bylon.summernote.sendFile(files[0], $(this));
// };
//
// $.extend($.summernote.lang['en-US'].image, {
// dragImageHere: 'Drag file here',
// dropImage: 'Drop file'
// });
$(function () {
'use strict';
$('[data-provider="summernote"]').each(function () {
$(this).summernote();
});
});
......@@ -3,6 +3,7 @@
@import 'appstack/light'
@import 'simple_form_password_with_hints'
@import 'simple_form_bs5_file_input'
@import 'summernote-bs5'
@import 'cropperjs/dist/cropper'
@import 'gdpr/cookie_consent'
@import 'commons/*'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment