From: Bernd Bleßmann Date: Wed, 23 Feb 2022 12:33:16 +0000 (+0100) Subject: kivi.js: CKEditor macht platz für Toolbox, … X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~127 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f94425b8eabeb99abcb6f0fb2759cc9ce3d49f3f;p=kivitendo-erp.git kivi.js: CKEditor macht platz für Toolbox, … wenn das Platzhalter-Element die Klasse 'texteditor-space-for-toolbar' gestezt hat. --- diff --git a/js/kivi.js b/js/kivi.js index 31a56a443..5f9360f66 100644 --- a/js/kivi.js +++ b/js/kivi.js @@ -347,6 +347,14 @@ namespace("kivi", function(ns) { var editor = CKEDITOR.inline($e.get(0), config); $e.data('ckeditorInstance', editor); + if ($e.hasClass('texteditor-space-for-toolbar')) + editor.on('instanceReady', function() { + var editor = $e.ckeditorGet(); + var editable = editor.editable(); + $(editable.$).css("margin-top", "30px"); + }); + + if ($e.hasClass('texteditor-autofocus')) editor.on('instanceReady', function() { ns.focus_ckeditor($e); }); };