-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from danielsaidi/improvement/richtextaction
RichTextAction subscription
- Loading branch information
Showing
25 changed files
with
596 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// Insertion.swift | ||
// | ||
// | ||
// Created by Dominik Bucher on 17.01.2024. | ||
// | ||
|
||
import Foundation | ||
|
||
extension String: Insertable {} | ||
extension ImageRepresentable: Insertable {} | ||
extension [ImageRepresentable]: Insertable {} | ||
extension NSAttributedString: Insertable {} | ||
|
||
public protocol Insertable: Hashable {} | ||
|
||
public struct Insertion<T: Insertable>: Hashable { | ||
typealias Index = Int | ||
let content: T | ||
let at: Index | ||
let moveCursor: Bool | ||
} | ||
|
||
extension Insertion: Equatable { | ||
public static func == (lhs: Insertion<T>, rhs: Insertion<T>) -> Bool { | ||
return true | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.