RichEditorSwiftUI
iOS WYSIWYG 富文本编辑器,适用于 SwiftUI。
功能
编辑器提供了以下 选项
- 粗体
- 斜体
- 下划线
- 不同的标题
如何在项目中添加
添加依赖
import XYZRichEditor
如何使用?
struct EditorView: View {
@ObservedObject var state: RichEditorState = .ini(input: "Hello World")
var body: some View {
RichEditor(state: _state)
.padding(10)
}
}
示例
示例应用程序展示了库的使用其实非常简单。
错误和反馈
有关错误、问题和讨论,请使用 Github 问题。
致谢
RichEditor for SwiftUI 由 Canopas 团队所有并维护。有关项目更新和发布,您可以在 Twitter 上关注他们:@canopassoftware。
RichTextKit: https://github.com/danielsaidi/RichTextKit
许可
Copyright 2023 Canopas Software LLP
Licensed under the Apache License, Version 2.0 (the "License");
You won't be using this file except in compliance with the License.
You may obtain a copy of the License at
https://apache.ac.cn/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.