kindeditor的坑之一

这个坑耗费了我傍晚一直到晚上11点。 

{load href="__PUBLIC__/js/kindeditor/themes/default/default.css,__PUBLIC__/js/kindeditor/plugins/code/prettify.css" /}
{load href="__PUBLIC__/js/kindeditor/kindeditor.js,__PUBLIC__/js/kindeditor/lang/zh_CN.js,__PUBLIC__/js/kindeditor/plugins/code/code.js,__PUBLIC__/js/kindeditor/plugins/code/prettify.js" /}

<script>
    KindEditor.ready(function (K) {
        var editor1 = K.create('textarea[name="content"]', {
            cssPath: '__PUBLIC__/js/kindeditor/plugins/code/prettify.css',
            uploadJson: '{:url("main/uploadEditor")}',
            fileManagerJson: '',
            allowFileManager: true,
            newlineTag      : 'p',
            afterCreate: function () {
                var self = this;
                K.ctrl(document, 13, function () {
                    self.sync();
                    K('form[name=example]')[0].submit();
                });
                K.ctrl(self.edit.doc, 13, function () {
                    self.sync();
                    K('form[name=example]')[0].submit();
                });
            }
        });
        prettyPrint();
    });
</script>
<!-- /KindEditor -->
<textarea id="content" name="content" style="width:780px;height:400px;"
          class="textArea">[content]</textarea>

由于这里 总是有个[content] ,本人就删除了,结果悲剧了  编辑文章的时候 ,富文本编辑器始终出不来数据库对应的content字段的内容,只好恢复,好了,有了。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

易天海

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值