我在我的页面上使用CKeditor,但我在上传图像时遇到了问题。我正在尝试使用从this网站上传的图片。但我将this作为文件上传器,而不是另一个。
我的代码是:
CKEDITOR.editorConfig = function( config ) {
config.filebrowserUploadUrl = '/uploader/upload.php';
config.toolbar = [
{ name: 'insert', items: ['Smiley'] },
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline' ] },
{ name: 'links', items: [ 'Image' ] }
];
config.autoParagraph = false;
config.allowedContent = true;
config.fullPage = false;
config.extraAllowedContent = 'p(*)[*]{*};span(*)[*]{*};div(*)[*]{*};li(*)[*]{*};ul(*)[*]{*}';
config.extraPlugins = 'youtube,ckawesome';
config.fontawesomePath = 'https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css';
config.contentsCss = ['https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css','https://app.gratiswebshopbeginnen.nl/assets/bootstrap/css/bootstrap.min.css'];
// Se the most common block elements.
config.format_tags = 'p;h1;h2;h3;pre';
// Make dialogs simpler.
//config.removeDialogTabs = 'image:advanced;link:advanced';
};
php文件中的脚本:
<script type="text/javascript" src="/assets/plugins/ckeditor/ckeditor.js"></script>
<script>CKEDITOR.dtd.$removeEmpty['span'] = false; CKEDITOR.dtd.$removeEmpty['i'] = false;</script>
<script>CKEDITOR.env.isCompatible = true;</script>
<script type="text/javascript">
CKEDITOR.replace( 'editor1',
{
customConfig: '/assets/plugins/ckeditor/config.js',
filebrowserBrowseUrl : '/assets/plugins/ckeditor/plugins/browser/browse.php',
enterMode : CKEDITOR.ENTER_BR
});
</script>
发布于 2018-05-25 06:26:02
从你附上的图片来看,看起来你得到了正确的CKEditor插件。唯一的区别是语言,您的图片有更多的“可见”标签,因为一些标签只有在ckeditor/config.js文件中设置了特定的设置后才可用。查看来自UploadImage插件演示页面的屏幕截图:
那么,你能更具体地说明你的问题或问题是什么吗?
发布于 2018-12-02 22:55:41
使用github存储库working ckeditor / custom plugin中的插件
https://stackoverflow.com/questions/50484579
复制相似问题