如何在Ckeditor中安装oembed?

时间:2019-02-04 12:39:23

标签: javascript ckeditor oembed video-embedding

我试图在我的ckeditor中包含oembed插件。为此,我做了以下配置:

  CKRte.prototype.config = {
        toolbar: [{
            name: "basicstyles",
            items: ["Bold", "Italic", "Underline", "NumberedList", "BulletedList", "Outdent", "Indent", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock", "TextColor"]
        },
        { name: 'links', 
           items : [ 'Link','Unlink','Anchor' ] 
        },
        { name: 'oembed',
         items: ['oembed']
        }],
        autoParagraph: false,
        autoUpdateElement: false,
        removePlugins: "elementspath",
        resize_enabled: false
    };

链接和基本样式工作正常,但未显示媒体选项。有什么东西可以支撑配置吗?

除此之外,我还尝试将其包含在config.js中:

CKEDITOR.editorConfig = function( config ) {
    config.baseFloatZIndex = 100000; // fix for CKEditor in modal dialog
    var CKEDITOR_BASEPATH = '/etc/clientlibs/abc/ckeditor/';
    var contextPath = document.location.origin;
    if (contextPath !== null && contextPath.length > 0) {
        CKEDITOR_BASEPATH = contextPath + CKEDITOR_BASEPATH + 'abc-editor.css';
    }
    config.contentsCss = [CKEDITOR.getUrl( 'contents.css' ), CKEDITOR_BASEPATH];
    config.extraPlugins = 'oembed,widget';
};

可以帮忙吗?

0 个答案:

没有答案