diff --git a/Sources/RichTextKit/RichTextKit.docc/RichTextKit.md b/Sources/RichTextKit/RichTextKit.docc/RichTextKit.md index 24ec6c6a5..ad6f577cb 100644 --- a/Sources/RichTextKit/RichTextKit.docc/RichTextKit.md +++ b/Sources/RichTextKit/RichTextKit.docc/RichTextKit.md @@ -139,6 +139,10 @@ RichTextKit is available under the MIT license. See the [LICENSE][License] file - ``RichTextKeyboardToolbarMenu`` - ``RichTextKeyboardToolbarStyle`` +### Line + +- ``RichTextLine`` + ### Localization - ``RTKL10n`` @@ -169,6 +173,7 @@ RichTextKit is available under the MIT license. See the [LICENSE][License] file ### Views - ``RichTextLabelValue`` +- ``TextViewRepresentable`` diff --git a/Sources/RichTextKit/TextViewRepresentable.swift b/Sources/RichTextKit/TextViewRepresentable.swift new file mode 100644 index 000000000..582f98a68 --- /dev/null +++ b/Sources/RichTextKit/TextViewRepresentable.swift @@ -0,0 +1,27 @@ +// +// TextViewRepresentable.swift +// RichTextKit +// +// Created by Daniel Saidi on 2024-03-04. +// Copyright © 2024 Daniel Saidi. All rights reserved. +// + +#if macOS +import AppKit + +/** + This typealias bridges platform-specific text views to make + it easier to support multi-platform. + */ +public typealias TextViewRepresentable = NSTextView +#endif + +#if iOS || os(tvOS) || os(visionOS) +import UIKit + +/** + This typealias bridges platform-specific text views to make + it easier to support multi-platform. + */ +public typealias TextViewRepresentable = UITextView +#endif