.tab-pane form {
margin-top: 20px;
}
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
原始数据
按行查看
历史