html显示宇宙星星,index.html

NKeditor 在线编辑器 PHP demo

.tab-pane form {

margin-top: 20px;

}

  1. sdasdass    呵呵。。。    测试空格键

获取编辑器内容

KindEditor.ready(function(K) {

K.create('textarea[name="content1"]', {

uploadJson : K.basePath+'php/qiniu/upload_json.php',

fileManagerJson : K.basePath+'php/qiniu/file_manager_json.php',

dialogOffset : 0, //对话框距离页面顶部的位置,默认为0居中,

allowFileManager : true,

items : ['source','formatblock', 'fontname', 'fontsize','forecolor','justifyleft', 'justifycenter', 'justifyright',

'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'bold', 'italic', 'underline',

'lineheight', 'removeformat','code', 'quote', 'plainpaste','image', 'table', 'hr', 'pagebreak','link', 'unlink',

'preview','about'

],

afterChange : function() {

this.sync();

},

themeType : "primary", //主题

//错误处理 handler

errorMsgHandler : function(message, type) {

try {

JDialog.msg({type:type, content:message, timer:2000});

} catch (Error) {

alert(message);

}

}

});

K.create('textarea[name="content2"]', {

uploadJson : K.basePath+'php/qiniu/upload_json.php',

fileManagerJson : K.basePath+'php/qiniu/file_manager_json.php',

dialogOffset : 0, //对话框距离页面顶部的位置,默认为0居中,

allowFileManager : true,

allowImageUpload : true,

allowMediaUpload : true,

//cssPath : [K.basePath+'plugins/code/prism.css'], //网编辑器中插入自定义的 css

//jsPath: ['http://www.r9it.com/assets/themes/twitter/js/jquery-1.11.1.min.js'], // 插入自定义的脚本

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

});

},

showHelpGrid: true, // 是否显示输入辅助线

themeType : "primary", //主题

//错误处理 handler

errorMsgHandler : function(message, type) {

try {

JDialog.msg({type:type, content:message, timer:2000});

} catch (Error) {

alert(message);

}

}

});

// black theme

K.create('textarea[name="content3"]', {

uploadJson : K.basePath+'php/default/upload_json.php',

fileManagerJson : K.basePath+'php/default/file_manager_json.php',

allowFileManager : true,

allowImageUpload : true,

allowMediaUpload : true,

themeType : "black", //主题

//错误处理 handler

errorMsgHandler : function(message, type) {

try {

JDialog.msg({type:type, content:message, timer:2000});

} catch (Error) {

alert(message);

}

}

});

K.create('textarea[name="content4"]', {

uploadJson : K.basePath+'php/default/upload_json.php',

fileManagerJson : K.basePath+'php/default/file_manager_json.php',

allowFileManager : true,

allowImageUpload : true,

allowMediaUpload : true,

themeType : "grey", //主题

//错误处理 handler

errorMsgHandler : function(message, type) {

try {

JDialog.msg({type:type, content:message, timer:2000});

} catch (Error) {

alert(message);

}

}

});

K.create('textarea[name="content5"]', {

uploadJson : K.basePath+'php/default/upload_json.php',

fileManagerJson : K.basePath+'php/default/file_manager_json.php',

allowFileManager : true,

allowImageUpload : true,

allowMediaUpload : true,

themeType : "blue", //主题

//错误处理 handler

errorMsgHandler : function(message, type) {

try {

JDialog.msg({type:type, content:message, timer:2000});

} catch (Error) {

alert(message);

}

}

});

});

$('#btn').click(function () {

alert($('textarea[name="content1"]').val());

});

一键复制

编辑

Web IDE

原始数据

按行查看

历史

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值