struct EditorView
Swift
struct EditorView
Not documented.
Sources/LavaUI/EditorView.swift:275
Constructors
init(text: Binding<String>, rules: [HighlightRule] = [], style: CodeStyle = CodeStyle(), font: UIFont? = nil, showLineNumbers: Bool = true, wraps: Bool = false, visibleLines: Int = 12, search: TextSearch = TextSearch(), decorations: [EditorDecoration] = [], onDecorationTap: ((EditorDecoration) -> Void)? = nil, controller: EditorController? = nil)
Not documented.
Sources/LavaUI/EditorView.swift:298
Properties
var controller: EditorController?
Not documented.
Sources/LavaUI/EditorView.swift:296
var decorations: [EditorDecoration]
Not documented.
Sources/LavaUI/EditorView.swift:292
var dumpDetail: String { get }
Not documented.
Sources/LavaUI/EditorView.swift:326
var font: UIFont?
Not documented.
Sources/LavaUI/EditorView.swift:279
var onDecorationTap: ((EditorDecoration) -> Void)?
Fired when the user clicks a decorated row's gutter icon, instead of the default "select the whole row" gutter click.
Sources/LavaUI/EditorView.swift:295
var resolvedFont: UIFont? { get }
Not documented.
Sources/LavaUI/EditorView.swift:324
var rules: [HighlightRule]
Not documented.
Sources/LavaUI/EditorView.swift:277
var search: TextSearch
Not documented.
Sources/LavaUI/EditorView.swift:291
var showLineNumbers: Bool
Not documented.
Sources/LavaUI/EditorView.swift:280
var style: CodeStyle
Not documented.
Sources/LavaUI/EditorView.swift:278
@Binding var text: String { get nonmutating set }
Not documented.
Sources/LavaUI/EditorView.swift:276
var visibleLines: Int
Not documented.
Sources/LavaUI/EditorView.swift:290
var wraps: Bool
Break long lines to the box width instead of scrolling horizontally.
Off by default, which is right for code and wrong for prose. A wrapped editor has no horizontal scroll at all, numbers logical lines rather than the rows it draws, and re-wraps the whole buffer whenever the text or the width changes — that last one is O(buffer) and shapes every line, so a multi-megabyte document is a real cost per keystroke where the same document costs nothing unwrapped.
Sources/LavaUI/EditorView.swift:289
Methods
func mountPrimitive() -> any AnyViewNode
Not documented.
Sources/LavaUI/EditorView.swift:330
func reconcilePrimitive(_ node: any AnyViewNode) -> any AnyViewNode
Not documented.
Sources/LavaUI/EditorView.swift:339