获取CKEditor内容? - jQuery [英] Get CKEditor content? - jQuery

查看:169
本文介绍了获取CKEditor内容? - jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的CKEditor代码是

My CKEditor code is

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 } ) ;
};

我想获取编辑框的内容,并通过JSON从我的jQuery脚本发送。

I want to take the content of the edit box and send it via JSON from my jQuery script. I can't find how do to it.

推荐答案

这在集成指南

var editor_data = CKEDITOR.instances.big_info.getData();

您还可以使用 CKEditor博客jQuery集成文档

// Get the editor data.
var data = $( 'textarea.editor' ).val();
// Set the editor data.
$( 'textarea.editor' ).val( 'my new content' );

这篇关于获取CKEditor内容? - jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆