Loading document parsing libraries...
# Editor
Class Inherits DesktopCanvas
## About
`Editor` is the canvas control that owns the document, selection, editing session, node registry, toolbar, text services, history, search, scrolling, and import/export operations.
The constructor installs the built-in text and heading prototypes, built-in exporters, and native text-service providers. Add every additional node type an editor instance should support to `NodeTypes` from its `Opening` event.
Related objects are grouped behind read-only properties the editor creates when it is constructed: `Selection`, `History`, `Search`, and `Formatting` for commands, `Statistics` for counts, `Annotations` for discussion threads, and `NodeTypes`, `Exporters`, `SuggestionProviders`, and `ToolbarItems` for what an application plugs in. The four lists share one shape, matching `Toolbar` and `ToolbarSection`: `Add`, `AddAt`, `IndexOf`, `Item(identifier)`, `ItemAt`, `Items`, `LastIndex`, `Remove(identifier)`, `Remove(item)`, `RemoveAll`, and `RemoveAt`.
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| AnnotationAdded | annotation As GraffitiProEditor.Annotation | (None) | Raised after a discussion is started on text or a node, with the new annotation. |
| AnnotationChanged | annotation As GraffitiProEditor.Annotation | (None) | Raised after a reply is added or removed, or a discussion is resolved or reopened. |
| AnnotationRemoved | annotation As GraffitiProEditor.Annotation | (None) | Raised after an annotation is removed, with the annotation that was removed. |
| AnnotationSelected | annotation As GraffitiProEditor.Annotation | Boolean | Raised when the user clicks a comment icon in the document's margin, with the line's first open thread. Return True to show the thread in your own interface instead of the comment popover. |
| CollaborationConnected | (None) | (None) | Raised after collaboration opens successfully for the current document. |
| CollaborationDisconnected | (None) | (None) | Raised when the current collaboration session ends. |
| CollaborationUserConnected | collaborator As GraffitiProEditor.Network.User | (None) | Raised when another user joins the current collaborative document. |
| CollaborationUserDisconnected | collaborator As GraffitiProEditor.Network.User | (None) | Raised when another user leaves the current collaborative document. |
| ContentChanged | node As GraffitiProEditor.Node | (None) | Raised when a node's content or persistent properties change, with the node, or Nil for document-wide changes. |
| FetchLinkMetadata | node As GraffitiProEditor.Node <br> url As String | Boolean | Raised before a bookmark or embed fetches metadata for its address. Return True to supply the metadata yourself by setting the node properties, or to turn fetching off. |
| KeyPress | key As String | Boolean | Raised before the editor handles a key press. Return True to mark the key as handled. |
| LinkPressed | node As GraffitiProEditor.Node <br> url As String <br> text As String <br> title As String | (None) | Raised when the user clicks a hyperlink while holding Ctrl on Windows and Linux or Command on macOS, with the node that holds the link, its URL, its complete link text, and its title. |
| MessageShowing | message As GraffitiProEditor.Notification | Boolean | Raised before the editor shows a notification. Return True to show it another way, such as in the application's own status area, instead. |
| NodeDragging | node As GraffitiProEditor.Node <br> beforeNode As GraffitiProEditor.Node <br> parentNode As GraffitiProEditor.Node <br> targetX As Integer <br> targetY As Integer | Boolean | Raised while a node is being dragged. Return True to disallow the current destination. |
| NodeDropped | node As GraffitiProEditor.Node <br> beforeNode As GraffitiProEditor.Node <br> parentNode As GraffitiProEditor.Node <br> targetX As Integer <br> targetY As Integer | Boolean | Raised when a dragged node is dropped. Return True to cancel the move. |
| NodeKeyPress | node As GraffitiProEditor.Node <br> key As String | Boolean | Raised before the editor handles a key press for the current node. Return True to mark the key as handled. |
| NodePointerEnter | node As GraffitiProEditor.Node | (None) | Raised when the pointer enters a node. |
| NodePointerExit | node As GraffitiProEditor.Node | (None) | Raised when the pointer leaves a node. |
| NodePointerMove | node As GraffitiProEditor.Node <br> x As Integer <br> y As Integer | (None) | Raised when the pointer moves over a node. |
| Opening | (None) | (None) | Raised when the editor is about to open. Register node types and add initial content here. |
| PickerClosed | picker As GraffitiProEditor.Picker <br> committed As Boolean <br> value As Variant | (None) | Raised after a picker closes. committed is True when the user chose value, and False when the picker was cancelled or closed. |
| PickerOpened | picker As GraffitiProEditor.Picker | (None) | Raised after a picker opens, from a toolbar item or from code, once it has been laid out and its search field focused. ActivePicker returns the same picker until PickerClosed is raised. |
| PointerEnter | (None) | (None) | Raised when the pointer enters the editor. |
| PointerExit | (None) | (None) | Raised when the pointer leaves the editor. |
| PointerMoved | x As Integer <br> y As Integer | (None) | Raised when the pointer moves over the editor. |
| RemoteDocumentChanged | collaborator As GraffitiProEditor.Network.User <br> revision As Integer | (None) | Raised after a remote collaborator's document operation is applied. |
| RemoteNodeLockChanged | collaborator As GraffitiProEditor.Network.User <br> node As GraffitiProEditor.Node <br> isLocked As Boolean | (None) | Raised when a remote collaborator locks or unlocks a node. |
| RemotePointerMoved | collaborator As GraffitiProEditor.Network.User <br> node As GraffitiProEditor.Node <br> x As Double <br> y As Double | (None) | Raised when a remote collaborator's pointer moves. |
| RemoteSelectionChanged | collaborator As GraffitiProEditor.Network.User <br> node As GraffitiProEditor.Node | (None) | Raised when a remote collaborator's primary selection changes. |
| ScrollChanged | x As Double <br> y As Double | (None) | Raised after the editor's horizontal or vertical scroll position changes. |
| SelectionChanged | node As GraffitiProEditor.Node | (None) | Raised after the primary node selection changes. |
| ToolbarCustomized | (None) | (None) | Raised after the user changes the toolbar in the customizer: adds, moves, or removes an item, or changes the display mode. Save SaveToolbarState here to keep the change. Changes made in code do not raise it. |
| ToolbarItemPressed | item As GraffitiProEditor.ToolbarItem <br> selectedItem As DesktopMenuItem | (None) | Raised when a toolbar item is activated and was not handled internally. |
| ToolbarReset | (None) | (None) | Raised after the user resets the toolbar to its default set from the customizer, with Reset or by dragging the default set. Save SaveToolbarState, or clear a saved state, here. ResetToolbar called from code does not raise it. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| AddNode | node As Node | (None) | Adds node to this editor. |
| AvailableToolbarItems | (None) | ToolbarItem | Returns every item the toolbars can show, as offered by the toolbar customizer: the built-in items, the registered node types, every item on either toolbar, the items in ToolbarItems, and items that were on a toolbar in the default set, even after the user removes them. |
| BeginUpdate | (None) | (None) | Suspends visible editor updates until the matching EndUpdate call. |
| CloseInsertionChooser | (None) | (None) | Closes the insertion chooser if it is open, without inserting anything. |
| CloseMessage | message As GraffitiProEditor.Notification | (None) | Removes the supplied notification from the editor. |
| ClosePicker | (None) | (None) | Closes the open picker without choosing a value, and raises PickerClosed. Does nothing when no picker is open. |
| CloseToolbarCustomizer | (None) | (None) | Closes the toolbar customizer if it is open. |
| Collaborators | (None) | Network.User | Returns the users collaborating on the current document, including the local user. |
| Constructor | (None) | (None) | Creates an editor with its toolbar, font options, text services, built-in text and heading node types, and built-in exporters. |
| Destructor | (None) | (None) | Releases resources owned by this editor instance. |
| DrawInto | g As Graphics <br> x As Integer <br> y As Integer | (None) | Draws the complete document into the supplied graphics context without scaling its content. |
| EndUpdate | (None) | (None) | Completes an update batch and restores the editor when the outermost batch ends. |
| Export | identifier As String | String | Exports the document with the registered exporter and returns the generated text. |
| Export | identifier As String <br> file As FolderItem | Boolean | Exports the document with the registered exporter and returns whether the file was written. |
| ExportCSS | (None) | String | Returns the HTML export stylesheet as CSS text: the document rules plus the rules of each node type the document uses. |
| ExportStylesheet | (None) | GraffitiProEditor.Stylesheet | Returns the HTML export stylesheet: the document rules plus the rules of each node type the document uses. |
| FontDisplayName | fontName As String | String | Returns the name shown for a font: TextDefault for the system font and for an empty name, which follows the document font, and otherwise the name itself. |
| FontSizeDisplayName | fontSize As Double | String | Returns the text shown for a font size: the TextDefaultFontCaption for zero, which follows the document size, and otherwise the number. |
| FromHTML | html As String | (None) | Replaces the document with content imported from HTML. |
| FromJSON | value As String | (None) | Validates and restores state from JSON data, recording any issues in LastValidationIssues. |
| FromMarkdown | markdown As String | (None) | Replaces the document with content imported from Markdown. |
| InsertHTML | target As Node <br> html As String | (None) | Inserts html into the target container or root document. |
| InsertHTML | html As String | (None) | Inserts html into the target container or root document. |
| InsertMarkdown | target As Node <br> markdown As String | (None) | Inserts markdown into the target container or root document. |
| InsertMarkdown | markdown As String | (None) | Inserts markdown into the target container or root document. |
| InsertText | value As String | Boolean | Inserts Unicode text at the active editable selection using the current typing style and returns whether the document changed. |
| InspectorSections | (None) | InspectorSection | Returns the user-editable document properties exposed by the inspector. |
| LastNodeIndex | (None) | Integer | Returns the zero-based index of the last root-level node, or -1 when the document is empty. |
| LastValidationIssues | (None) | ValidationIssue | Returns a copy of the issues produced by the most recent JSON validation or load operation. |
| LoadToolbarState | state As String | (None) | Restores toolbar arrangements and the display mode from a string returned by SaveToolbarState. Items that are no longer available are skipped. Loading does not raise ToolbarCustomized. |
| Messages | (None) | GraffitiProEditor.Notification | Returns the notifications the editor is showing, newest first. |
| NodeAt | index As Integer | Node | Returns the node at the specified zero-based index. |
| NodeInvalidated | node As Node <br> layoutChanged As Boolean <br> changesDocument As Boolean = True | (None) | Updates editor caches and drawing after a node reports an appearance or layout change, and reports a content change. With changesDocument False, the change does not set IsChanged. |
| Print | ps As PrinterSetup = Nil | (None) | Prints the complete document across as many pages as required without scaling its content. |
| RefreshLocalization | (None) | (None) | Applies the current localization properties to text the editor built from them earlier: its built-in toolbar items and the toolbar items of registered node types. Call it after changing localization properties in code; Localization.Apply calls it for an editor. |
| RemoveAllNodes | (None) | (None) | Deletes all nodes from the document as a single undoable operation. |
| RemoveNode | nodeInstance As Node | (None) | Deletes the supplied node instance from the document. |
| RemoveNodeAt | index As Integer | (None) | Deletes the root-level node at the specified zero-based index. |
| ReplaceText | start As Integer <br> length As Integer <br> value As String <br> style As TextStyle = Nil | Boolean | Replaces a grapheme-aligned range in the active editable content and returns whether the document changed. |
| ResetToolbar | (None) | (None) | Restores the toolbar arrangements and display mode the editor had after its Opening event. Resetting from code does not raise ToolbarReset. |
| SaveToolbarState | (None) | String | Returns the arrangement of the classic and contextual toolbars and the display mode as a JSON string, for LoadToolbarState to restore later. Save it when ToolbarCustomized or ToolbarReset is raised to keep the user's toolbar between sessions. |
| ScrollTo | x As Double <br> y As Double | (None) | Scrolls the document so the requested location is visible. |
| ScrollTo | node As Node | (None) | Scrolls the document so the requested location is visible. |
| ShowCommandSearch | (None) | (None) | Opens command search, a searchable list of every available toolbar tool: items collapsed out of the contextual toolbar first, then the tools for the current selection, the registered node types to insert, and the other toolbar items. Choosing one presses it as if it were on the toolbar. Shift-Command-P, or Shift-Control-P on Windows and Linux, opens it from the keyboard. |
| ShowInsertionChooser | anchor As Rect = Nil | (None) | Opens the searchable node insertion chooser below the supplied anchor rectangle, in editor coordinates, or below the main toolbar when the anchor is Nil. A chosen node is inserted after the selected node, or at the end of the document. |
| ShowInsertionChooser | item As ToolbarItem | (None) | Opens the searchable node insertion chooser below the supplied main-toolbar item. A chosen node is inserted after the selected node, or at the end of the document. |
| ShowMessage | message As GraffitiProEditor.Notification | (None) | Shows the supplied notification at the top of the editor's trailing corner, above any already shown. It disappears when clicked or after its Duration. The MessageShowing event can show it another way instead. |
| ShowPicker | picker As GraffitiProEditor.Picker <br> anchor As Rect = Nil | (None) | Opens the supplied picker below the anchor rectangle, in editor coordinates, or below the main toolbar when the anchor is Nil. Any open picker or chooser closes first. The chosen value arrives in the PickerClosed event. |
| ShowPicker | item As ToolbarItem | (None) | Opens the supplied toolbar item's Picker below its main toolbar button. The chosen value reaches the item's node type or ToolbarItemPressed as the Tag of the selected DesktopMenuItem, and the PickerClosed event. |
| ShowToolbarCustomizer | (None) | (None) | Opens the toolbar customizer for the current ToolbarStyle: a sheet below the toolbar listing every available item. Drag items into the toolbar to add them, within it to reorder them, or off it to remove them; drag the default set to restore it. The sheet also chooses the display mode, resets the toolbar, and closes with Done, Return, or Escape. Each change raises ToolbarCustomized, and a reset raises ToolbarReset. |
| ThemeColor | kind As GraffitiProEditor.ThemeColors | Color | Returns the editor's value of the supplied theme color for the current system appearance. |
| ThemeColor | kind As GraffitiProEditor.ThemeColors <br> alpha As Integer | Color | Returns the supplied theme color for the current appearance with the supplied alpha, where 0 is opaque and 255 is fully transparent. |
| ToHTML | includeDocumentElements As Boolean = False <br> includeAnnotations As Boolean = False | String | Returns the editor content as HTML, including document wrapper elements and the default stylesheet when includeDocumentElements is True, and the document's annotations as a comments section after the content when includeAnnotations is True. |
| ToJSON | (None) | String | Returns a JSON representation of this object's persistent state. |
| ToMarkdown | (None) | String | Returns a Markdown representation of this content. |
| ToPicture | (None) | Picture | Renders the complete document into a new picture at its natural horizontal size. |
| ToPicture | g As Graphics | (None) | Renders the complete document into the supplied graphics context without scaling its content. |
| ToPictures | pageWidth As Double <br> pageHeight As Double | Picture | Renders the complete document into one picture per page using the supplied page size in points. |
| ToPlainText | (None) | String | Returns the complete document as plain text. |
| ToRasterPDF | file As FolderItem <br> options As GraffitiProEditor.PDFOptions = Nil | (None) | Renders the complete document into a paginated PDF whose pages are embedded raster images. |
| ToVectorPDF | file As FolderItem <br> options As GraffitiProEditor.PDFOptions = Nil | (None) | Renders the complete document as a paginated PDF using native vector drawing operations. |
| ValidateJSON | value As String | ValidationIssue | Validates json and returns the discovered issues. |
## Shared Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| DefaultThemeColor | kind As GraffitiProEditor.ThemeColors | ColorGroup | Returns a new ColorGroup holding the default light and dark values of the supplied theme color. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| ActivePicker | GraffitiProEditor.Picker | (None) | Returns the open picker, or Nil when none is open. |
| Alignment | GraffitiProEditor.Alignments | (None) | Gets or sets the alignment used when laying out document nodes whose alignment is Automatic. |
| AllowAnnotations | Boolean | (None) | Gets or sets whether users can see and add annotations. When False, the margin icons, the Add Comment command, and the comment popover are hidden, and the Inspector shows no Comments tab; annotations already in the document are kept and saved. The default is True. |
| Annotations | GraffitiProEditor.Annotations | (None) | Returns the document's discussion threads, created with the editor. Use it to start, answer, resolve, and remove annotations on text and nodes. |
| Attributes | IsScrolling | (None) | (None) |
| Attributes | IsResizingNode | (None) | (None) |
| BackgroundColor | ColorGroup | (None) | Gets or sets the document-wide background color used by the editor and all export formats. |
| BackgroundImage | GraffitiProEditor.BackgroundImage | (None) | Returns the document-wide background image configuration for runtime customization. |
| ChromeAccent | ColorGroup | (None) | Gets or sets the color of toggled toolbar buttons, inspector focus, and the selected suggestion. |
| ChromeBackground | ColorGroup | (None) | Gets or sets the background color of the editor's toolbars and the inspector. |
| ChromeBorder | ColorGroup | (None) | Gets or sets the color of interface borders and separators. |
| ChromeControl | ColorGroup | (None) | Gets or sets the fill color of toolbar buttons, inspector buttons, and inspector section headers. |
| ChromeHover | ColorGroup | (None) | Gets or sets the fill color of highlighted and hovered interface items. |
| ChromePopup | ColorGroup | (None) | Gets or sets the background color of the editor's choosers and popups. |
| ChromeText | ColorGroup | (None) | Gets or sets the color of interface text and icons. |
| ChromeTextMuted | ColorGroup | (None) | Gets or sets the color of secondary and disabled interface text and icons. |
| ColorBorder | ColorGroup | (None) | Gets or sets the color of light borders such as dividers, quote bars, and table grid lines. |
| ColorBorderStrong | ColorGroup | (None) | Gets or sets the color of form-control borders, placeholders, and disabled content. |
| ColorDanger | ColorGroup | (None) | Gets or sets the color of danger and error content such as danger alerts and spelling marks. |
| ColorDark | ColorGroup | (None) | Gets or sets the background color of code blocks and media. |
| ColorHighlight | ColorGroup | (None) | Gets or sets the default text highlight color. |
| ColorInformation | ColorGroup | (None) | Gets or sets the color of informational content such as info alerts. |
| ColorLight | ColorGroup | (None) | Gets or sets the color of text drawn on ColorDark, such as code. |
| ColorLink | ColorGroup | (None) | Gets or sets the default hyperlink color. |
| ColorPrimary | ColorGroup | (None) | Gets or sets the accent color for buttons, checked controls, the caret, resize handles, and drag and insertion indicators. |
| ColorSelection | ColorGroup | (None) | Gets or sets the color of selected-node and selected-cell outlines. |
| ColorSuccess | ColorGroup | (None) | Gets or sets the color of success content such as success alerts. |
| ColorSurface | ColorGroup | (None) | Gets or sets the fill color of table headers, disabled fields, placeholders, and forms. |
| ColorText | ColorGroup | (None) | Gets or sets the default document text color. |
| ColorTextMuted | ColorGroup | (None) | Gets or sets the color of secondary text such as captions, citations, and labels. |
| ColorTextSelection | ColorGroup | (None) | Gets or sets the translucent fill drawn behind selected text while editing. |
| ColorWarning | ColorGroup | (None) | Gets or sets the color of warning content such as warning alerts. |
| ContextualToolbar | GraffitiProEditor.Toolbar | (None) | Returns the arrangement of the contextual toolbar, shown when ToolbarStyle is Contextual. Its special items insert, custom, context, flexiblespace, and search stand for the Insert button, the application's own Toolbar sections, the tools for the current selection, the leftover width, and the command search button. |
| Direction | GraffitiProEditor.Directions | (None) | Gets or sets the document's text direction. Automatic gives each paragraph the direction of its first letter and lays out the editor's interface for the system language. |
| DocumentID | String | (None) | Gets or sets the stable document identifier. It is empty in a new editor; assign a unique value, such as a UUID, before hosting the document for collaboration. FromJSON restores the saved one. |
| Exporters | GraffitiProEditor.Exporters | (None) | Returns the export formats the editor offers, created with the editor with the built-in HTML, JSON, Markdown, and plain-text exporters. Use it to add, find, and remove exporters. |
| FontName | String | (None) | Gets or sets the document font. Text whose font is Automatic, the default for new content, uses it. |
| FontOptions | GraffitiProEditor.FontOptions | (None) | Returns the editor-wide font names, sizes, and permitted text styles. |
| FontSize | Double | (None) | Gets or sets the document font size. Text whose size is Default, the default for new content, uses it. |
| Formatting | GraffitiProEditor.Formatting | (None) | Returns the editor's formatting commands, created with the editor. Use it to toggle bold, italic, and the other character styles, clear formatting, edit links, and align text from menus and other controls. |
| History | GraffitiProEditor.History | (None) | Returns the editor's undo and redo history, created with the editor. Use it to undo, redo, and reset the history from code. |
| IsChanged | Boolean | (None) | Gets or sets whether the document has changed since it was loaded or last marked saved. Any change that raises ContentChanged sets it to True, and FromJSON, FromHTML, and FromMarkdown set it to False. Set it to False after saving the document. |
| IsCustomizingToolbar | Boolean | (None) | Returns whether the toolbar customizer is open. |
| IsEditingText | Boolean | (None) | Returns whether the editor currently has an active editable-text session. |
| IsHoverInsertionEnabled | Boolean | (None) | Gets or sets whether hovering between nodes offers a searchable registered-node insertion chooser. |
| MarkdownShortcuts | Boolean | True | Gets or sets whether Markdown typed while editing is turned into formatting: block markers such as "# " and "- " at the start of a paragraph, and inline markers such as **bold** and `code`. The default is True. |
| NodeTypes | GraffitiProEditor.NodeTypes | (None) | Returns the node types the editor can import, insert, and restore, created with the editor. Use it to register, find, and remove node types. |
| PickerVisible | Boolean | (None) | Returns whether one of the editor's popovers is open: the font or insertion chooser, a picker such as the table size picker, or a size entry field. |
| ReadOnly | Boolean | (None) | Gets or sets whether document changes are disabled while selection and copying remain available. |
| Search | GraffitiProEditor.Search | (None) | Returns the editor's search, created with the editor. Use it to find and replace text from code and to show the search popover. |
| Selection | GraffitiProEditor.Selection | (None) | Returns the editor's selection commands, created with the editor. Use it to select, copy, cut, paste, and delete from code. |
| ShowContextualToolbars | Boolean | (None) | Gets or sets whether the selected node's floating popover toolbar shows when ToolbarStyle is Contextual, whose main toolbar already carries the node's tools. False by default. When ToolbarStyle is Classic, popover toolbars are always visible, whatever this property is set to, because the classic main toolbar has no tools for the selection. |
| ShowSpellingWhenNotEditing | Boolean | (None) | Gets or sets whether misspelled words are marked in every visible node, not only in the text being edited. Read-only editors never mark misspelled words. |
| Statistics | GraffitiProEditor.Statistics | (None) | Returns the editor's statistics, created with the editor. Use it to count the words, characters, and paragraphs of the document or the selection, and to estimate reading time. |
| SuggestionProviders | GraffitiProEditor.SuggestionProviders | (None) | Returns the editor's suggestion providers, created with the editor and holding the emoji provider. Use it to add, find, and remove providers. |
| TextAcceptCharsetCaption | String | "Accept | Gets or sets the user-visible text. |
| TextAcceptedCharacterSetsCaption | String | "Accepted | Gets or sets the user-visible text. |
| TextAcceptedCharacterSetsDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextAccessibilityHintInspectorCaption | String | "Hint" | Gets or sets the user-visible text. |
| TextAccessibilityInspectorCaption | String | "Accessibility" | Gets or sets the user-visible text. |
| TextAccessibilityRoleInspectorCaption | String | "Role" | Gets or sets the user-visible text. |
| TextActionCaption | String | "Action" | Gets or sets the user-visible text. |
| TextActiveCellCaption | String | "Active | Gets or sets the user-visible text. |
| TextActiveColumnWidthCaption | String | "Active | Gets or sets the user-visible text. |
| TextActualSizeCaption | String | "Actual | Gets or sets the user-visible text. |
| TextAddAfterCaption | String | "Add | Gets or sets the user-visible text. |
| TextAddAlertCaption | String | "Add | Gets or sets the user-visible text. |
| TextAddBeforeCaption | String | "Add | Gets or sets the user-visible text. |
| TextAddCaption | String | "Add" | Gets or sets the user-visible text. |
| TextAddColumnCaption | String | "Add | Gets or sets the user-visible text. |
| TextAddCommentCaption | String | "Add | Gets or sets the user-visible text. |
| TextAddCommentTooltip | String | "Comment | Gets or sets the user-visible text. |
| TextAddHeadingCaption | String | "Add | Gets or sets the user-visible text. |
| TextAddHyperlinkMenuCaption | String | "Add | Gets or sets the user-visible text. |
| TextAddOptionCaption | String | "Add | Gets or sets the user-visible text. |
| TextAddOptionDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextAddRadioOptionDialogTitle | String | "Add | Gets or sets the user-visible text. |
| TextAddRowCaption | String | "Add | Gets or sets the user-visible text. |
| TextAddTableCaption | String | "Add | Gets or sets the user-visible text. |
| TextAlertInspectorCaption | String | "Alert" | Gets or sets the user-visible text. |
| TextAlertTypeCaption | String | "Alert | Gets or sets the user-visible text. |
| TextAlignment | GraffitiProEditor.Alignments | (None) | Gets or sets the alignment of text whose own TextAlignment is Automatic. |
| TextAlignmentCaption | String | "Alignment" | Gets or sets the user-visible text. |
| TextAlignmentInspectorDescription | String | "Positions | Gets or sets the user-visible text. |
| TextAllowMultipleSelectionsCaption | String | "Allow | Gets or sets the user-visible text. |
| TextAnotherCollaboratorCaption | String | "Another | Gets or sets the user-visible text. |
| TextAppearanceInspectorCaption | String | "Appearance" | Gets or sets the user-visible text. |
| TextApplicationToolsCaption | String | "Application | Gets or sets the user-visible text. |
| TextAreaCaption | String | "Text | Gets or sets the user-visible text. |
| TextAssociatedFormDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextAssociatedFormDialogTitle | String | "Associated | Gets or sets the user-visible text. |
| TextAssociatedFormIDCaption | String | "Associated | Gets or sets the user-visible text. |
| TextAudioCaption | String | "Audio" | Gets or sets the user-visible text. |
| TextAudioToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextAutocompleteCaption | String | "Autocomplete" | Gets or sets the user-visible text. |
| TextAutocompleteDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextAutofocusCaption | String | "Autofocus" | Gets or sets the user-visible text. |
| TextAutomatic | String | "Automatic" | Gets or sets the user-visible text. |
| TextBackgroundColorCaption | String | "Background | The caption used for the document background color inspector item. |
| TextBackgroundColorTooltip | String | "Text | Gets or sets the user-visible text. |
| TextBackgroundImageCaption | String | "Background | Gets or sets the user-visible text. |
| TextBackgroundImageDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextBackgroundToolbarCaption | String | "Background" | Gets or sets the user-visible text. |
| TextBoldCaption | String | "Bold" | Gets or sets the user-visible text. |
| TextBookmarkCaption | String | "Bookmark" | Gets or sets the user-visible text. |
| TextBookmarkToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextBookmarkURLPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextBordersInspectorCaption | String | "Borders" | Gets or sets the user-visible text. |
| TextBottomAlignmentCaption | String | "Bottom" | Gets or sets the user-visible text. |
| TextBottomColorCaption | String | "Bottom | Gets or sets the user-visible text. |
| TextBottomLeftRadiusCaption | String | "Bottom | Gets or sets the user-visible text. |
| TextBottomRightRadiusCaption | String | "Bottom | Gets or sets the user-visible text. |
| TextBottomSizeCaption | String | "Bottom | Gets or sets the user-visible text. |
| TextBottomVisibleCaption | String | "Bottom | Gets or sets the user-visible text. |
| TextButtonCaption | String | "Button" | Gets or sets the user-visible text. |
| TextButtonCommandDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextButtonCommandDialogTitle | String | "Button | Gets or sets the user-visible text. |
| TextButtonFormActionDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextButtonPropertiesCaption | String | "Button | Gets or sets the user-visible text. |
| TextButtonToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextButtonTypeCaption | String | "Button | Gets or sets the user-visible text. |
| TextButtonValueDialogTitle | String | "Button | Gets or sets the user-visible text. |
| TextCaptionCaption | String | "Caption" | Gets or sets the user-visible text. |
| TextCellBackgroundColorCaption | String | "Cell | Gets or sets the user-visible text. |
| TextCellBackgroundImageCaption | String | "Cell | Gets or sets the user-visible text. |
| TextCellBordersInspectorCaption | String | "Cell | Gets or sets the user-visible text. |
| TextCenterAlignmentCaption | String | "Center" | Gets or sets the user-visible text. |
| TextChangeImageCaption | String | "Change | Gets or sets the user-visible text. |
| TextCheckboxCaption | String | "Checkbox" | Gets or sets the user-visible text. |
| TextCheckboxPropertiesCaption | String | "Checkbox | Gets or sets the user-visible text. |
| TextCheckboxToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextCheckboxValueDialogTitle | String | "Checkbox | Gets or sets the user-visible text. |
| TextCheckedCaption | String | "Checked" | Gets or sets the user-visible text. |
| TextChecklistCaption | String | "Checklist" | Gets or sets the user-visible text. |
| TextCheckSpellingMenuCaption | String | "Check | Gets or sets the user-visible text. |
| TextChooseBackgroundImageDialogTitle | String | "Choose | Gets or sets the user-visible text. |
| TextChooseCellBackgroundColorDialogTitle | String | "Choose | Gets or sets the user-visible text. |
| TextChooseCellBackgroundImageDialogTitle | String | "Choose | Gets or sets the user-visible text. |
| TextChooseColorCaption | String | "Choose | Gets or sets the user-visible text. |
| TextChooseColumnBackgroundColorDialogTitle | String | "Choose | Gets or sets the user-visible text. |
| TextChooseColumnBackgroundImageDialogTitle | String | "Choose | Gets or sets the user-visible text. |
| TextChooseImageDialogTitle | String | "Choose | Gets or sets the user-visible text. |
| TextChooseImageMenuCaption | String | "Choose | Gets or sets the user-visible text. |
| TextChooseLocalFileCaption | String | "Choose | Gets or sets the user-visible text. |
| TextChooseMediaFileDialogTitle | String | "Choose | Gets or sets the user-visible text. |
| TextChoosePreviewImageCaption | String | "Choose | Gets or sets the user-visible text. |
| TextChooseTextBackgroundColorDialogTitle | String | "Choose | Gets or sets the user-visible text. |
| TextChooseTextColorDialogTitle | String | "Choose | Gets or sets the user-visible text. |
| TextChooseVideoPreviewImageDialogTitle | String | "Choose | Gets or sets the user-visible text. |
| TextCitationCaption | String | "Citation" | Gets or sets the user-visible text. |
| TextCodeInspectorCaption | String | "Code" | Gets or sets the user-visible text. |
| TextCodeToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextCollapseCaption | String | "Collapse" | Gets or sets the user-visible text. |
| TextColorTypeCaption | String | "Color" | Gets or sets the user-visible text. |
| TextColumnBackgroundColorCaption | String | "Column | Gets or sets the user-visible text. |
| TextColumnBackgroundImageCaption | String | "Column | Gets or sets the user-visible text. |
| TextColumnsCaption | String | "Columns" | Gets or sets the user-visible text. |
| TextColumnsToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextCommandCaption | String | "Command" | Gets or sets the user-visible text. |
| TextCommandForCaption | String | "Command | Gets or sets the user-visible text. |
| TextCommandSearchCaption | String | "Search" | Gets or sets the user-visible text. |
| TextCommandSearchHint | String | "Search | Gets or sets the user-visible text. |
| TextCommandSearchTooltip | String | "Search | Gets or sets the user-visible text. |
| TextCommentHint | String | "Add | Gets or sets the user-visible text. |
| TextCommentPositionFormat | String | "%index% | Gets or sets the user-visible format string. Use %index% and %count% for the thread's position among the node's threads. |
| TextCommentsCaption | String | "Comments" | Gets or sets the user-visible text. |
| TextContentInspectorCaption | String | "Content" | Gets or sets the user-visible text. |
| TextContextToolsCaption | String | "Selection | Gets or sets the user-visible text. |
| TextControlIDDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextControlIDDialogTitle | String | "Control | Gets or sets the user-visible text. |
| TextControlNameDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextControlNameDialogTitle | String | "Control | Gets or sets the user-visible text. |
| TextCopyCodeTooltip | String | "Copy | Gets or sets the user-visible text. |
| TextCopyMenuCaption | String | "Copy" | Gets or sets the user-visible text. |
| TextCopyRawContentTooltip | String | "Copy | Gets or sets the user-visible text. |
| TextCornersInspectorCaption | String | "Corners" | Gets or sets the user-visible text. |
| TextCorrectSpellingAutomaticallyMenuCaption | String | "Correct | Gets or sets the user-visible text. |
| TextCustomColorCaption | String | "Custom…" | Gets or sets the user-visible text. |
| TextCustomFontSizeFieldTooltip | String | "Enter | Gets or sets the user-visible text. |
| TextCustomFontSizeMenuCaption | String | "Custom…" | Gets or sets the user-visible text. |
| TextCustomizeDefaultSetInstructions | String | "…or | Gets or sets the user-visible text. |
| TextCustomizeToolbarInstructions | String | "Drag | Gets or sets the user-visible text. |
| TextCustomizeToolbarMenuCaption | String | "Customize | Gets or sets the user-visible text. |
| TextCutMenuCaption | String | "Cut" | Gets or sets the user-visible text. |
| TextDangerCaption | String | "Danger" | Gets or sets the user-visible text. |
| TextDatalistCaption | String | "Datalist" | Gets or sets the user-visible text. |
| TextDatalistDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextDatalistIDDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextDatalistIDDialogTitle | String | "Datalist | Gets or sets the user-visible text. |
| TextDatalistLabelFormat | String | "Datalist: | Gets or sets the user-visible format string. Use %id% for the datalist identifier. |
| TextDatalistOptionDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextDatalistPropertiesCaption | String | "Datalist | Gets or sets the user-visible text. |
| TextDatalistToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextDateTimeTypeCaption | String | "Date | Gets or sets the user-visible text. |
| TextDateTypeCaption | String | "Date" | Gets or sets the user-visible text. |
| TextDefault | String | "Default" | Gets or sets the user-visible text. |
| TextDefaultAuthorCaption | String | "Author" | Gets or sets the user-visible text. |
| TextDefaultColumnText | String | "Type | Gets or sets the user-visible text. |
| TextDefaultDetailsSummary | String | "Summary" | Gets or sets the user-visible text. |
| TextDefaultImageCaption | String | "Image | Gets or sets the user-visible text. |
| TextDefaultListItemCaption | String | "List | Gets or sets the user-visible text. |
| TextDefaultQuote | String | "Quoted | Gets or sets the user-visible default content used for a new quote node. |
| TextDefaultRadioGroupLegend | String | "Choose | Gets or sets the user-visible text. |
| TextDefaultRawContent | String | "Raw | Gets or sets the user-visible default content used for a new raw-content node. |
| TextDefaultSelectionCaption | String | "Default | Gets or sets the user-visible text. |
| TextDefaultTableCellText | String | "Cell" | Gets or sets the user-visible text. |
| TextDefaultTableHeadingFormat | String | "Heading | Gets or sets the user-visible text. |
| TextDefaultTextCaption | String | "Start | Gets or sets the default content used for a new text node. |
| TextDeleteCaption | String | "Delete" | Gets or sets the user-visible text. |
| TextDeleteCommentThreadCaption | String | "Delete" | Gets or sets the user-visible text. |
| TextDetailsCaption | String | "Collapsible | Gets or sets the user-visible text. |
| TextDetailsEmptyCaption | String | "Empty. | Gets or sets the user-visible text. |
| TextDetailsToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextDialogCaption | String | "Dialog" | Gets or sets the user-visible text. |
| TextDimensionsInspectorCaption | String | "Dimensions" | Gets or sets the user-visible text. |
| TextDirectionInspectorCaption | String | "Direction" | Gets or sets the user-visible text. |
| TextDirectionNameCaption | String | "Direction | Gets or sets the user-visible text. |
| TextDisabledCaption | String | "Disabled" | Gets or sets the user-visible text. |
| TextDividerCaption | String | "Divider" | Gets or sets the user-visible text. |
| TextDividerToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextDocumentInspectorCaption | String | "Document" | Gets or sets the user-visible text. |
| TextDoneCaption | String | "Done" | Gets or sets the user-visible text. |
| TextDropdownCaption | String | "Dropdown" | Gets or sets the user-visible text. |
| TextDropdownPropertiesCaption | String | "Dropdown | Gets or sets the user-visible text. |
| TextDropdownToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextDuplicateNodeCaption | String | "Duplicate" | Gets or sets the user-visible text. |
| TextDuplicateNodeTooltip | String | "Duplicate | Gets or sets the user-visible text. |
| TextEditHyperlinkMenuCaption | String | "Edit | Gets or sets the user-visible text. |
| TextEmailTypeCaption | String | "Email" | Gets or sets the user-visible text. |
| TextEmbedCaption | String | "Embed" | Gets or sets the user-visible text. |
| TextEmbeddedMediaCaption | String | "Embedded | Gets or sets the user-visible text. |
| TextEmbedToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextEmbedUnsupportedFormat | String | "%site% | Gets or sets the user-visible format string. Use %site% for the site's host. |
| TextEmbedURLPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextEmojiAndSymbolsMenuCaption | String | "Emoji | Gets or sets the user-visible text. |
| TextEncodingCaption | String | "Encoding" | Gets or sets the user-visible text. |
| TextEncodingTypeCaption | String | "Encoding | Gets or sets the user-visible text. |
| TextEndAlignmentCaption | String | "End" | Gets or sets the user-visible text. |
| TextEnterImageSourceMenuCaption | String | "Enter | Gets or sets the user-visible text. |
| TextEnterMediaURLPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextEnterURLCaption | String | "Enter | Gets or sets the user-visible text. |
| TextExpandCaption | String | "Expand" | Gets or sets the user-visible text. |
| TextExpandedCaption | String | "Expanded" | Gets or sets the user-visible text. |
| TextExternalIDCaption | String | "External | Gets or sets the user-visible text. |
| TextFieldInspectorCaption | String | "Field" | Gets or sets the user-visible text. |
| TextFileTypeCaption | String | "File" | Gets or sets the user-visible text. |
| TextFillCaption | String | "Fill" | Gets or sets the user-visible text. |
| TextFindHint | String | "Find" | Gets or sets the user-visible text. |
| TextFindNextCaption | String | "Next" | Gets or sets the user-visible text. |
| TextFirstOptionCaption | String | "First | Gets or sets the user-visible text. |
| TextFitCaption | String | "Fit" | Gets or sets the user-visible text. |
| TextFlexibleSpaceCaption | String | "Flexible | Gets or sets the user-visible text. |
| TextFontCaption | String | "Font" | Gets or sets the user-visible text. |
| TextFontFamilyMenuCaption | String | "Font | Gets or sets the user-visible text. |
| TextFontSearchHint | String | "Search | Gets or sets the user-visible text. |
| TextFontSearchTooltip | String | "Search | Gets or sets the user-visible text. |
| TextFontSizeMenuCaption | String | "Font | Gets or sets the user-visible text. |
| TextFooterCaption | String | "Footer" | Gets or sets the user-visible text. |
| TextForControlIDCaption | String | "For | Gets or sets the user-visible text. |
| TextFormActionCaption | String | "Form | Gets or sets the user-visible text. |
| TextFormActionDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextFormCaption | String | "Form" | Gets or sets the user-visible text. |
| TextFormEncodingCaption | String | "Form | Gets or sets the user-visible text. |
| TextFormIDDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextFormIDDialogTitle | String | "Form | Gets or sets the user-visible text. |
| TextFormMethodCaption | String | "Form | Gets or sets the user-visible text. |
| TextFormNameDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextFormNameDialogTitle | String | "Form | Gets or sets the user-visible text. |
| TextFormPropertiesCaption | String | "Form | Gets or sets the user-visible text. |
| TextFormRelationshipDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextFormRelationshipDialogTitle | String | "Form | Gets or sets the user-visible text. |
| TextFormTargetCaption | String | "Form | Gets or sets the user-visible text. |
| TextFormTargetDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextFormToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextGetCaption | String | "GET" | Gets or sets the user-visible text. |
| TextGroupCaption | String | "Group" | Gets or sets the user-visible text. |
| TextGroupLegendDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextHardCaption | String | "Hard" | Gets or sets the user-visible text. |
| TextHeaderCaption | String | "Header" | Gets or sets the user-visible text. |
| TextHeadingCaption | String | "Heading" | Gets or sets the user-visible text. |
| TextHeadingLevelCaption | String | "Heading | Gets or sets the user-visible text. |
| TextHeadingLevelsCaption | String | "Heading | Gets or sets the user-visible text. |
| TextHeightCaptionFormat | String | "H | Gets or sets the user-visible format string. Use %value% for the height. |
| TextHeightInspectorCaption | String | "Height" | Gets or sets the user-visible text. |
| TextHiddenTypeCaption | String | "Hidden" | Gets or sets the user-visible text. |
| TextHighlightCaption | String | "Highlight" | Gets or sets the user-visible text. |
| TextHorizontalCaption | String | "Horizontal" | Gets or sets the user-visible text. |
| TextHyperlinkCaption | String | "Hyperlink" | Gets or sets the user-visible text. |
| TextHyperlinkDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextIconAndTextCaption | String | "Icon | Gets or sets the user-visible text. |
| TextIconOnlyCaption | String | "Icon | Gets or sets the user-visible text. |
| TextIDCaption | String | "ID" | Gets or sets the user-visible text. |
| TextIgnoreSpellingMenuCaption | String | "Ignore | Gets or sets the user-visible text. |
| TextImageCaption | String | "Image" | Gets or sets the user-visible text. |
| TextImageDownloadErrorMessage | String | "The | Gets or sets the user-visible text. |
| TextImageFillModeCaption | String | "Image | Gets or sets the user-visible text. |
| TextImageOpenErrorMessage | String | "That | Gets or sets the user-visible text. |
| TextImageRequestErrorMessage | String | "The | Gets or sets the user-visible text. |
| TextImageToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextImageURLDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextImageURLDialogTitle | String | "Image | Gets or sets the user-visible text. |
| TextIndeterminateCaption | String | "Indeterminate" | Gets or sets the user-visible text. |
| TextInfoCaption | String | "Info" | Gets or sets the user-visible text. |
| TextInlineCodeCaption | String | "Inline | Gets or sets the user-visible text. |
| TextInputCaption | String | "Input" | Gets or sets the user-visible text. |
| TextInputModeCaption | String | "Input | Gets or sets the user-visible text. |
| TextInputModeDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextInputTypeCaption | String | "Input | Gets or sets the user-visible text. |
| TextInsertCaption | String | "Insert" | Gets or sets the user-visible text. |
| TextInsertNodeSearchHint | String | "Search | Gets or sets the user-visible text. |
| TextInsertNodeSearchTooltip | String | "Search | Gets or sets the user-visible text. |
| TextInsertTooltip | String | "Insert | Gets or sets the user-visible text. |
| TextInvalidPatternCaption | String | "Invalid | Gets or sets the user-visible text. |
| TextItalicCaption | String | "Italic" | Gets or sets the user-visible text. |
| TextKeyboardKeyCaption | String | "Keyboard | Gets or sets the user-visible text. |
| TextLabelCaption | String | "Label" | Gets or sets the user-visible text. |
| TextLabelPropertiesCaption | String | "Label | Gets or sets the user-visible text. |
| TextLabelTargetDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextLabelTargetDialogTitle | String | "Label | Gets or sets the user-visible text. |
| TextLabelToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextLanguageInspectorCaption | String | "Language" | Gets or sets the user-visible text. |
| TextLayoutCaption | String | "Layout" | Gets or sets the user-visible text. |
| TextLearnSpellingMenuCaption | String | "Learn | Gets or sets the user-visible text. |
| TextLeftColorCaption | String | "Left | Gets or sets the user-visible text. |
| TextLeftSizeCaption | String | "Left | Gets or sets the user-visible text. |
| TextLeftToRightDirectionCaption | String | "Left | Gets or sets the user-visible text. |
| TextLeftVisibleCaption | String | "Left | Gets or sets the user-visible text. |
| TextLegendCaption | String | "Legend" | Gets or sets the user-visible text. |
| TextLevelCaption | String | "Level" | Gets or sets the user-visible text. |
| TextLineColorCaption | String | "Line | Gets or sets the user-visible text. |
| TextLineHeightInspectorCaption | String | "Line | Gets or sets the user-visible text. |
| TextLineHeightInspectorDescription | String | "Text | Gets or sets the user-visible text. |
| TextLineHeightMenuCaption | String | "Line | Gets or sets the user-visible text. |
| TextLineHeightTooltipFormat | String | "Line | Gets or sets the user-visible format string. Use %value% for the line height. |
| TextLineSpacingInspectorCaption | String | "Line | Gets or sets the user-visible text. |
| TextLineSpacingInspectorDescription | String | "Additional | Gets or sets the user-visible text. |
| TextLineSpacingMenuCaption | String | "Line | Gets or sets the user-visible text. |
| TextLineSpacingTooltipFormat | String | "Line | Gets or sets the user-visible format string. Use %value% for the line spacing. |
| TextLineThicknessCaption | String | "Line | Gets or sets the user-visible text. |
| TextLinkCardEmptyCaption | String | "Set | Gets or sets the user-visible text. |
| TextLinkCardLoadingCaption | String | "Loading | Gets or sets the user-visible text. |
| TextLinkDescriptionCaption | String | "Description" | Gets or sets the user-visible text. |
| TextLinkPreviewCaption | String | "Link | Gets or sets the user-visible text. |
| TextLinkTitleCaption | String | "Title" | Gets or sets the user-visible text. |
| TextLinkTitleHint | String | "Optional | Gets or sets the user-visible text. |
| TextListInspectorCaption | String | "List" | Gets or sets the user-visible text. |
| TextListToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextListTypeCaption | String | "List | Gets or sets the user-visible text. |
| TextLocalFileCaption | String | "Local | Gets or sets the user-visible text. |
| TextMatchCaseTooltip | String | "Match | Gets or sets the user-visible text. |
| TextMatchCountFormat | String | "%count% | Gets or sets the user-visible text. |
| TextMatchPositionFormat | String | "%index% | Gets or sets the user-visible text. |
| TextMaximumLengthCaption | String | "Maximum | Gets or sets the user-visible text. |
| TextMediaPlaybackErrorMessage | String | "The | Gets or sets the user-visible text. |
| TextMediaSourceCaption | String | "Media | Gets or sets the user-visible text. |
| TextMediaURLDialogTitle | String | "Media | Gets or sets the localized title for the media URL entry dialog. |
| TextMergeCellsCaption | String | "Merge | Gets or sets the user-visible text. |
| TextMethodCaption | String | "Method" | Gets or sets the user-visible text. |
| TextMiddleAlignmentCaption | String | "Middle" | Gets or sets the user-visible text. |
| TextMinimumLengthCaption | String | "Minimum | Gets or sets the user-visible text. |
| TextMonthTypeCaption | String | "Month" | Gets or sets the user-visible text. |
| TextMoveNodeCaption | String | "Move" | Gets or sets the user-visible text. |
| TextMoveNodeTooltip | String | "Move | Gets or sets the user-visible text. |
| TextMultipartFormDataCaption | String | "Multipart | Gets or sets the user-visible text. |
| TextMultipleCaption | String | "Multiple" | Gets or sets the user-visible text. |
| TextNameCaption | String | "Name" | Gets or sets the user-visible text. |
| TextNewCommentCaption | String | "New | Gets or sets the user-visible text. |
| TextNewCommentThreadCaption | String | "New" | Gets or sets the user-visible text. |
| TextNewCommentThreadTooltip | String | "Start | Gets or sets the user-visible text. |
| TextNewOptionCaption | String | "New | Gets or sets the user-visible text. |
| TextNextCommentTooltip | String | "Next | Gets or sets the user-visible text. |
| TextNodeBackgroundImageCaption | String | "Node | Gets or sets the user-visible text. |
| TextNodeHeightFieldTooltip | String | "Enter | Gets or sets the user-visible text. |
| TextNodeWidthFieldTooltip | String | "Enter | Gets or sets the user-visible text. |
| TextNoHighlightCaption | String | "No | Gets or sets the user-visible text. |
| TextNoIDCaption | String | " | Gets or sets the user-visible text. |
| TextNoMatchesCaption | String | "No | Gets or sets the user-visible text. |
| TextNoMatchingCommandsCaption | String | "No | Gets or sets the user-visible text. |
| TextNoMatchingFontsCaption | String | "No | Gets or sets the user-visible text. |
| TextNoMatchingNodeTypesCaption | String | "No | Gets or sets the user-visible text. |
| TextNoMediaSelectedCaption | String | "No | Gets or sets the user-visible text. |
| TextNoneCaption | String | "None" | Gets or sets the user-visible text. |
| TextNoRepeatCaption | String | "No | Gets or sets the user-visible text. |
| TextNoSelectionCaption | String | "No | Gets or sets the user-visible text. |
| TextNumberTypeCaption | String | "Number" | Gets or sets the user-visible text. |
| TextOffCaption | String | "Off" | Gets or sets the user-visible text. |
| TextOnCaption | String | "On" | Gets or sets the user-visible text. |
| TextOneMatchCaption | String | "1 | Gets or sets the user-visible text. |
| TextOpenStatusCaption | String | "Open" | Gets or sets the user-visible text. |
| TextOptionCaption | String | "Option" | Gets or sets the user-visible text. |
| TextOptionCaptionDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextOptionCaptionDialogTitle | String | "Option | Gets or sets the user-visible text. |
| TextOptionDisabledCaption | String | "Option | Gets or sets the user-visible text. |
| TextOptionLabelCaption | String | "Option | Gets or sets the user-visible text. |
| TextOptionNumberFormat | String | "Option | Gets or sets the user-visible text. |
| TextOptionsCaption | String | "Options" | Gets or sets the user-visible text. |
| TextOptionValueCaption | String | "Option | Gets or sets the user-visible text. |
| TextOptionValueDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextOptionValueDialogTitle | String | "Option | Gets or sets the user-visible text. |
| TextOrderedCaption | String | "Ordered" | Gets or sets the user-visible text. |
| TextPageBreakCaption | String | "Page | Gets or sets the user-visible text. |
| TextPageBreakToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextPasswordTypeCaption | String | "Password" | Gets or sets the user-visible text. |
| TextPasteMenuCaption | String | "Paste" | Gets or sets the user-visible text. |
| TextPatternCaption | String | "Pattern" | Gets or sets the user-visible text. |
| TextPlaceholderCaption | String | "Placeholder" | Gets or sets the user-visible text. |
| TextPlaceholderDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextPlainTextCaption | String | "Plain | Gets or sets the user-visible text. |
| TextPopoverActionCaption | String | "Popover | Gets or sets the user-visible text. |
| TextPopoverTargetCaption | String | "Popover | Gets or sets the user-visible text. |
| TextPOSTCaption | String | "POST" | Gets or sets the user-visible text. |
| TextPreviewCaption | String | "Preview" | Gets or sets the user-visible text. |
| TextPreviewImageOpenErrorMessage | String | "That | Gets or sets the user-visible text. |
| TextPreviousCommentTooltip | String | "Previous | Gets or sets the user-visible text. |
| TextPrintDocumentTooltip | String | "Print | Gets or sets the user-visible text. |
| TextPropertiesCaption | String | "Properties" | Gets or sets the user-visible text. |
| TextQuoteCaption | String | "Quote" | Gets or sets the user-visible text. |
| TextQuoteToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextRadioGroupCaption | String | "Radio | Gets or sets the user-visible text. |
| TextRadioGroupLegendDialogTitle | String | "Radio | Gets or sets the user-visible text. |
| TextRadioGroupPropertiesCaption | String | "Radio | Gets or sets the user-visible text. |
| TextRadioGroupToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextRadioLabelDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextRadioLabelDialogTitle | String | "Radio | Gets or sets the user-visible text. |
| TextRadioValueDialogTitle | String | "Radio | Gets or sets the user-visible text. |
| TextRangeTypeCaption | String | "Range" | Gets or sets the user-visible text. |
| TextRawContentCaption | String | "Raw | Gets or sets the user-visible text. |
| TextRawContentToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextReadOnlyCaption | String | "Read | Gets or sets the user-visible text. |
| TextRedoMenuCaption | String | "Redo" | Gets or sets the user-visible text. |
| TextRefreshPreviewCaption | String | "Refresh" | Gets or sets the user-visible text. |
| TextRegExTooltip | String | "Regular | Gets or sets the user-visible text. |
| TextRelationshipCaption | String | "Relationship" | Gets or sets the user-visible text. |
| TextRemoveCaption | String | "Remove" | Gets or sets the user-visible text. |
| TextRemoveColorCaption | String | "Remove | Gets or sets the user-visible text. |
| TextRemoveColumnCaption | String | "Remove | Gets or sets the user-visible text. |
| TextRemoveFormattingTooltip | String | "Remove | Gets or sets the user-visible text. |
| TextRemoveHyperlinkMenuCaption | String | "Remove | Gets or sets the user-visible text. |
| TextRemoveImageCaption | String | "Remove | Gets or sets the user-visible text. |
| TextRemoveNodeTooltip | String | "Remove | Gets or sets the user-visible text. |
| TextRemoveOptionCaption | String | "Remove | Gets or sets the user-visible text. |
| TextRemovePreviewImageCaption | String | "Remove | Gets or sets the user-visible text. |
| TextRemoveRowCaption | String | "Remove | Gets or sets the user-visible text. |
| TextRemoveSelectedNodeTooltip | String | "Remove | Gets or sets the user-visible text. |
| TextRemoveSourceCaption | String | "Remove | Gets or sets the user-visible text. |
| TextReopenCaption | String | "Reopen" | Gets or sets the user-visible text. |
| TextRepeatBothCaption | String | "Repeat | Gets or sets the user-visible text. |
| TextRepeatCaption | String | "Repeat" | Gets or sets the user-visible text. |
| TextRepeatHorizontallyCaption | String | "Repeat | Gets or sets the user-visible text. |
| TextRepeatVerticallyCaption | String | "Repeat | Gets or sets the user-visible text. |
| TextReplaceAllCaption | String | "Replace | Gets or sets the user-visible text. |
| TextReplaceCaption | String | "Replace" | Gets or sets the user-visible text. |
| TextReplaceHint | String | "Replace" | Gets or sets the user-visible text. |
| TextReplyHint | String | "Reply" | Gets or sets the user-visible text. |
| TextRequiredCaption | String | "Required" | Gets or sets the user-visible text. |
| TextResetCaption | String | "Reset" | Gets or sets the user-visible text. |
| TextResolveCaption | String | "Resolve" | Gets or sets the user-visible text. |
| TextResolvedCaption | String | "Resolved" | Gets or sets the user-visible text. |
| TextRightColorCaption | String | "Right | Gets or sets the user-visible text. |
| TextRightSizeCaption | String | "Right | Gets or sets the user-visible text. |
| TextRightToLeftDirectionCaption | String | "Right | Gets or sets the user-visible text. |
| TextRightVisibleCaption | String | "Right | Gets or sets the user-visible text. |
| TextRowsCaption | String | "Rows" | Gets or sets the user-visible text. |
| TextSearchTypeCaption | String | "Search" | Gets or sets the user-visible text. |
| TextSecondOptionCaption | String | "Second | Gets or sets the user-visible text. |
| TextSelectAllMenuCaption | String | "Select | Gets or sets the user-visible text. |
| TextSelectCaption | String | "Select…" | Gets or sets the user-visible text. |
| TextSeparatorCaption | String | "Separator" | Gets or sets the user-visible text. |
| TextServices | GraffitiProEditor.TextServices | (None) | Returns the editor-owned registry of character-input, spelling, correction, and text-service menu providers. |
| TextSetNodeHeightTooltip | String | "Set | Gets or sets the user-visible text. |
| TextSetNodeWidthTooltip | String | "Set | Gets or sets the user-visible text. |
| TextSizeCaption | String | "Size" | Gets or sets the user-visible text. |
| TextSkipValidationCaption | String | "Skip | Gets or sets the user-visible text. |
| TextSoftCaption | String | "Soft" | Gets or sets the user-visible text. |
| TextSourceCaption | String | "Source" | Gets or sets the user-visible text. |
| TextSpellCheckCaption | String | "Spell | Gets or sets the user-visible text. |
| TextSpellingMenuCaption | String | "Spelling" | Gets or sets the user-visible text. |
| TextStartAlignmentCaption | String | "Start" | Gets or sets the user-visible text. |
| TextStretchCaption | String | "Stretch" | Gets or sets the user-visible text. |
| TextStrikethroughTooltip | String | "Strikethrough" | Gets or sets the user-visible text. |
| TextSubmissionValueCaption | String | "Submission | Gets or sets the user-visible text. |
| TextSubmitCaption | String | "Submit" | Gets or sets the user-visible text. |
| TextSubmittedValueDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextSubscriptCaption | String | "Subscript" | Gets or sets the user-visible text. |
| TextSuccessCaption | String | "Success" | Gets or sets the user-visible text. |
| TextSuggestionLabelDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextSuggestionLabelDialogTitle | String | "Suggestion | Gets or sets the user-visible text. |
| TextSuggestionValueDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextSuggestionValueDialogTitle | String | "Suggestion | Gets or sets the user-visible text. |
| TextSuperscriptCaption | String | "Superscript" | Gets or sets the user-visible text. |
| TextTableCaption | String | "Table" | Gets or sets the user-visible text. |
| TextTableCellCaption | String | "Table | Gets or sets the user-visible text. |
| TextTableOfContentsCaption | String | "Table | Gets or sets the user-visible text. |
| TextTableOfContentsEmptyCaption | String | "Add | Gets or sets the user-visible text. |
| TextTableOfContentsToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextTableSizeCaptionFormat | String | "%rows% | Gets or sets the user-visible text. |
| TextTabWidthInspectorCaption | String | "Tab | Gets or sets the user-visible text. |
| TextTargetCaption | String | "Target" | Gets or sets the user-visible text. |
| TextTelephoneTypeCaption | String | "Telephone" | Gets or sets the user-visible text. |
| TextTextAlignmentInspectorCaption | String | "Text | Gets or sets the localized inspector caption for internal text alignment. |
| TextTextAlignmentInspectorDescription | String | "Aligns | Gets or sets the user-visible text. |
| TextTextAreaToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextTextCaption | String | "Text" | Gets or sets the user-visible text. |
| TextTextColorCaption | String | "Text | Gets or sets the user-visible text. |
| TextTextFieldCaption | String | "Text | Gets or sets the user-visible text. |
| TextTextFieldToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextTextOnlyCaption | String | "Text | Gets or sets the user-visible text. |
| TextTextToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextTimeTypeCaption | String | "Time" | Gets or sets the user-visible text. |
| TextToggleFooterRowCaption | String | "Toggle | Gets or sets the user-visible text. |
| TextToggleHeaderRowCaption | String | "Toggle | Gets or sets the user-visible text. |
| TextToolbarShowCaption | String | "Show" | Gets or sets the user-visible text. |
| TextToolbarToolsCaption | String | "Toolbar" | Gets or sets the user-visible text. |
| TextTopAlignmentCaption | String | "Top" | Gets or sets the user-visible text. |
| TextTopColorCaption | String | "Top | Gets or sets the user-visible text. |
| TextTopLeftRadiusCaption | String | "Top | Gets or sets the user-visible text. |
| TextTopRightRadiusCaption | String | "Top | Gets or sets the user-visible text. |
| TextTopSizeCaption | String | "Top | Gets or sets the user-visible text. |
| TextTopVisibleCaption | String | "Top | Gets or sets the user-visible text. |
| TextTypeCaption | String | "Type" | Gets or sets the user-visible text. |
| TextTypographyInspectorCaption | String | "Typography" | Gets or sets the user-visible text. |
| TextUnderlineCaption | String | "Underline" | Gets or sets the user-visible text. |
| TextUndoMenuCaption | String | "Undo" | Gets or sets the user-visible text. |
| TextUnmergeCellsCaption | String | "Unmerge | Gets or sets the user-visible text. |
| TextUnorderedCaption | String | "Unordered" | Gets or sets the user-visible text. |
| TextUnsupportedContentFormat | String | "Unsupported | Gets or sets the user-visible text. |
| TextUnsupportedDownloadedImageMessage | String | "The | Gets or sets the user-visible text. |
| TextURLCaption | String | "URL" | Gets or sets the user-visible text. |
| TextURLEncodedCaption | String | "URL | Gets or sets the user-visible text. |
| TextUseBackgroundColorCaption | String | "Use | Gets or sets the user-visible text. |
| TextValidationPatternCaption | String | "Validation | Gets or sets the user-visible text. |
| TextValidationPatternDialogPrompt | String | "Enter | Gets or sets the user-visible text. |
| TextValueCaption | String | "Value" | Gets or sets the user-visible text. |
| TextVerticalAlignmentCaption | String | "Vertical | Gets or sets the user-visible text. |
| TextVerticalCaption | String | "Vertical" | Gets or sets the user-visible text. |
| TextVideoCaption | String | "Video" | Gets or sets the user-visible text. |
| TextVideoPreviewImageCaption | String | "Video | Gets or sets the user-visible text. |
| TextVideoToolbarTooltip | String | "Add | Gets or sets the user-visible text. |
| TextVisibleRowsCaption | String | "Visible | Gets or sets the user-visible text. |
| TextWarningCaption | String | "Warning" | Gets or sets the user-visible text. |
| TextWeekTypeCaption | String | "Week" | Gets or sets the user-visible text. |
| TextWholeWordTooltip | String | "Whole | Gets or sets the user-visible text. |
| TextWidthCaptionFormat | String | "W | Gets or sets the user-visible format string. Use %value% for the width. |
| TextWidthInspectorCaption | String | "Width" | Gets or sets the user-visible text. |
| TextWrapCaption | String | "Wrap" | Gets or sets the user-visible text. |
| Toolbar | GraffitiProEditor.Toolbar | (None) | Returns the editor-owned toolbar configuration. |
| ToolbarDisplayMode | GraffitiProEditor.ToolbarDisplayModes | (None) | Gets or sets how main toolbar items with an icon are shown: IconOnly, the default, IconAndText with the caption under the icon, or TextOnly with the caption instead. Items without an icon always show their caption. |
| ToolbarItems | GraffitiProEditor.ToolbarItems | (None) | Returns the application toolbar items the customizer offers without their being on a toolbar, created empty with the editor. |
| ToolbarStyle | GraffitiProEditor.ToolbarStyles | (None) | Gets or sets how the main toolbar is arranged: Contextual, the default, shows one row with the tools for the current selection, or Classic shows every Toolbar section in rows that wrap. |
| ToolbarVisible | Boolean | (None) | Gets or sets whether the main toolbar is shown when the editor is not read-only. |
## Notes
An editor instance is both the view and controller for its document. Prefer its public methods and owned service objects over modifying node frames or internal state directly.
### Alignment
Alignment is logical. `Leading` is the edge where the text direction starts, `Trailing` the edge where it ends, and `Middle` centers, so Leading is the left edge in left-to-right content and the right edge in right-to-left content. Menus show them as Start, Center, and End. Alignment works at three levels, and each Automatic value inherits from the level above it:
- `Editor.Alignment` is the document default. It is always `Leading`, `Middle`, or `Trailing`; assigning `Automatic` stores `Leading`. `Editor.TextAlignment` is the document's text alignment, used by text whose own `TextAlignment` is `Automatic`, with the same values and the same rule. The document inspector shows both, as Alignment and Text Alignment.
- `Node.Alignment` positions a node as a block within its container. `Automatic` uses the alignment of the container the node is in, such as a table cell, column, or form, and at the top level uses `Editor.Alignment`. `ResolvedAlignment` returns the result.
- `TextNode.TextAlignment` positions text inside a text node, and `TableNode.TextAlignment` the text of table and column cells whose own `TextSnapshot.TextAlignment` is `Automatic`. `Automatic` uses `Editor.TextAlignment`, the document's text alignment, which is `Leading` by default; it does not inherit `Node.Alignment` or `Editor.Alignment`. `ResolvedTextAlignment` returns the alignment text is drawn with.
Block alignment can only show when a node is narrower than its container. `Node.WidthMode` reports how a node is sized: `Fill` takes the container's width, `Fixed` uses an explicit width, and `Intrinsic` uses the content's natural width, as an image does. The inspector offers Alignment to nodes that are not `Fill`, and to resizable nodes, which can become narrower. Nodes that fill the content width and cannot be resized have no Alignment item, and the document alignment does not move them. `Node.SupportsTextAlignment` reports whether a node draws text that follows `TextAlignment`, as text, headings, lists, quotes, alerts, code blocks, labels, and text fields do.
The main toolbar's alignment menu applies to each selected node in turn: `TextAlignment` when the node supports text alignment, otherwise `Alignment` when it supports block alignment. A node that supports both, such as a resizable text node, gets its text aligned; set its block alignment from the inspector. Tables and columns support text alignment: the menu sets `TableNode.TextAlignment`, which cells whose own Text Alignment is Automatic follow. The menu is disabled when no selected node supports either, as for dividers, page breaks, buttons, and checkboxes. With nothing selected it sets `Editor.Alignment`, and its Automatic entry has no effect. In the inspector, a node's Alignment item is `Node.Alignment` and Text Alignment is `TextNode.TextAlignment` or `TableNode.TextAlignment`; a table cell's Text Alignment is `TextSnapshot.TextAlignment`.
JSON keeps `Automatic` values. HTML export writes each node's resolved block alignment as `margin-left` and `margin-right`, and a text node's explicit text alignment as `text-align`, so importing that HTML gives those nodes explicit alignments. Automatic text alignment is written as `text-align:start`, which follows the text's direction and imports as `Automatic`.
### Color Theme
The editor's colors are `ColorGroup` properties in the IDE inspector's Document Color Theme and Chrome Color Theme groups. Each one has a light and a dark value, and `ColorGroup` picks the one that matches the system appearance.
- Document colors (Document Color Theme): `BackgroundColor`, `ColorPrimary`, `ColorSelection`, `ColorTextSelection`, `ColorInformation`, `ColorSuccess`, `ColorWarning`, `ColorDanger`, `ColorText`, `ColorTextMuted`, `ColorLink`, `ColorBorder`, `ColorBorderStrong`, `ColorSurface`, `ColorDark`, `ColorLight`, and `ColorHighlight`. Their default light and dark values are the same: the document is assumed to have a light background in both modes. An application that changes `BackgroundColor` should update the other document colors to suit it.
- Interface colors (Chrome Color Theme): `ChromeBackground`, `ChromePopup`, `ChromeControl`, `ChromeHover`, `ChromeBorder`, `ChromeText`, `ChromeTextMuted`, and `ChromeAccent`. These color the toolbars, choosers, popups, and inspector, and their defaults differ in dark mode. `ChromeAccent` colors toggled toolbar buttons, inspector focus, and the selected suggestion, so the interface can use a different accent from the document's `ColorPrimary`.
The constructor creates the default colors. A value set in the IDE inspector, or assigned in code, replaces the default. Assigning `Nil` is ignored, and a color that is somehow `Nil` is restored to its default when it is read, so the properties never return `Nil`. Changing a document color redraws the document.
`ThemeColor` returns a theme color, chosen with a `GraffitiProEditor.ThemeColors` value, as a `Color` for the current appearance; an overload adds an alpha. `DefaultThemeColor` returns a color's default light and dark values. Nodes read colors through `Node.ThemeColor`, which uses the defaults when a node is not in an editor, and the inspector uses the colors of the editor it is attached to.
Colors are read when content is drawn or exported, so selection outlines, links without their own color, form controls, alerts, placeholders, and the HTML export stylesheet follow the current theme. Some colors are saved with the content instead: text color, a divider's line color, and code-block text. New nodes start with the theme's default values because they are created before they join an editor; new table cells and cleared formatting use the editor's `ColorText`. Changing the theme later does not recolor saved content. The collaborator colors, white marks on colored fills, and the translucent black behind media play buttons are not part of the theme.
```xojo
Me.ColorPrimary = New ColorGroup(&c7C3AED, &cA78BFA)
Me.ColorSuccess = New ColorGroup(&c15803D, &c15803D)
```
### Events
`SelectionChanged` reports primary-selection changes. `ContentChanged` reports the node whose content changed, or `Nil` for document-wide state. `ScrollChanged` reports live scrolling. `ToolbarItemPressed` is the application hook for toolbar items whose behavior is not owned by a node. `PickerOpened` reports that a picker opened, and `PickerClosed` that it closed, whether a value was chosen, and the value; see Pickers. `ToolbarCustomized` reports each change the user makes in the toolbar customizer, and `ToolbarReset` reports that the user reset the toolbar there; save `SaveToolbarState` from both to keep the user's toolbar. Neither is raised for changes made in code; see Toolbar Customization.
`LinkPressed` reports a hyperlink clicked while holding Ctrl on Windows and Linux, or Command on macOS, where Ctrl+Click is the contextual click. It supplies the node that holds the link, the URL, the complete link text, and the link title, and it is raised in read-only editors too. The click does not place the caret or change the selection, and the editor does not open the URL itself; call `System.GotoURL` from the handler to follow it. Links in text, lists, headings, quotes, alerts, table and column cells, and embedded child nodes are reported. Custom nodes report their own links by overriding `Node.LinkAtPoint`.
`AnnotationAdded`, `AnnotationChanged`, and `AnnotationRemoved` report changes made through `Editor.Annotations`: a new thread, a reply added or removed or a thread resolved or reopened, and a removed thread. Use them to keep an application's own comment panel current. They are not raised when a document is loaded.
`AnnotationSelected` is raised when the user clicks a comment icon in the document's margin, with the first open thread on that line. Return True to show the thread in the application's own interface; otherwise the comment popover opens on it. Option-Command-M (Control-Alt-M on Windows and Linux) and the Add Comment toolbar item open the popover on the selection.
`FetchLinkMetadata` is raised before a `BookmarkNode` or `EmbedNode` fetches metadata for its address, which happens only when a user adds a card, changes its URL, or chooses Refresh, or when the application calls `LinkCardNode.FetchMetadata`. Return True to supply the metadata yourself, by setting the node's `Title`, `Description`, `SiteName`, `ImageSource`, and other properties, or to turn fetching off, after applying the application's own network policy.
`PointerEnter`, `PointerExit`, and `PointerMoved` report pointer activity for the editor itself. `NodePointerEnter`, `NodePointerExit`, and `NodePointerMove` report the corresponding activity over a node. `PointerMoved` and `NodePointerMove` coordinates are relative to the editor's visible control area. `NodeKeyPress` is offered first when a node is selected; return `True` to consume the key. Otherwise `KeyPress` is offered before the editor's built-in keyboard handling and may consume it in the same way.
`NodeDragging` reports the proposed destination throughout a node drag. `beforeNode` is the sibling that would follow the dragged node and `parentNode` is the proposed container, or `Nil` for the document root. Return `True` to reject that destination and display the operation-not-allowed cursor. `NodeDropped` reports the final proposal; returning `True` cancels the drop and leaves the node at its original location.
When collaboration is attached, `RemoteDocumentChanged`, `RemoteNodeLockChanged`, `RemotePointerMoved`, and `RemoteSelectionChanged` provide informational notifications about other users. These events do not report the local user's actions. A node argument may be `Nil` when a remote selection is cleared or the referenced node is no longer present.
`CollaborationConnected` reports that the current document session is ready. `CollaborationUserConnected` and `CollaborationUserDisconnected` provide a `Network.User` object for the user who joined or left. `CollaborationDisconnected` reports that the local client detached, the connection or server closed, or another session replaced this one. Use `Collaborators()` to list the current users.
`Network.User` exposes the user's identity, access level, connection time, pointer coordinates, selected node IDs, editing state, text selection, and the time of their latest activity message. These properties are read-only. The editor keeps the object updated while that user participates in the current document. To identify the current user, retain the `Network.User` supplied by the collaboration implementation and compare its `CollaboratorID`; do not infer that a user is local.
These are standard Xojo events and remain available to application code. Inspectors and collaboration clients associate themselves through the editor's internal observer path rather than consuming the public event handlers.
### Fonts
`FontName` is the document font, `System` by default. Text whose font is Default, an empty font name, follows it, and Default is the font of new content, so changing `FontName` restyles every node that has not been given a font of its own. In code, Default is an empty font name: `TextNode.FontName = ""` or a `TextStyle` whose `FontName` is empty. `Node.ResolvedFontName` returns the font such text is drawn with.
The system font is shown as `TextDefault` ("Default") wherever a font is named; its stored name is still `System`. `FontDisplayName` returns the name shown for any font. Default is listed once and means "no font of its own". For text, in the font chooser and the node inspector, it is an empty font name, which follows the document font; it is listed first, followed by the active `FontOptions` font names other than `System`. With nothing selected, the toolbar's font item shows and changes the document's `FontName` instead, and there Default is `System`, the system font; that change can be undone. The main toolbar shows Default for either. `FontOptions` restrictions apply to the named fonts only; Default is always available for text. A node `FontOptions` with no font names or sizes disables that picker while the node is selected.
`FontSize` is the document size, 12 by default. Text whose size is Default follows it, and Default is the default for new text, lists, quotes, alerts, code blocks, table cells, captions, and form controls; headings keep the sizes of their levels. In code, Default is a size of zero, and `Node.ResolvedFontSize` returns the size such text is drawn at. The size menu and the node inspector list Default first, captioned by `TextDefault`, and `FontSizeDisplayName` returns the text shown for a size. With nothing selected, the toolbar's size item shows and changes `FontSize`.
The document font is saved in JSON as `fontName` and the size as `fontSize`, and loading a document that has them applies them. HTML export writes them as the body's `font-family` and `font-size`, mapping System to the platform's interface font, and HTML import reads them back. Automatic and Default text write no `font-family` or `font-size` of their own, so they inherit the page's.
### Import Insertion and Saving
`FromJSON`, `FromHTML`, and `FromMarkdown` replace the document. `InsertHTML` and `InsertMarkdown` add converted content at the current document or container insertion point. Registered prototypes participate in matching imported blocks.
Use `ToJSON` and `FromJSON` when saving and restoring the complete editor document. `ValidateJSON` checks saved data, and `LastValidationIssues` explains any problems. HTML and Markdown are intended for exchanging content with other software and may omit editor-specific state that those formats cannot represent.
`ToHTML(True)` places the export stylesheet in a `` element. `ExportStylesheet` returns it as a `Stylesheet`, and `ExportCSS` returns the same rules as CSS text, for example to save them as a separate file. The stylesheet starts with the document rules (page background, body text, spacing, and hyperlinks), then each node type in the document adds its rules through `Node.ExportStyles`, including nodes nested in tables, columns, and forms. Node types the document does not use add nothing. Rules that share a selector are merged, so the result has one rule per selector. A text node writes `line-height` only when its `LineHeight` or `LineSpacing` differs from the default of 1 and 0, so browsers otherwise use the font's normal line height, as the editor does. A changed `LineHeight` is a multiple of the font's normal line height. CSS cannot multiply `normal`, so the font's normal line height is measured as a multiple of its size and the product is written: a plain number, such as `line-height:1.74`, or with spacing, `calc(1.74em + 4px)`. HTML import divides by the same measurement, so the value round-trips.
`IsChanged` reports whether the document has changed since it was loaded or saved. Every change that raises `ContentChanged`, including undo, redo, and changes from collaborators, sets it to `True`, except content a node refreshes from elsewhere and reports with `EndChanges(False)`, and content that loads with `EndChanges(False, False)`, such as rows a data table downloads, which raises no `ContentChanged` at all; `FromJSON`, `FromHTML`, and `FromMarkdown` set it to `False`. Set it to `False` after saving, and check it before closing to offer to save. Content added with `AddNode` or `InsertHTML`, including in `Opening`, counts as a change, so set it to `False` after building an initial document. Undoing back to the saved state still counts as a change.
A load clears `IsChanged` before raising its `ContentChanged`, so a handler that copies `IsChanged` to the window's `Changed` property sees `False`. Setting `IsChanged` raises no event; update anything that follows it, such as the window's `Changed` property, at the same time.
### Inspector Integration
Assign an `Inspector` control's `InspectedEditor` property to this editor. The inspector follows the primary selection and shows document properties when no node is selected. Inspector edits participate in the editor's undo history and raise normal content-change notifications.
Nodes choose what appears in the inspector by returning `InspectorSection` and `InspectorItem` objects. Include only properties users should edit. A property should not appear simply because application code can access it.
### Interactive Insertion
When `IsHoverInsertionEnabled` is `True`, pointing at a valid gap displays an insertion line and add button. The button opens a searchable, scrollable list of the node types in `NodeTypes`. The types appear in that list's order and use their toolbar captions and icons when available.
Choosing a type runs the same `PerformToolbarAction` as the type's main-toolbar item, so the new node gets the same defaults, and inserts it at the shown document or container position. Types whose toolbar item is a menu, such as heading levels and alert types, use the menu's first entry, so a heading is inserted as Heading 1 and an alert as Info, and a table, whose toolbar button opens a size picker instead, is inserted as 3 x 3; change them afterward from the node's popover or inspector. A type without a toolbar item inserts a copy of its registered template. The operation can be undone and redone. Unregister a node type to remove it from this list. Read-only editors do not show the insertion line or button.
`ShowInsertionChooser` opens the same chooser from code, below an anchor rectangle in editor coordinates or below a main-toolbar item, for example from an application toolbar button. Opened this way, it inserts the chosen node after the selected node, or at the end of the document, like the main toolbar, rather than at a hover line, and it does not depend on `IsHoverInsertionEnabled`. Pressing the anchor again closes it, and `CloseInsertionChooser` closes it from code. `PickerVisible` is `True` while it is open.
### JSON Document Format
Document format version 2 adds a stable `documentId` and a stable `nodeId` for each node. `ToJSON` writes the current format number in `version`. A document without `version` is treated as version 1 when loading.
Document and node alignment use `GraffitiProEditor.Alignments`: `0` Automatic, `1` Leading, `2` Middle, and `3` Trailing; documents saved when these were Left, Center, and Right keep their numbers. Each node object requires a string `type` matching the `JSONIdentifier` of a prototype registered with this editor. Subclasses own all additional fields and nested child representations.
Values at their defaults are left out of the JSON: hidden borders, a line height of 1, Automatic alignment, plain unstyled text, empty strings, and similar. Each `FromJSON` gives a missing name its default value, not the value the node already had, so a node always restores the same way whichever prototype it is created from. Custom nodes should do the same: write a value only when it differs from a fixed default, and pass that default to `Lookup` when reading. `nodeId`, `type`, and the values a node needs to rebuild itself, such as a table's `rows`, `columns`, and `cells`, are always written.
A document newer than `CurrentDocumentVersion` cannot be loaded. An older document can load only when the editor knows how to convert each earlier format in order. Use `FromJSON` and inspect `LastValidationIssues` rather than skipping these checks.
### Keyboard Shortcuts
Keyboard shortcuts use Xojo's platform menu-shortcut modifier: Command on macOS and Control on Windows and Linux.
- Command/Control-B toggles bold.
- Command/Control-I toggles italic.
- Command/Control-U toggles underline.
- Command/Control-Shift-X toggles strikethrough.
- Option-Command-M (Control-Alt-M on Windows and Linux) adds a comment on the selected text or node. It works in a read-only editor too.
- Command/Control-E toggles inline code.
- Command/Control-Shift-H toggles highlight.
- Command/Control-Shift-Equals toggles superscript, and Command/Control-Equals toggles subscript.
- Command/Control-K opens the hyperlink editor.
- Command/Control-backslash removes formatting.
- Command/Control-Z undoes and Command/Control-Shift-Z redoes, through `History`.
- Command/Control-Shift-P opens command search.
- Option-Shift-Up and Option-Shift-Down (Alt-Shift elsewhere) move the selected node before the previous node or after the next one, through `Selection.MoveUp` and `Selection.MoveDown`. This works whether or not the node is being edited, and the move is one undo step.
- Command/Control-F opens the search popover, through `Search.Show`.
- Command/Control-G finds the next match and Command/Control-Shift-G the previous one, through `Search`.
While editing, a shortcut applies to the active character selection. With no character selection, bold, italic, underline, strikethrough, and hyperlink changes update the typing style used by subsequently inserted text. Outside edit mode, formatting shortcuts apply to compatible selected nodes and nested editable content in the same way as the main toolbar.
While editing, Left and Right move the caret across the screen rather than through the text order, so in right-to-left text Left moves forward; with the shortcut key they go to the line's edge on that side. In a selected table that is not being edited, the arrow keys move the active cell and Shift-arrow extends the cell selection; Left and Right follow the table's column order, which runs right to left in a right-to-left table. Up on the first row and Down on the last row move to the adjacent node. While editing a table cell, Tab moves to the next cell in the row, wrapping to the first cell of the next row, and Shift-Tab moves to the previous cell. Text typed in the cell before Tab becomes its own undo step. A merged table cell counts as one cell: the arrow keys leave it from its far edge, and Tab skips the cells it covers.
Shortcuts honor each node's formatting capabilities and `FontOptions` restrictions. They do not modify unsupported content such as `CodeBlockNode`, and mutation shortcuts have no effect while `ReadOnly` is `True`. Changes to existing content use the normal undo and content-change notification paths.
### Lifecycle and Opening
Configure the editor from `Opening`. By then its constructor has created `Toolbar`, `FontOptions`, `TextServices`, and the native scrollbars. Before raising `Opening`, the editor turns on `AllowFocus` and `AllowTabs`, which it needs for typing and for Tab in lists and tables, even when a window layout saved them as `False`. The node templates registered here determine which content types this editor can insert and restore from saved data.
Wrap substantial document construction in matching `BeginUpdate` and `EndUpdate` calls. Calls may be nested. The editor waits for the final `EndUpdate`, then restores its previous visibility and displays the completed document.
During an update, the editor postpones content, selection, scrolling, inspector, and collaboration notifications. An update made while the application is running raises at most one document-wide `ContentChanged`, one final `SelectionChanged`, and one final `ScrollChanged`. Initial construction in `Opening` does not raise those change events, but content added there still sets `IsChanged`. When `Opening` builds the initial document, set `IsChanged` to `False` afterwards so the document starts out unchanged, as a loaded one does.
The editor owns controls placed inside it by nodes. Each node is still responsible for attaching, positioning, hiding, and releasing the controls it creates at the appropriate points in its lifetime.
### Markdown Shortcuts
While a node is being edited, the editor turns Markdown typed into the content it describes, as most block editors do. Set `MarkdownShortcuts` to False to type the characters as they are.
A marker typed at the start of a paragraph turns the paragraph into a block, keeping the text after the caret and its formatting:
- "# " through "###### " make a heading of that level.
- "- ", "* ", or "+ " make a bulleted list, and a number followed by ". ", such as "1. ", a numbered list.
- "[] " or "[ ] " make a checklist, and "[x] " a checklist whose item is checked.
- "> " makes a quote, and "```" a code block.
- "---" in an empty paragraph makes a divider, and typing continues in a new paragraph after it.
Block markers apply only to plain paragraphs, not to text already in a heading, list, or table cell, and only for node types in `NodeTypes`, so an editor without `ListNode` keeps "- " as text. The conversion is one undo step, which puts back the paragraph with the marker as typed.
Typing the closing marker of `` `code` ``, `**bold**`, `*italic*`, `_italic_`, `~~strikethrough~~`, or `==highlight==` removes both markers and formats the text between them, in any editable text that supports formatting, table cells included. The opening marker must start a line or follow a space, and the text between the markers must not start or end with a space, so `snake_case_names` and arithmetic such as `2 * 3 * 4` stay as typed. Text typed after the closing marker is not formatted. `FontOptions` that disallow a format also turn its shortcut off.
### Node Registration
`NodeTypes`, a read-only property holding a `GraffitiProEditor.NodeTypes` the editor creates when it is constructed, holds the registered node types. `NodeTypes.Add` accepts a template instance, called a prototype. That template provides the node type's stable JSON name, supported HTML tags, import priority, toolbar item, and insertion behavior. Registering it does not add that object to the document.
Use `AddNode` with a separately constructed instance to insert content. `NodeTypes.Remove` prevents subsequent toolbar insertion and restoration of that type but does not remove instances already in the document.
### Notifications
`ShowMessage` shows a `Notification` over the editor, below the main toolbar at its trailing top corner: the right in a left-to-right interface and the left in a right-to-left one. The newest notification is at the top and earlier ones follow below it. Each is drawn like an alert block, in the theme color for its `Type`, with its optional `Title` in bold above the `Message`. Its text reads in the editor's `Direction`; with `Automatic`, each notification reads the way the first letter of its title or message does, and one with no letters follows the interface. A right-to-left notification is right-aligned, with its bar on the right.
Notifications are drawn above the document and the node toolbar, and below the scrollbar, the main toolbar, the choosers it opens, and typing suggestions. A notification disappears when it is clicked or after its `Duration`, 15 seconds by default; a bar along its bottom shrinks to show the time left. A `Duration` of zero keeps it until it is clicked, with no bar. The notifications below move up into the space it leaves. `CloseMessage` removes one from code, and `Messages` returns those shown, newest first. Only the newest eight are kept.
The editor and its built-in nodes report problems this way, such as an image that cannot be opened or media that cannot play, using the `Danger` type. Handle `MessageShowing` and return `True` to show notifications another way, such as in the application's own status area. A custom node can call the protected `Node.ShowMessage`.
### Pickers
A picker is a popover that lets the user choose a value, drawn by the editor rather than by a native control. The editor's own are the table size grid opened by the Table button, the searchable font list opened by the Font button, the node insertion chooser, command search, the search popover opened by `Search.Show`, and the toolbar's panels for sizes, spacing, colors, and alignment. Applications add their own by subclassing `Picker`, `GridPicker` for a grid of cells, or `ListPicker` for a searchable list.
To open one from a toolbar, set the `ToolbarItem.Picker` of an item in the main toolbar or a node's popover toolbar; give the item the Menu kind to show the disclosure indicator. Pressing the item opens the picker below it and highlights the item until the picker closes; pressing it again closes it. As with a native menu, pressing the item, dragging into the picker, and releasing over a choice chooses it in one gesture. From code, `ShowPicker(picker, anchor)` opens a picker below an anchor rectangle in editor coordinates, and `ShowPicker(item)` opens a main toolbar item's picker. `ClosePicker` closes the open picker without a value, and `ActivePicker` returns it, or Nil. `PickerVisible` is True while a picker is open.
The editor shows one picker at a time. It lines a picker up with its anchor's leading edge, below the anchor or above it when there is no room below, keeps it inside the window, and shrinks it when it fits on neither side, though never below the picker's `MinimumHeight`. A picker anchored below the main toolbar, such as the insertion chooser, does not cover the toolbar unless the space under it is shorter than that minimum. It closes the picker on Escape, a press outside it, a press on what opened it, and when the editor becomes read-only. For a picker that asks with `SearchFieldFrame` and `ScrollbarFrame`, it shows its one shared search field, focused while the picker is open, and one scrollbar.
A picker draws its own content, so the editor asks it for tooltips: while the pointer is over the picker, the editor shows the text the picker's `TooltipAt` returns for that point. The search popover uses this for its case, whole-word, and regular-expression toggles, with the text of `TextMatchCaseTooltip`, `TextWholeWordTooltip`, and `TextRegExTooltip`.
A chosen value reaches the toolbar item that opened the picker as the `Tag` of a `DesktopMenuItem`, through a node type's `PerformToolbarAction`, a node's `PerformAction`, the editor's own action, or `ToolbarItemPressed`, just as a native menu choice does. `PickerOpened` is raised after every picker opens, including the editor's own, and `PickerClosed` after every close, with the value when one was chosen; it is the only delivery for a picker opened by `ShowPicker(picker, anchor)`. See the `Picker` notes for the lifecycle and an example.
### Rendering Printing and PDF
`ToPicture`, `DrawInto`, `ToRasterPDF`, `ToVectorPDF`, and `Print` draw the complete document, including content outside the visible editor. They lay out the document for the output width instead of stretching a screen image. PDF and printer output continue long content onto additional pages.
`ToRasterPDF` draws each page into a picture at twice the PDF's working resolution and places that picture in the PDF. This path most closely matches the editor's normal drawing and text measurement, but text and shapes are stored as pixels.
Both PDF methods accept an optional `PDFOptions` with document metadata (title, author, subject, keywords, creator, and language), a header and footer drawn in the page margins with `{page}`, `{pages}`, and `{title}` placeholders, and protection through passwords and printing, copying, and modifying permissions. Without options, output is unchanged.
`ToVectorPDF` draws directly into the PDF. Text, lines, and shapes remain sharp when zoomed when the operating system's PDF support can represent them. Links remain clickable. Long nodes are clipped at a page boundary and continued on the next page.
Vector PDFs also create real, fillable PDF form fields for built-in text fields, text areas, checkboxes, radio groups, dropdowns, list selections, and submit or reset buttons that have actions. These PDF form fields are commonly called AcroForm controls. Field names use the node's `Name`, then `ID`, and finally its stable node ID. A suffix is added when names would otherwise repeat.
Disabled form controls remain visible but cannot be changed. Browser-only validation and input behavior remain visual because PDF viewers do not provide every HTML feature. Submit buttons use their own `FormAction` or the containing `FormNode.Action`. A button without a PDF action remains ordinary artwork. Links are limited to HTTP, HTTPS, email, and telephone URLs. Form submission is limited to HTTP and HTTPS.
Vector export does not quietly turn unsupported nodes into pictures. Use `ToRasterPDF` when matching the editor's appearance matters more than retaining vector text and shapes. Xojo does not provide all features needed for fully accessible tagged PDFs, custom form-field appearances, JavaScript validation, or dependable reporting when a font is replaced. The exporter cannot promise those features.
`ToPicture()` returns one `Picture` containing the complete document. It raises `OutOfBoundsException` if the result would exceed the picture-size limit shared by all supported platforms. Use `ToPictures`, a PDF, or `Print` for long documents with multiple pages. Use `ToPicture(Graphics)` when the application supplies a destination with known limits.
`ToPictures(pageWidth, pageHeight)` returns one `Picture` per page, using the same pagination as `ToRasterPDF` and `Print`. Page sizes are in points and pictures use the editor's scale factor. Nodes that would cross a page boundary move to the next page, and a node taller than a page continues across pages. A `PageBreakNode` starts a new page. It raises `InvalidArgumentException` for a page smaller than one point and `OutOfBoundsException` when a single page would exceed the picture-size limit.
### Selection and Editing
The editor supports a primary node selection, multiple node selection, and character ranges within an active editable node. The public selection API is on `Selection`, a read-only property holding a `GraffitiProEditor.Selection` the editor creates when it is constructed. Its `Node`, `Nodes`, `SelectNode`, `SelectAllNodes`, `Clear`, `DeleteNodes`, and `Duplicate` members operate on nodes, and `SelectText` operates on the content being edited. In a table, dragging across cells selects them; a drag that starts while editing a cell selects its text until the pointer leaves the cell.
`Selection` also has the commands that follow the editing context: `SelectAll`, `DeselectAll`, `Copy`, `Cut`, `Paste`, and `Delete`, each with a matching `Can` property. While a node is being edited, they act on its text; otherwise, they act on nodes. The keyboard shortcuts and context menu use the same rules. The editor does not handle menu-bar items; connect an application's Edit menu to `Selection` and `History` as described in their notes.
`Search`, a read-only property holding a `GraffitiProEditor.Search`, finds and replaces text and opens the search popover below the toolbar; Command-F (Control-F elsewhere) opens it too. As with `Selection` and `History`, the editor does not handle a Find menu; see the `Search` notes.
Formatting toolbar actions are applied to the active text range when editing and to compatible selected nodes otherwise. `ReadOnly` prevents mutations and hides editing toolbars while retaining selection and copying.
### Text Direction
`Direction` sets which way the document's text reads: `GraffitiProEditor.Directions.Automatic`, `LeftToRight`, or `RightToLeft`. With `Automatic`, the default, each paragraph takes its direction from its first letter, as `dir="auto"` does in HTML, so English, Hebrew, and Arabic paragraphs can share a document. A paragraph with no letters, such as an empty one, follows the system language. `LeftToRight` and `RightToLeft` give every paragraph that direction. `Node.Direction` overrides it for one node and the nodes inside it.
Within a paragraph, text in the other direction and numbers are ordered with the Unicode Bidirectional Algorithm, and joined scripts such as Arabic are drawn whole so their letters connect. A right-to-left paragraph starts at the right: Automatic text alignment and the default table-cell alignment start at the leading edge, list markers, checkboxes, radio buttons, quote and alert bars move to the right, and right-to-left tables put their first column on the right. An Automatic block narrower than its container, such as an image, also starts at the right. Explicit Left and Right alignments stay on their side.
The editor's interface follows the same setting: with `RightToLeft`, or with `Automatic` on a system whose language is written right to left, the toolbars and the node toolbar are laid out from the right, and the inspector shows captions on the right and values on the left. The font and insertion choosers open from their button's right edge with their scrollbar on the left; the insertion chooser's columns run right to left, and its icons sit on the right of their captions. The suggestion popup's right edge meets the caret, with icons on the right and captions aligned to the right.
The arrow keys move the caret across the screen, as macOS and Windows do, so in right-to-left text Left moves forward through the text. With the shortcut key they go to the line's edge on that side. In a selected table that is not being edited, Left and Right follow the table's column order.
`Direction` is saved with the document. Loading JSON or HTML that sets `LeftToRight` or `RightToLeft` changes `Direction` to match; a document saved as `Automatic`, or without a direction, leaves it unchanged. `ToHTML(True)` writes a set direction as `dir` on the `html` element; with `Automatic`, the export stylesheet gives paragraphs `unicode-bidi: plaintext` so browsers detect each one's direction. A node's own direction is written as CSS `direction`, and quote and alert borders use logical properties so browsers mirror them.
Explicit embedding and isolate control characters (U+202A to U+202E and U+2066 to U+2069) are ignored. The inspector mirrors its values and inline editors too; see its Text Direction note.
### Text Input Drag and Drop and Scrolling
**Dragging text.** While a node is being edited, pressing inside the selected text and dragging it moves it. The editor follows the drag itself while the pointer stays inside it, showing a caret where the text will go, and performs the move when the pointer is released. When the pointer leaves the editor, the text is handed to the platform's drag and drop, so it can be dropped in another application. Releasing without moving places the caret instead.
Text dropped on a text node, or on the node being edited, is inserted at the pointer and selected, and that node starts editing. Text dragged from within the editor keeps its character styles and is moved, or copied when Option (Alt) is held; the change is one undo step. Text dropped back inside itself changes nothing. A table takes dropped text only in the cell being edited. Text dropped between blocks, and HTML, pictures, and files, become new nodes as before.
**Input methods.** A `DesktopCanvas` takes no part in the platform's text-input protocols, so the editor lends composed input to a native field. While a node is being edited and the keyboard's input source is an input method, a borderless text field sits at the caret and takes the keyboard focus: on macOS, a Japanese, Chinese, Korean, or other input mode; on Windows, a Japanese, Chinese, or Korean keyboard layout. The platform composes into it and shows its candidate window there; committed text is typed into the document through `InsertText`, with automatic correction and undo like other typing. While nothing is being composed, editing keys and shortcuts go to the editor as usual. The input source is checked as the caret blinks, so switching it takes effect within half a second. Plain keyboard layouts type straight into the editor without the field. Linux input methods are not supported yet.
**Elastic scrolling.** Wheel and trackpad scrolling can pass either end of the document by up to 120 points, against a resistance that grows toward that limit, and the document springs back about 140 milliseconds after the wheel stops. Scrolling from the keyboard, the scrollbar, and `ScrollTo` stays within the document.
### Toolbar Configuration
`Toolbar` is created automatically and exposed as a read-only object. Modify its sections and items directly during `Opening`. `ToolbarVisible` records the application's visibility preference; `ReadOnly` temporarily overrides visibility without changing that preference. See the `Toolbar` notes for the default sections and the identifiers of their items.
Node prototypes contribute their main-toolbar insertion items. Application-defined items can raise `ToolbarItemPressed`, allowing custom actions that are not associated with a node type.
`ToolbarStyle` chooses how the main toolbar is arranged. `Contextual`, the default, shows a single row arranged by `ContextualToolbar`: an Insert button that opens the insertion chooser, the application's own `Custom` sections of `Toolbar`, the tools for what is being worked on, a flexible space, Print, and a command search button. The tools change with the selection: with nothing selected, the document font, size, and alignment, then Background for the document's background image; with one node selected, that node's own toolbar actions, then its text and paragraph tools while they apply, then its Background menu for a background image, then Duplicate and Delete; with several, the text and paragraph tools and Delete. When the row is too narrow, the selection's tools collapse into the search button from the end, then the other items except Insert and search; a dot on the search button shows that it holds them. `Classic` shows every `Toolbar` section in rows that wrap between sections, and has no Insert or search button.
The size, text color, highlight, alignment, line height, and line spacing items open panels rather than native menus: lists of sizes, drawn at their sizes, and spacing values; a palette with Automatic (or No Highlight), recently chosen colors, and Custom, which opens the system color panel; and diagrams of each alignment. The Font item opens the searchable font list. Hovering a choice in any of them, or moving to it with the arrow keys, previews it in the document, and closing the panel without choosing takes the preview back; see the `Picker` note Previews. The panels are the same in both styles. The color panel stays open beside the window: each color picked in it applies at once to the selection it opened for, it stops applying when the selection changes, and the colors tried in one visit are a single undo step. Table and columns cell background colors use the same panel.
Command search, opened by the search button, `ShowCommandSearch`, or Shift-Command-P (Shift-Control-P on Windows and Linux) in either style, lists every enabled tool once: the items collapsed out of the contextual toolbar first, then the selection's tools and the remaining toolbar items, each with its group. Typing filters by name, caption, group, and identifier. The registered node types to insert are listed only once a search is typed, since the Insert button already lists them, unless one is a toolbar item collapsed into the search button. Choosing a tool presses it as if it were on the toolbar: a button acts, and a menu or picker opens at the tool's own button when it shows one, or else at the search button.
In the contextual style the selected node's floating popover toolbar is hidden by default, since the main toolbar carries its tools; set `ShowContextualToolbars` to True to show it as well. When `ToolbarStyle` is `Classic`, popover toolbars are always visible, whatever `ShowContextualToolbars` is set to, because the classic main toolbar has no tools for the selection. `ContextualToolbar` is a `Toolbar` like `Toolbar` and can be rearranged the same way. Its special items are `insert`, `custom` (the application's `Custom` sections), `context` (the selection's tools), `flexiblespace`, and `search`. The document's Background item, `documentbackground`, is not in either toolbar by default, but it can be added to either one from the customizer; its choices are one undo step. Built-in items such as `bold` or `print` are the same objects in both toolbars, so configuring one configures both.
The Table button opens a size picker below it: a grid of up to 10 columns and 8 rows. Pointing at a cell highlights the table size up to it, shown with `TextTableSizeCaptionFormat`, and clicking inserts a table of that size. The arrow keys change the size, Return inserts it, and Escape closes the picker, as does clicking the button again. In a right-to-left interface the grid's columns run from the right. It is the `GridPicker` set as the `TableNode` toolbar item's `Picker`; the chosen size reaches its `PerformToolbarAction` as a rows : columns `Pair`. The insertion chooser inserts a 3 x 3 table.
Any toolbar item can open a custom picker the same way: set its `Picker`. See Pickers.
Inline code, highlight, keyboard key, superscript, and subscript are toggle items, `code`, `highlight`, `keyboard`, `superscript`, and `subscript`, that are on neither toolbar by default, to keep the toolbars short. They are listed in command search and the customizer, and either toolbar can include them. Their captions come from `TextInlineCodeCaption`, `TextHighlightCaption`, `TextKeyboardKeyCaption`, `TextSuperscriptCaption`, and `TextSubscriptCaption`, and `FontOptions` can disable each one.
### Toolbar Customization
Users can arrange the toolbar of the current `ToolbarStyle` themselves. `ShowToolbarCustomizer`, or Customize Toolbar in the toolbar's contextual menu, opens a sheet below the toolbar, modeled on the macOS toolbar customization sheet:
- Drag an item from the sheet's palette into the toolbar to add it where the insertion marker shows. The palette lists `AvailableToolbarItems`: the built-in items, the registered node types, every item on either toolbar, the items in `ToolbarItems`, items that were on a toolbar in the default set, even after the user removes them, and Separator and Flexible Space, which can be added any number of times. In the contextual style it also offers the Selection Tools and Application Tools placeholders, `context` and `custom`, shown as dashed boxes while customizing.
- Drag an item within the toolbar to move it, or off the toolbar to remove it.
- Drag the default set, or press Reset, to restore the toolbar the editor had when its `Opening` event finished.
- Show chooses `ToolbarDisplayMode`: Icon Only, Icon and Text, or Text Only. The toolbar's contextual menu offers the same choices.
- Done, Return, or Escape closes the sheet; `CloseToolbarCustomizer` closes it from code and `IsCustomizingToolbar` reports whether it is open. While it is open the document does not respond, and toolbar items are moved rather than pressed.
Each change the user makes raises `ToolbarCustomized`, and a reset raises `ToolbarReset`; changes made in code raise neither. `SaveToolbarState` returns both styles' arrangements and the display mode as JSON, `LoadToolbarState` restores them, skipping items that are no longer available, and `ResetToolbar` restores the default from code. Items are saved by identifier, so an application's own items must have stable identifiers and be on a toolbar, in the default set, or added to `ToolbarItems` before loading. Items the application placed on a toolbar in code need no registration: they are kept when a state is loaded, and `ResetToolbar` puts back those in the default set. Separators and flexible spaces are saved by kind; on a toolbar their identifiers are `separator#n` and `flexiblespace#n`.
```xojo
'// In the editor's Opening event, after setting up the toolbar: restore the
'// user's toolbar, if one was saved.
Var saved As FolderItem = SpecialFolder.ApplicationData.Child("MyApp Toolbar.json")
If saved.Exists Then
Var input As TextInputStream = TextInputStream.Open(saved)
Me.LoadToolbarState(input.ReadAll)
input.Close
End If
'// In ToolbarCustomized and ToolbarReset: save it.
Var output As TextOutputStream = TextOutputStream.Create(SpecialFolder.ApplicationData.Child("MyApp Toolbar.json"))
output.Write(Me.SaveToolbarState)
output.Close
```
Load a saved state at the end of the `Opening` event, after the application's own toolbar setup, as above: the toolbar as it is at that moment becomes the default set, and the user's state is applied on top of it.
### Undo and Redo
The editor records its changes in `History`, a read-only property holding a `GraffitiProEditor.History` the editor creates when it is constructed. Undo, redo, and reset the history through it rather than through the editor:
```xojo
If Editor.History.CanUndo Then Editor.History.Undo
Editor.History.Redo
Editor.History.Reset
```
The context menu and the undo shortcuts call the same methods. `FromJSON`, `FromHTML`, and `FromMarkdown` start a new history.
### User-Facing Text
User-facing strings owned by the editor are public String properties initialized with the built-in English text. Assign replacement values before the corresponding menu, inspector, or popover is first displayed. Persistent toolbar entries already expose their text through `ToolbarItem.Caption` and `ToolbarItem.Tooltip` and should be customized directly rather than through duplicate editor properties.
Properties ending in `Format` are complete phrases with named tokens. `TextHeightCaptionFormat`, `TextWidthCaptionFormat`, `TextLineHeightTooltipFormat`, and `TextLineSpacingTooltipFormat` require `%value%`. Preserve the token when translating. See the module localization notes for the complete formatting contract.
## Examples
Configure each editor instance in its `Opening` event.
### Attaching an Inspector
```xojo
Inspector1.InspectedEditor = Me
```
### Batching Initial Content
Wrap a substantial `Opening` configuration in an update batch. Always pair the calls, including when setup raises an exception. Change events are suppressed during initial construction, so application event handlers do not observe a partially configured editor.
```xojo
Me.BeginUpdate
Try
Me.NodeTypes.Add(New GraffitiProEditor.ImageNode)
Me.NodeTypes.Add(New GraffitiProEditor.TableNode)
Me.AddNode(New GraffitiProEditor.HeadingNode("Project Notes", GraffitiProEditor.HeadingNode.Levels.Heading1))
Me.AddNode(New GraffitiProEditor.TextNode("Ready to edit."))
Finally
Me.EndUpdate
End Try
```
### Customizing Fonts
```xojo
Me.FontOptions.RemoveAllSizes
Me.FontOptions.AddSize(12)
Me.FontOptions.AddSize(16)
Me.FontOptions.AddSize(24)
Me.FontOptions.AllowCustomFontSize = True
// Text with the Default font uses the document font.
Me.FontName = "Georgia"
```
### Document Appearance
`BackgroundColor` fills the document beneath its nodes and optional background image. Both settings appear in the document inspector and are preserved by supported document exports.
```xojo
Editor1.BackgroundColor = Color.RGB(248, 250, 252)
Editor1.BackgroundImage.SetResource("https://example.com/paper.png")
```
### Exporting a PDF
```xojo
Var options As New GraffitiProEditor.PDFOptions
options.Title = "Quarterly Report"
options.FooterText = "Page {page} of {pages}"
Me.ToVectorPDF(SpecialFolder.Desktop.Child("Report.pdf"), options)
```
### Handling Pointer Keyboard and Drag Events
Use the node pointer events for hover UI without replacing the editor's built-in pointer handling. In `NodeKeyPress` or `KeyPress`, return `True` only when the application handled the key completely.
For example, a `NodeDragging` event handler can reject a destination based on application rules:
```xojo
If node IsA GraffitiProEditor.ImageNode And parentNode IsA GraffitiProEditor.TableNode Then Return True
Return False
```
Apply the same validation in `NodeDropped`; returning `True` there cancels the move. Collaboration notifications are informational and can update application UI without modifying the document:
```xojo
// In RemoteDocumentChanged(collaborator As GraffitiProEditor.Network.User, revision As Integer):
StatusLabel.Text = collaborator.UserName + " updated revision " + revision.ToString
```
### Importing and Exporting
Insert interoperable content without replacing the existing document, then export either a fragment or complete HTML document as needed.
```xojo
Me.InsertHTML("## Imported
HTML content
")
Me.InsertMarkdown("## Markdown" + EndOfLine + EndOfLine + "Additional content")
Var fragment As String = Me.ToHTML(False)
Var completeDocument As String = Me.ToHTML(True)
// The same, with the document's comments in a section after the content.
Var reviewedDocument As String = Me.ToHTML(True, True)
Var markdown As String = Me.ToMarkdown
// The stylesheet ToHTML(True) embeds, with an application rule added.
Var sheet As GraffitiProEditor.Stylesheet = Me.ExportStylesheet
sheet.SetProperty("body", "max-width", "960px")
Var css As String = sheet.ToString
```
### Registering Nodes
```xojo
Me.NodeTypes.Add(New GraffitiProEditor.AlertNode("", GraffitiProEditor.AlertNode.Types.Info))
Me.NodeTypes.Add(New GraffitiProEditor.ImageNode)
Me.NodeTypes.Add(New GraffitiProEditor.TableNode)
Me.NodeTypes.Add(New GraffitiProEditor.ColumnsNode)
Me.NodeTypes.Add(New GraffitiProEditor.ListNode)
Me.NodeTypes.Add(New GraffitiProEditor.QuoteNode)
Me.NodeTypes.Add(New GraffitiProEditor.DividerNode)
Me.NodeTypes.Add(New GraffitiProEditor.PageBreakNode)
```
### Saving and Loading
```xojo
Var documentJSON As String = Me.ToJSON
'// Write documentJSON to a file, then mark the document unchanged.
Me.IsChanged = False
Self.Changed = False
Me.FromJSON(documentJSON)
For Each issue As GraffitiProEditor.ValidationIssue In Me.LastValidationIssues
System.DebugLog(issue.Message)
Next
```