1.0.5 • Published 1 year ago

channelwill-editor v1.0.5

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Channelwill Editor

Channelwill Editor 是一个基于 Lexical 的富文本编辑器,提供了简单易用的接口,方便集成到你的项目中。

安装

使用 npm 安装:

npm install channelwill-editor

使用

在你的 React 项目中引入并使用 Editor 组件:

import React from 'react';
import { Editor } from 'channelwill-editor';

function MyComponent() {
  return (
    <div>
      <h1>My Rich Text Editor</h1>
      <Editor />
    </div>
  );
}

export default MyComponent;

API

Editor

Editor 是一个 React 组件,用于渲染富文本编辑器。

cw

cw 类提供了一些方法来操作编辑器的内容:

  • getContent(): string - 获取编辑器的当前内容。
  • setContent(content: string): void - 设置编辑器的内容。
  • clearContent(): void - 清空编辑器的内容。

开发

如果你想为这个项目做贡献,请遵循以下步骤:

  1. 克隆仓库:

    git clone https://github.com/yourusername/channelwill-editor.git
  2. 安装依赖:

    npm install
  3. 启动开发服务器:

    npm run dev

贡献

欢迎贡献代码!请确保在提交 PR 之前运行所有测试并遵循项目的代码风格。

许可证

MIT License. 详见 LICENSE 文件。

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago