All Projects → ianho → xing-weapp-editor

ianho / xing-weapp-editor

Licence: MIT License
开箱即用的微信小程序图文编辑组件

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to xing-weapp-editor

Wxparse
wxParse-微信小程序富文本解析自定义组件,支持HTML及markdown解析
Stars: ✭ 7,618 (+7442.57%)
Mutual labels:  weixin, weapp
Wechat Weapp Movie
🎬电影推荐 - 微信小程序
Stars: ✭ 1,355 (+1241.58%)
Mutual labels:  weixin, weapp
Tina
💃 一款轻巧的渐进式微信小程序框架
Stars: ✭ 1,153 (+1041.58%)
Mutual labels:  weixin, weapp
Min Cli
Min 小程序组件化解决方案
Stars: ✭ 807 (+699.01%)
Mutual labels:  weixin, weapp
Wxa Plugin Canvas
小程序海报组件-生成朋友圈分享海报并生成图片
Stars: ✭ 2,692 (+2565.35%)
Mutual labels:  weixin, weapp
Weapp Bmscore
a weapp to count badminton game score
Stars: ✭ 17 (-83.17%)
Mutual labels:  weixin, weapp
Weapp Typescript
使用TypeScript开发微信小程序的demo, 包含微信小程序weixin最新的.d.ts定义
Stars: ✭ 84 (-16.83%)
Mutual labels:  weixin, weapp
Minui
基于规范的小程序 UI 组件库,自定义标签组件,简洁、易用、工具化
Stars: ✭ 3,512 (+3377.23%)
Mutual labels:  weixin, weapp
Chronus
🕐 一款能帮助管理生活目标的微信小程序
Stars: ✭ 195 (+93.07%)
Mutual labels:  weixin, weapp
Wxapp Webpack Plugin
📦 微信小程序 webpack 插件
Stars: ✭ 185 (+83.17%)
Mutual labels:  weixin, weapp
Iview Weapp
一套高质量的微信小程序 UI 组件库
Stars: ✭ 6,145 (+5984.16%)
Mutual labels:  weixin, weapp
Weapp Workflow
基于Gulp 的微信小程序前端开发工作流 💯
Stars: ✭ 241 (+138.61%)
Mutual labels:  weixin, weapp
Zanui Weapp
本仓库已不再维护,请移步 https://github.com/youzan/vant-weapp
Stars: ✭ 540 (+434.65%)
Mutual labels:  weixin, weapp
Xiaochengxu demos
小程序优秀项目源码汇总,每个项目都有图有源码,零基础学微信小程序,小程序表格,小程序视频,小程序视频弹幕,小程序仿天猫大转盘抽奖等源码,小程序云开发,小程序发邮件,小程序支付,微信支付,持续更新。。。
Stars: ✭ 855 (+746.53%)
Mutual labels:  weixin, weapp
Wux Weapp
🐶 一套组件化、可复用、易扩展的微信小程序 UI 组件库
Stars: ✭ 4,706 (+4559.41%)
Mutual labels:  weixin, weapp
Wemark
微信小程序Markdown渲染库
Stars: ✭ 1,159 (+1047.52%)
Mutual labels:  weixin, weapp
Weapp Douban Film
微信小程序-豆瓣电影
Stars: ✭ 303 (+200%)
Mutual labels:  weixin, weapp
Wuss Weapp
🐳wuss-weapp 一款高质量,组件齐全,高自定义的微信小程序UI组件库
Stars: ✭ 338 (+234.65%)
Mutual labels:  weixin, weapp
Leshare Shop Weapp
基于微信小程序的电商平台,采用原生框架开发
Stars: ✭ 183 (+81.19%)
Mutual labels:  weixin, weapp
Vant Weapp
轻量、可靠的小程序 UI 组件库
Stars: ✭ 15,428 (+15175.25%)
Mutual labels:  weixin, weapp

⚠️ 太久没空更新,不确定是否可用

xing-weapp-editor

开箱即用的小程序图文编辑组件

代码片段

https://developers.weixin.qq.com/s/adp5u9mk7H6w

效果预览

组件属性

属性名 类型 默认值 说明
image-upload-url String 图片上传,必填,参考wx.uploadFile
image-upload-name String 图片上传,必填,参考wx.uploadFile
image-upload-header String 图片上传,参考wx.uploadFile
image-upload-form-data Object 图片上传,参考wx.uploadFile
image-upload-key-chain String 图片上传接口返回值中url字段的路径,如返回为{ image : { url: 'http://xxx.jpg' } },则填image.url
output-type String html 输出的格式,htmlarray,参考rich-text
button-background-color String #409EFF 完成按钮的背景色
button-text-color String #fff 完成按钮的前景色
nodes Array 初始内容的array形式,仅支持此组件输出的array,优先于HTML
html String 初始内容的HTML形式,仅支持此组件输出的HTML
bindfinish EventHandle 输出内容时触发,event.detail = { content }

代码示例

<!-- index.wxml -->
<xing-editor
  bindfinish="finish"
  output-type="html"
  image-upload-url="http://localhost:3000/upload"
  image-upload-name="image"
  image-upload-key-chain="image.url"
  html="{{html}}"/>
//index.js
Page({
  data: {
    html: '<p class="xing-p">123124<br><br>123124123<br><br><br>324123</p>' +
    '<img class="xing-img" style="width: 100%" src="http://localhost:3000/static/73e95bd90f005.png" _height="0.5743348982785602" _uploaded="true"></img>' +
    '<p class="xing-p">333</p>' +
    '<img class="xing-img" style="width: 100%" src="http://localhost:3000/static/2dab4bd82f879.png" _height="1.2095588235294117" _uploaded="true"></img>',
  },

  finish: function (e) {
    console.log(e.detail.content);
  },
})
{
  "usingComponents": {
    "xing-editor": "/components/xing-editor"
  }
}

TODO List

  • □ 文字格式编辑
  • □ 图片免上传(转Base64存储)
  • □ 编辑预览
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].