mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Initial timeline HTML support.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// ElementXAttributeScope.swift
|
||||
// ElementX
|
||||
//
|
||||
// Created by Stefan Ceriu on 23/03/2022.
|
||||
// Copyright © 2022 Element. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
enum BlockquoteAttribute: AttributedStringKey {
|
||||
typealias Value = Bool
|
||||
public static var name = kMXKToolsBlockquoteMarkAttribute
|
||||
}
|
||||
|
||||
extension AttributeScopes {
|
||||
struct ElementXAttributes: AttributeScope {
|
||||
let blockquote: BlockquoteAttribute
|
||||
|
||||
let swiftUI: SwiftUIAttributes
|
||||
let uiKit: UIKitAttributes
|
||||
}
|
||||
|
||||
var elementX: ElementXAttributes.Type { ElementXAttributes.self }
|
||||
}
|
||||
|
||||
extension AttributeDynamicLookup {
|
||||
subscript<T: AttributedStringKey>(dynamicMember keyPath: KeyPath<AttributeScopes.ElementXAttributes, T>) -> T {
|
||||
return self[T.self]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user