Par*_*ser 10 javascript jquery ckeditor
我的CKEditor代码是
window.onload = function()
{
var editor = CKEDITOR.replace( \'big_info\' );
CKEDITOR.config.height = \'330px\';
CKEDITOR.config.toolbar_Full =
[
[\'Source\',\'-\',\'Templates\'],
[\'Maximize\', \'ShowBlocks\'],
[\'Cut\',\'Copy\',\'Paste\',\'PasteText\',\'PasteFromWord\',\'-\',\'SpellChecker\', \'Scayt\'],
[\'Undo\',\'Redo\',\'-\',\'Find\',\'Replace\',\'-\',\'SelectAll\',\'RemoveFormat\'],
[\'TextColor\',\'BGColor\'],
[\'NumberedList\',\'BulletedList\',\'-\',\'Outdent\',\'Indent\',\'Blockquote\'],
\'/\',
[\'Bold\',\'Italic\',\'Underline\',\'Strike\',\'-\'],
[\'Styles\',\'Format\',\'Font\',\'FontSize\'],
[\'JustifyLeft\',\'JustifyCenter\',\'JustifyRight\',\'JustifyBlock\'],
[\'Link\',\'Unlink\',\'Anchor\'],
[\'Image\',\'Flash\',\'Table\',\'HorizontalRule\',\'PageBreak\']
];
CKFinder.SetupCKEditor( editor, { BasePath : \'/javascript/ckfinder/\', RememberLastFolder : false } ) ;
};
Run Code Online (Sandbox Code Playgroud)
我想获取编辑框的内容并通过我的jQuery脚本中的JSON发送它.我找不到怎么做.
Alf*_*oML 36
这在集成指南中有说明
var editor_data = CKEDITOR.instances.big_info.getData();
Run Code Online (Sandbox Code Playgroud)
您还可以使用jQuery集成,如CKEditor博客和jQuery集成文档中所述
// Get the editor data.
var data = $( 'textarea.editor' ).val();
// Set the editor data.
$( 'textarea.editor' ).val( 'my new content' );
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
41209 次 |
| 最近记录: |