Coder Social home page Coder Social logo

sp_json_editor_secondary's Introduction

json editor 自定义

拓展功能

必填

1、ui界面增加字符串、上传控件必填*提示

富文本编辑器

  1. json editor富文本编辑器引用SCEDITOR插件,在此基础上默认增加了上传文件回调;
  2. 配置上传回调后,拓展了插入pdf、视频、音频、本地图片这几个自定义指令,在初始化json editor时候,配置plugins.sceditor.toolbar可生效 eg:
JSONEditor.plugins.sceditor.toolbar = 'localimage,pdf|video,audio'

tips:后续需要从素材库中选择

上传

  1. 自定义上传样式
  2. 拓展可以关联引用配置了的节点上传,该节点的schema如果配置了quoteSelector引用字段,则可以关联数据,然后引用上传 eg: 一个字段的schema为:
"cover": {
  "type": "string",
  "format": "url",
  "title": "封面",
  "options": {
    "upload": true,
    "quoteSelector": {
      "_nodePath": "/content/material/image",
      "schema": "material",
      "coverColumn": "url",
      "valueColumn": "url",
      "labelColumn": "name"
    }
  },
  "propertyOrder": 4
}

_nodePath: 节点路径; schema:元数据名称; coverColumn:封面字段; valueColumn:引用值的字段; labelColumn:显示文字字段;

sp_json_editor_secondary's People

Contributors

irvingozm avatar ys1ang avatar

Watchers

 avatar

Forkers

ys1ang

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.