Skip to content

Commit

Permalink
Merge pull request #10 from mariolorenz/fix-initiate_once_if_multiple…
Browse files Browse the repository at this point in the history
…_involved

[FIX] Initiate the RTE once if multiple involved
  • Loading branch information
sribo23 committed Nov 8, 2018
2 parents e291ca0 + e0661ef commit 8c0ffda
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 34 deletions.
69 changes: 38 additions & 31 deletions build/js/backend.js
Expand Up @@ -44,49 +44,56 @@ $.noConflict();
{
$( '.ddoe-wysiwyg-editor > textarea' ).each( function ()
{
$( this ).closest( 'td' ).find( '.messagebox' ).remove();
var dataRte = $( this ).attr('data-rte');

var iHeight = $( this ).height();
if (typeof dataRte === 'undefined')
{
$( this ).attr('data-rte', '1');

var $editor = $( this ).summernote(
{
lang: 'de-DE',
minHeight: iHeight || 100,
$( this ).closest( 'td' ).find( '.messagebox' ).remove();

toolbar: [
var iHeight = $( this ).height();

[ 'style', [ 'style' ] ],
[ 'formatting', [ 'bold', 'italic', 'underline', 'strikethrough', 'clear' ] ],
//[ 'fontname', [ 'fontname' ] ],
[ 'fontsize', [ 'fontsize' ] ],
[ 'color', [ 'color' ] ],
[ 'layout', [ 'ul', 'ol', 'paragraph' ] ],
[ 'height', [ 'height' ] ],
[ 'table', [ 'table' ] ],
[ 'insert', [ 'link', 'video', 'hr' ] ],
[ 'misc', [ 'codeview' ] ]
var $editor = $( this ).summernote(
{
lang: 'de-DE',
minHeight: iHeight || 100,

],
toolbar: [

dialogsInBody: false,
[ 'style', [ 'style' ] ],
[ 'formatting', [ 'bold', 'italic', 'underline', 'strikethrough', 'clear' ] ],
//[ 'fontname', [ 'fontname' ] ],
[ 'fontsize', [ 'fontsize' ] ],
[ 'color', [ 'color' ] ],
[ 'layout', [ 'ul', 'ol', 'paragraph' ] ],
[ 'height', [ 'height' ] ],
[ 'table', [ 'table' ] ],
[ 'insert', [ 'link', 'video', 'hr' ] ],
[ 'misc', [ 'codeview' ] ]

buttons: {
ddmedia: 'ddmedia'
},
],

disableDragAndDrop: true
dialogsInBody: false,

}
);
buttons: {
ddmedia: 'ddmedia'
},

if ('disabled' === $(this).attr('disabled')) {
$(this).summernote('disable');
}
disableDragAndDrop: true

var editorContext = $editor.data( 'summernote' );
}
);

editorContext.invoke( 'codeview.activate' );
editorContext.invoke( 'codeview.deactivate' );
if ('disabled' === $(this).attr('disabled')) {
$(this).summernote('disable');
}

var editorContext = $editor.data( 'summernote' );

editorContext.invoke( 'codeview.activate' );
editorContext.invoke( 'codeview.deactivate' );
}
}
);

Expand Down
4 changes: 2 additions & 2 deletions out/src/js/backend.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion out/src/js/backend.min.js.map

Large diffs are not rendered by default.

0 comments on commit 8c0ffda

Please sign in to comment.