php ckeditor 同一个页面加载多个ckeditor,javascript – 一个页面中的多个CKEditor

我试图将两个CKEditor放在同一页面上

这就是我做的

首先是ckeditor config.js

CKEDITOR.editorConfig = function( config ) {

config.language = 'en';

// config.uiColor = '#AADC6E';

CKEDITOR.stylesSet.add('my_custom_style', [

{ name: 'Page Title', element: 'h2', attributes: {'class': 'general-title min'} }

]);

//Config the KCFinder

config.filebrowserImageBrowseUrl = "/laravel-filemanager?type=Images";

config.filebrowserImageUploadUrl = "/laravel-filemanager/upload?type=Images&_token=";

config.toolbarGroups = [

{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },

{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },

{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },

{ name: 'forms', groups: [ 'forms' ] },

'/',

{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },

{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] },

{ name: 'links', groups: [ 'links' ] },

{ name: 'insert', groups: [ 'insert' ] },

'/',

{ name: 'styles', groups: [ 'styles' ] },

{ name: 'colors', groups: [ 'colors' ] },

{ name: 'tools', groups: [ 'tools' ] },

{ name: 'others', groups: [ 'others' ] },

{ name: 'about', groups: [ 'about' ] }

];

config.removeButtons = 'Save,NewPage,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Flash,Language,About';

};

然后我在同一页面上有这两个表格,她有textarea

{!! Form::label('details', 'Details') !!}

{!! Form::textarea('details', '', array('class'=>'form-control', 'placeholder'=>'Enter Details...', 'rows'=>3)) !!}

CKEDITOR.replace('details');

第二个

{!! Form::label('intro', 'Intro') !!}

{!! Form::textarea('intro', '', array('class'=>'form-control', 'placeholder'=>'Enter Details...', 'rows'=>3)) !!}

CKEDITOR.replace( 'intro');

the first one working fine but the second didn’t appear.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值