ListTextProcessor
open class ListTextProcessor : TextProcessing
Text process capable of processing keyboard inputs specific to lists. ListTextProcessor
only works after a range of text
has been converted to list using ListCommand
.
Supports the following inputs:
- Enter: Creates a new list item at the same level as the current one. Using Enter twice in a row at the last list item exits list. When used twice in a row in the middle of a list, it only creates empty list items and does not exit list.
- Shift-Enter: Adds a soft line break i.e. does not create a new list item but moves to next line.
- Tab: Indents the current level to next indentation level. A level may only be indented 1 level deeper than previous level. First level items cannot be indented.
- Shift-Tab: Outdents text in list by one level each time. Using this on first level exits the list formatting for given text.
-
Declaration
Swift
public let name: String
-
Undocumented
Declaration
Swift
public static var markerDebugOptions: ListMarkerDebugOption
-
Initializes text processor.
Declaration
Swift
public init()
-
Priority of the text processor.
Declaration
Swift
public let priority: TextProcessingPriority
-
Declaration
Swift
open func shouldProcess(_ editorView: EditorView, shouldProcessTextIn range: NSRange, replacementText text: String) -> Bool
-
Declaration
Swift
open func processInterrupted(editor: EditorView, at range: NSRange)
-
Declaration
Swift
open func willProcess(editor: EditorView, deletedText: NSAttributedString, insertedText: NSAttributedString, range: NSRange)
-
Declaration
Swift
open func process(editor: EditorView, range editedRange: NSRange, changeInLength delta: Int) -> Processed
-
Declaration
Swift
open func didProcess(editor: EditorView)
-
Declaration
Swift
open func handleKeyWithModifiers(editor: EditorView, key: EditorKey, modifierFlags: UIKeyModifierFlags, range editedRange: NSRange)