http://gw.ablueman.co.uk/tabbednotepad.php
我有3个ckeditor文本区域,这三个区域都是相同的,但与主要类别或班级有很大不同。
如果我放3个替换,效果很好。但是,如果我尝试使用CKEDITOR.replace('editor1','editor2','editor3'{
它可以代替它们,但可以正常工作,而忽略{之后的任何内容,几乎就像该类一样。
我只是在格式化CKEDITOR.replace('editor1','editor2',{}); 错误地,我需要所有三个使用相同的替换。
这是代码:
<form name="title" method="post" action="<?php echo htmlentities($_SERVER['PHP_SELF']);?>">
<textarea class="ckeditor" id="editor3" name="editor3" rows="200"><?php echo $editor3;?></textarea>
<input id="tabtitle1" name="tabtitle1" size="30" placeholder="Tab Title.." />
<input type="submit" value="Submit" >
</form>
<script type="text/javascript">
CKEDITOR.replace( 'editor1', {
height: '600px',
enterMode: CKEDITOR.ENTER_BR,
toolbar:
[ { name: 'document', groups: [ 'document', 'doctools' ], items: [ 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] …Run Code Online (Sandbox Code Playgroud)