Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

UCloud-FE/vision

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vision

可视化网页编辑器引擎

vision 是基于 React 的可视化网页编辑器开发框架,你可以在此基础上,快速、可靠地开发出自己的网页编辑器。

特性

  • 简单易用
  • 高可扩展
  • 高性能
  • 无侵入
  • 尺寸小(10 KB gziped)

安装

npm install @visionjs/core --save

使用

import React, { useState } from 'react'
import { Editor, View, Data } from '@visionjs/core'
import Text from 'renderers/Text'

const defaultProps = (params) => (renderer) => ({ readonly, requestUpdateProps, props }) =>
    renderer({ readonly, requestUpdateProps, props: { ...params, ...props } })

//...
//my editor
() => {
  const [data, setData] = useState(new Data())

  return (
    <Editor data={data} onChange={setData}>
      <h1>
        <View id="title" render={defaultProps({ content: 'title' })(Text)} />
      </h1>
      <View
        id="description"
        render={defaultProps({ content: 'description' })(Text)}
      />
    </Editor>
  )
}

文档

文档参考:https://visionjs.netlify.com/

相关信息

qq 群: 730672328

demo: https://example-landing-vision.netlify.com/

License

Licensed under the MIT License, Copyright © 2018-present 陈雨童.

About

A framework to create the WYSIWYG Web Page Editor of yours.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 54.1%
  • TypeScript 42.6%
  • CSS 1.8%
  • HTML 1.5%