Loading editor/html/js/properties.js +17 −0 Original line number Diff line number Diff line Loading @@ -223,6 +223,7 @@ var PropertiesPanel = (function() { { cmd: 'unlink', icon: '\u2718', title: 'Link entfernen' }, { sep: true }, { custom: 'foreColor', icon: 'A\u25BC', title: 'Textfarbe' }, { custom: 'image', icon: '\uD83D\uDDBC', title: 'Bild einfügen' }, { custom: 'table', icon: '\u25A6', title: 'Tabelle einfügen' }, { sep: true }, { cmd: 'removeFormat', icon: '\u2205', title: 'Formatierung entfernen' }, Loading Loading @@ -324,6 +325,22 @@ var PropertiesPanel = (function() { hi.value = ed.innerHTML; }); })(btn, editorDiv, hiddenInput); } else if (def.custom === 'image') { (function(b, ed, hi) { b.addEventListener('click', function(e) { e.preventDefault(); if (typeof MediaBrowser !== 'undefined') { MediaBrowser.open(function(mediaItem) { if (mediaItem && mediaItem.url) { ed.focus(); var imgHtml = '<img src="' + mediaItem.url + '" alt="" style="max-width:100%;height:auto">'; document.execCommand('insertHTML', false, imgHtml); hi.value = ed.innerHTML; } }); } }); })(btn, editorDiv, hiddenInput); } else if (def.custom === 'source') { (function(b, ed, sa, hi) { b.addEventListener('click', function(e) { Loading Loading
editor/html/js/properties.js +17 −0 Original line number Diff line number Diff line Loading @@ -223,6 +223,7 @@ var PropertiesPanel = (function() { { cmd: 'unlink', icon: '\u2718', title: 'Link entfernen' }, { sep: true }, { custom: 'foreColor', icon: 'A\u25BC', title: 'Textfarbe' }, { custom: 'image', icon: '\uD83D\uDDBC', title: 'Bild einfügen' }, { custom: 'table', icon: '\u25A6', title: 'Tabelle einfügen' }, { sep: true }, { cmd: 'removeFormat', icon: '\u2205', title: 'Formatierung entfernen' }, Loading Loading @@ -324,6 +325,22 @@ var PropertiesPanel = (function() { hi.value = ed.innerHTML; }); })(btn, editorDiv, hiddenInput); } else if (def.custom === 'image') { (function(b, ed, hi) { b.addEventListener('click', function(e) { e.preventDefault(); if (typeof MediaBrowser !== 'undefined') { MediaBrowser.open(function(mediaItem) { if (mediaItem && mediaItem.url) { ed.focus(); var imgHtml = '<img src="' + mediaItem.url + '" alt="" style="max-width:100%;height:auto">'; document.execCommand('insertHTML', false, imgHtml); hi.value = ed.innerHTML; } }); } }); })(btn, editorDiv, hiddenInput); } else if (def.custom === 'source') { (function(b, ed, sa, hi) { b.addEventListener('click', function(e) { Loading