0.1.9 • Published 2 years ago

@polo7/block-editor v0.1.9

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.8

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago