diff --git a/README.zh-CN.md b/README.zh-CN.md index 58780d3..4496ca7 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -25,7 +25,7 @@ dotnet add package ToastUIEditor } ``` -组件支持通过 `@ref` 访问编辑器/查看器事件和方法。更多 API 请查看 NuGet 包说明和源码中的 XML 文档。 +组件支持通过 `@ref` 访问编辑器和查看器的事件与方法。完整 API 请参考源码中的 XML 文档。 ## 开发 @@ -34,8 +34,6 @@ dotnet build ToastUIEditor.sln --configuration Release dotnet test tests/ToastUIEditor.Tests/ToastUIEditor.Tests.csproj --configuration Release ``` -GitHub Actions 会构建和测试 Pull Request;发布 GitHub Release 或手动运行发布工作流即可创建并发布 NuGet 包。 - ## 许可证 本项目采用 [MIT 许可证](LICENSE)。 diff --git a/src/ToastUIEditor/README.md b/src/ToastUIEditor/README.md new file mode 100644 index 0000000..ab899c7 --- /dev/null +++ b/src/ToastUIEditor/README.md @@ -0,0 +1,35 @@ +# ToastUI Editor Blazor + +`ToastUIEditor` is a Blazor wrapper for the [Toast UI Editor](https://github.com/nhn/tui.editor). +It supports Blazor Server and Blazor WebAssembly applications targeting .NET 6, .NET 7, .NET 8, +.NET 9, and .NET 10. + +## Installation + +```shell +dotnet add package ToastUIEditor +``` + +## Quick start + +Add `@using ToastUI` to `_Imports.razor` and use the editor or viewer: + +```razor + + + +@code { + private string content = "# Hello, Toast UI!"; + private EditorOptions options = new(); +} +``` + +Use `@ref` to invoke component methods such as `GetMarkdown`, `SetMarkdown`, and `GetHTML`. +The components also expose editor and viewer events. See the repository documentation for +language registration, widget rules, and the complete API. + +## Links + +- [Repository](https://github.com/ling921/tui.editor.blazor) +- [Toast UI Editor](https://github.com/nhn/tui.editor) +- [NuGet](https://www.nuget.org/packages/ToastUIEditor/) diff --git a/src/ToastUIEditor/README.zh-CN.md b/src/ToastUIEditor/README.zh-CN.md new file mode 100644 index 0000000..5d539e0 --- /dev/null +++ b/src/ToastUIEditor/README.zh-CN.md @@ -0,0 +1,27 @@ +# ToastUI Editor Blazor + +`ToastUIEditor` 是 [Toast UI Editor](https://github.com/nhn/tui.editor) 的 Blazor 封装,支持 +Blazor Server 和 Blazor WebAssembly,目标框架包括 .NET 6、.NET 7、.NET 8、.NET 9 和 .NET 10。 + +## 安装 + +```shell +dotnet add package ToastUIEditor +``` + +## 快速开始 + +在 `_Imports.razor` 中添加 `@using ToastUI`,然后使用编辑器或查看器: + +```razor + + + +@code { + private string content = "# 你好,Toast UI!"; + private EditorOptions options = new(); +} +``` + +可以通过 `@ref` 调用 `GetMarkdown`、`SetMarkdown` 和 `GetHTML` 等组件方法。更多事件、语言和 +Widget Rule 用法,请参考[仓库 README](https://github.com/ling921/tui.editor.blazor)。 diff --git a/src/ToastUIEditor/ToastUIEditor.csproj b/src/ToastUIEditor/ToastUIEditor.csproj index 1e3985d..20e186e 100644 --- a/src/ToastUIEditor/ToastUIEditor.csproj +++ b/src/ToastUIEditor/ToastUIEditor.csproj @@ -14,7 +14,7 @@ ToastUIEditor - 1.1.1 + 1.1.0 ling921; Blazor wrapper for ToastUI Editor, see README.md file for more details. Copyright © ling921 All rights reserved. @@ -22,7 +22,7 @@ https://github.com/ling921/tui.editor.blazor git icon.png - README.nuget.md + README.md tuieditor;editor;blazor;blazorcomponent;webassembly; MIT @@ -47,9 +47,9 @@ - - - + + + @@ -59,8 +59,8 @@ - - + +