qiuyeyaozhuai

  富文本编辑器,kindeditor是比较好用的一款。需要的功能都有,文档、demo也详细。有什么功能去官网看一眼就好。

  官网:http://kindeditor.net/

 

  一些好用的如图片上传,kindeditor还特意抽取出来,供单独调用。

  写这博客是为了警示自己的傻逼,调了一天都没成功的图片上传插件,耐下心来看源码5分钟就搞定了。

KindEditor.ready(function(K) {
		var editor = K.editor({
			allowFileManager : true,
			uploadJson:\'/processuploadimg\'
		});
		K(\'#image1\').click(function() {
			editor.loadPlugin(\'image\', function() {
				editor.plugin.imageDialog({
					imageUrl : K(\'#url1\').val(),
					clickFn : function(url, title, width, height, border, align) {
						K(\'#url1\').val(url);
						editor.hideDialog();
					}
				});
			});
		});
});

  恩,就是这样。

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-01-13
  • 2021-07-25
  • 2021-06-23
  • 2022-12-23
猜你喜欢
  • 2021-12-09
  • 2021-06-16
  • 2021-11-20
  • 2021-07-29
  • 2021-11-27
  • 2022-12-23
相关资源
相似解决方案