Classes
The following classes are available globally.
-
An attachment can be used as a container for any view object. Based on the
See moreAttachmentSize
provided, the attachment automatically renders itself alongside the text inEditorView
.Attachment
also provides helper functions likedeleteFromContainer
andrangeInContainer
Declaration
Swift
open class Attachment : NSTextAttachment, BoundsObserving
-
Shadow style for
See morebackgroundStyle
attributeDeclaration
Swift
public class ShadowStyle
-
Border style for
See morebackgroundStyle
attributeDeclaration
Swift
public class BorderStyle
-
Style for background color attribute. Adding
backgroundStyle
attribute will add border, background and shadow as per the styles specified.Important
This attribute is separate frombackgroundColor
attribute. ApplyingbackgroundColor
takes precedence over backgroundStyle i.e. the background color shows over color ofbackgroundStyle
and will not show rounded corners.Note
IdeallybackgroundStyle
may be used instead ofbackgroundColor
as it can mimic standard background color as well as border, shadow and rounded corners.Declaration
Swift
public class BackgroundStyle
-
A scrollable, multiline text region capable of resizing itself based of the height of the content. Maximum height of
See moreEditorView
may be restricted using an absolute value or by using auto-layout constraints. Instantiation ofEditorView
is simple and straightforward and can be used to host simple formatted text or complex layout containing multiple nestedEditorView
via use ofAttachment
.Declaration
Swift
open class EditorView : UIView
extension EditorView: DefaultTextFormattingProviding
-
Describes the context for the
See moreEditorView
. A context is used to execute the commands usingEditorCommandExecutor
. In a typical scenario, where there are multiple levels ofEditorView
s that are contained in anotherEditorView
by virtue of being inAttachment
s, all theEditorView
s sharing the same context automatically share theEditorCommandExecutor
. i.e. theEditorCommandExecutor
operates on only thoseEditorView
s which have the same context as provided to theEditorCommandExecutor
.Declaration
Swift
public class EditorViewContext
-
Editor command that toggles given attributes in selected range in the Editor.
See moreDeclaration
Swift
public class AttributesToggleCommand : EditorCommand
-
Editor command that toggles Bold attribute to the selected range in the Editor.
See moreDeclaration
Swift
public class BoldCommand : FontTraitToggleCommand
-
Editor command that toggles given font trait to the selected range in the Editor.
See moreDeclaration
Swift
public class FontTraitToggleCommand : EditorCommand
-
Editor command that toggles Italics attribute to the selected range in the Editor.
See moreDeclaration
Swift
public class ItalicsCommand : FontTraitToggleCommand
-
Command that can be used to toggle list attributes of selected range of text. If the length of selected range of text is 0, the attributes are applied on the current line of text.
See moreDeclaration
Swift
public class ListCommand : EditorCommand
-
Command that can be used to toggle list indentation of selected range of text.
See moreDeclaration
Swift
public class ListIndentCommand : EditorCommand
-
Command that can be used to toggle list indentation of selected range of text.
See moreDeclaration
Swift
public class ListOutdentCommand : EditorCommand
-
Undocumented
See moreDeclaration
Swift
public class StrikethroughCommand : AttributesToggleCommand
-
Undocumented
See moreDeclaration
Swift
public class UnderlineCommand : AttributesToggleCommand
-
See moreEditorCommandExecutor
manages all theEditorView
in the mainEditorView
. Sub editors may have been added asAttachment
in theEditorView
. All theEditorView
s in the hierarchy sharing the sameEditorContext
will automatically be handled by theEditorCommandExecutor
.EditorCommandExecutor
keeps the track of theEditorView
that has the focus and executes the given command in the activeEditorView
.Declaration
Swift
public class EditorCommandExecutor
-
Declaration
Swift
open class GridCell
extension GridCell: BoundsObserving
extension GridCell: EditorViewDelegate
extension GridCell: Equatable
extension GridCell: Hashable
-
A view that provides a tabular structure where each cell is an
See moreEditorView
. Since the cells contains anEditorView
in itself, it is capable of hosting any attachment thatEditorView
can host including anotherGridView
as an attachment.Declaration
Swift
public class GridView : UIView
extension GridView: UIScrollViewDelegate
extension GridView: AsyncDeferredRenderable
extension GridView: BackgroundColorObserving
-
Undocumented
See moreDeclaration
Swift
public class Utility
-
Undocumented
See moreDeclaration
Swift
public class TableCell
extension TableCell: Equatable
extension TableCell: Hashable
-
Undocumented
See moreDeclaration
Swift
public class TableCellContentView : UIView
extension TableCellContentView: BoundsObserving
extension TableCellContentView: EditorViewDelegate
-
A view that provides a tabular structure where each cell is an
See moreEditorView
. Since the cells contains anEditorView
in itself, it is capable of hosting any attachment thatEditorView
can host including anotherTableView
as an attachment.Declaration
Swift
public class TableView : UIView
extension TableView: UIScrollViewDelegate
extension TableView: AsyncDeferredRenderable
extension TableView: BackgroundColorObserving
-
Text process capable of processing keyboard inputs specific to lists.
ListTextProcessor
only works after a range of text has been converted to list usingListCommand
.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
open class ListTextProcessor : TextProcessing