From eebd7a1fce0274e13a04a340626c355e706bbce3 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Thu, 20 Sep 2018 11:06:53 +0200 Subject: [PATCH] Fix image plugin --- openslides/mediafiles/static/js/mediafiles/image-plugin.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openslides/mediafiles/static/js/mediafiles/image-plugin.js b/openslides/mediafiles/static/js/mediafiles/image-plugin.js index 63d030d01..169397204 100644 --- a/openslides/mediafiles/static/js/mediafiles/image-plugin.js +++ b/openslides/mediafiles/static/js/mediafiles/image-plugin.js @@ -27,7 +27,7 @@ angular.module('OpenSlidesApp.mediafiles.image-plugin', [ CKEDITOR.dialog.getCurrent().disableButton('ok'); // Load the main plugin template and paste it into the container - var template = $templateCache.get('static/templates/mediafiles/image-plugin.html'); + var template = $templateCache.get('mediafiles/static/templates/mediafiles/image-plugin.html'); if (!template) { throw 'Template for image plugin not found!'; } @@ -67,6 +67,9 @@ angular.module('OpenSlidesApp.mediafiles.image-plugin', [ CKEDITOR.tools.imagebrowser.updateImageSize(scale); } }); + + // Hack: call the resize event, so the dom does an update. + CKEDITOR.tools.callFunction(224, {}); } }); // React on double clicks in the textarea. If an image was selected, open this dialog.