AnyEditorTextEncoding

public struct AnyEditorTextEncoding<T> : EditorTextEncoding

/// A type-erased implementation of EditorTextEncoding

  • Undocumented

    Declaration

    Swift

    public typealias EncodedType = T
  • Initializes the Encoder

    Declaration

    Swift

    public init<E>(_ encoder: E) where T == E.EncodedType, E : EditorTextEncoding

    Parameters

    encoder

    Encoder implementation to use

  • Encodes contents based on concrete encoder provided during initialization

    Declaration

    Swift

    public func encode(name: EditorContent.Name, string: NSAttributedString) -> T

    Parameters

    name

    Content name

    string

    Attributed String to be encoded