1

我在 CKEditor 4.5.4 中使用增强型图像插件 (image2) 初始化图像时遇到问题。第一次加载 CKEditor 实例时,图像未正确初始化。查看图片未正确初始化。标题栏工作正常,但我无法移动或选择图片。

但是,如果我导航到我的 Web 应用程序中的另一个网页,然后导航回我们使用 CKEditor 的页面,一切正常。换句话说,如果之前已经加载了 CKEditor 实例,那么一切都运行良好。

我们将 AngularJS 1.4.4 与ng-ckeditor一起使用。这是我们使用的 editorOptions:

$scope.editorOptions = {
    language: 'no',
    customConfig: '/statisk/app/common/ckeditor/ckeditor-config.js',
    extraPlugins: 'sharedspace,image2,widget,lineutils,uploadimage,uploadwidget,filetools',
    extraAllowedContent: 'a(*); span(*); figure(align_center, align_left); div{*}; figure; figcaption; img[alt,!src]{width,height};',
    toolbar: [
                   {name: 'paragraph', items: ['BulletedList', 'NumberedList']},
                   {name: 'links', items: ['Link']},
                   {name: 'insert', items: ['Image']}
               ],
    sharedSpaces: { top: 'toolbar_hovedtekst' }
};  

HTML:

<div id="hovedtekst" data-ng-show="modus.showEditorControls()">
    <div id="toolbar_hovedtekst"></div>
    <div class="ck_editor_hovedtekst test_hovedtekst" ckeditor="editorOptions" data-ng-model="hovedtekstCtrl.content"></div>
</div>

有什么问题?

4

0 回答 0