LinkExtension class

Hyperlinks: the link toolbar button and URL auto-linking while typing.

Contributes the link toolbar group and AutoLinkShortcut (typing a space or newline after https://…/www.… links the address).

attach registers nothing: the controller installs a no-op LinkLauncher as the scope default, and typing at a link's edge is kept from extending the link by the baseline PreserveInlineStylesRule. An app makes link taps actually open by overriding the launcher — from any extension's attach, or directly after constructing the controller:

controller.scope.registerService<LinkLauncher>(MyUrlLauncher());

The link attribute spec ships in AttributeRegistry.standard(), so no spec is registered here; the EditorExtension.attributes hook exists for third-party formats.

Inheritance

Constructors

LinkExtension()

Properties

attributes List<AttributeSpec>
The attribute kinds this extension adds to the document's registry.
no setterinherited
embedRenderers List<EmbedRenderer>
The embed renderers this extension contributes.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
Unique identifier of this extension, e.g. 'quill_kit.bold'.
no setteroverride
rules List<EditRule>
The edit rules this extension contributes; they run before the document's existing rules so they can override baseline behavior.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shortcuts Map<ShortcutActivator, Intent>
Keyboard shortcuts this extension contributes; merged with the default activator map by the editor widget.
no setterinherited
toolbarItems List<ToolbarItem>
The toolbar items this extension contributes.
final
typingShortcuts List<TypingShortcut>
Markdown-style typing shortcuts this extension contributes; consulted before the built-in ones.
no setteroverride

Methods

attach(EditorScope scope) → void
Called once when the owning controller is constructed. Use it to register or replace services on scope and to capture per-instance state.
inherited
detach() → void
Called when the owning controller is disposed; release any resources captured in attach.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited