0.1.22 • Published 2 years ago

@7polo/block-editor v0.1.22

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

block-editor

基于 editorjs 封装的VUE组件

Project setup

yarn install

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build

使用说明

props

属性说明默认
readOnly是否可编辑true
blockData数据
state用户外部更新状态的true
<block-editor :readOnly="readOnly"
            v-model:blockData="article.content"
            @change="onContentChange"
            @stateChange="(state) => $emit('stateChange', state)"

插件

本工程里也提供一些常用的插件, 可按需进行剪裁

code

代码编辑器插件, 支持如下功能:

  • 代码实时高亮
  • 语言可配置
  • 主题可配置
  • 行号显示

数据格式

{
  "code": "",
  "language": "java",
  "theme": "tomorrow"
}

配置

var editor = EditorJS({
  "tools": {
    "header": {
      "class": Code,
      "config": {
        "showLine": true,
        "theme": 'tomorrow'
      }
    }
  }
});
0.1.20

2 years ago

0.1.21

2 years ago

0.1.22

2 years ago

0.1.15

2 years ago

0.1.16

2 years ago

0.1.17

2 years ago

0.1.19

2 years ago

0.1.14

2 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago