GithubHelp home page GithubHelp logo

cklwblove / zebra-editor-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from baskinwind/zebra-editor-core

0.0 2.0 1.0 1.62 MB

一款强大、现代的可视化编辑器。

Home Page: https://zebrastudio.tech

License: MIT License

HTML 2.74% TypeScript 92.05% JavaScript 4.85% Stylus 0.36%

zebra-editor-core's Introduction

ZebraEditorCore

ZebraEditorCore 是斑码编辑器剔除 UI 框架,以及一些杂七杂八的库后,最基础、纯粹的富文本编辑器,该项目将焦点关注于编辑器最为关键的部分,虽说基础,但却能创造无限可能!

使用

yarn add zebra-editor-core

# or

npm i zebra-editor-core
import { mount } from "zebra-editor-core"

mount('root');

DEMO

demo

code

为什么?

目前,市面上流行的富文本编辑器主要有三大类:

  1. Markdown 编辑器:结构清晰,但功能有限,比如不能给文字加颜色,设置段落的样式等等。

  2. 基于 contenteditableHtml 富文本编辑器,如 CKEditor 。功能强大,但不受控,生成的 Html 过于混乱,掌控不了文章内容,虽能获取 Html,但却控制不了 Html 的结构,不能直接生成非 Html 结构,局限性很大,只能做 Html 相关的操作,却掌控不了文章的内容。

  3. 基于 contenteditableJS 富文本编辑器,与第二类的区别主要在于:文章结构保存在 JS 中,Html 是文章结构的映射,所有的编辑行为实际操作的是 JS 内存中的模型,如 DraftJs ,但是目前这类的编辑器,功能简单,可操作性不够。

该项目为第 3 类的富文本编辑器,相较于其他第三类富文本编辑器,它功能丰富,理论上支持所有 Css 属性,支持 Markdown 中所有的类型,包括但不限于 标题、表格、列表、引用、图片等,同时表格、列表、支持多层级嵌套,内容由 JS 表示,很容易就能生成别的类型:如 Markdown

zebra-editor-core's People

Contributors

baskinwind avatar

Watchers

 avatar  avatar

Forkers

whf605319646

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.