0.0.26 • Published 6 months ago

@onionsix/fe-editor v0.0.26

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

每记web编辑器文档

TODO: description

安装

yarn add @5e/editor

用法

import React, { useState } from 'react';
import { Editor } from '@5e/editor';
import 'react-quill/dist/quill.snow.css';
import '@5e/editor/lib/index.css';

const App = () => {
  const [value, setValue] = useState({});

  const onChangeValue = () => {
    // 编辑器value change
  };

  const onBlurValue = () => {
    // 失去焦点执行change操作
  };

  return (
    <Editor
      editValue={value}
      onChangeValue={onChangeValue}
      onBlurValue={onBlurValue}
    />
  );
};

export default App;

API

属性说明类型默认值
editValue编辑器内容{title: string; content: string}-
style编辑器样式{height?: number}-
onBlurValue失去焦点触发(value: {title: string; content: string}) => void-
onChangeValueonchange 触发(value: {title: string; content: string}) => void-
0.0.26

6 months ago

0.0.25

6 months ago

0.0.24

7 months ago

0.0.23

7 months ago

0.0.22

7 months ago

0.0.21

7 months ago

0.0.20

7 months ago

0.0.19

7 months ago

0.0.18

7 months ago

0.0.17

7 months ago

0.0.16

7 months ago

0.0.15

7 months ago

0.0.14

8 months ago

0.0.13

8 months ago

0.0.12

9 months ago

0.0.11

9 months ago

0.0.10

9 months ago

0.0.9

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

10 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago