Simditor图片上传

本文介绍了如何自定义Simditor的工具栏按钮以实现图片上传功能。通过修改simditor.js文件,在`<input type="file">`标签中添加`name="fileData"`属性,以支持本地图片上传。此外,还提到了 ImgUploadAction 作为处理图片上传的行动,并提供了作者和源码下载链接。
摘要由CSDN通过智能技术生成

上篇文章(Simditor使用方法)只是简单的默认配置,我们可自定义工具栏按钮使其更丰富和实现上传图片功能

初始化编辑器

<script type="text/javascript">
   $(function(){
	toolbar = [ 'title', 'bold', 'italic', 'underline', 'strikethrough',
			'color', '|', 'ol', 'ul', 'blockquote', 'code', 'table', '|',
			'link', 'image', 'hr', '|', 'indent', 'outdent' ];
	var editor = new Simditor( {
		textarea : $('#editor'),
		placeholder : '这里输入内容...',
		toolbar : toolbar,  //工具栏
		defaultImage : 'simditor-2.0.1/images/image.png', //编辑器插入图片时使用的默认图片
		upload : {
		    url
评论 25
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值