pub struct BaseKeymap;Expand description
Arrow keys, Home and End, Backspace and Delete with their word and line variants, Enter, Select All, and Escape, bound the way each platform binds them. It has the lowest priority, so extensions override any key.
Trait Implementations§
Source§impl Clone for BaseKeymap
impl Clone for BaseKeymap
impl Copy for BaseKeymap
Source§impl Debug for BaseKeymap
impl Debug for BaseKeymap
Source§impl Default for BaseKeymap
impl Default for BaseKeymap
Source§impl Extension for BaseKeymap
impl Extension for BaseKeymap
Source§fn keymap(
&self,
_schema: &Schema,
platform: Platform,
) -> Result<Vec<Binding>, EditorError>
fn keymap( &self, _schema: &Schema, platform: Platform, ) -> Result<Vec<Binding>, EditorError>
Key bindings, in ProseMirror notation such as
Mod-b.Source§fn schema(&self, schema: SchemaBuilder) -> SchemaBuilder
fn schema(&self, schema: SchemaBuilder) -> SchemaBuilder
Register blocks, marks, and embeds.
Source§fn commands(&self, _schema: &Schema) -> Result<Vec<CommandSpec>, EditorError>
fn commands(&self, _schema: &Schema) -> Result<Vec<CommandSpec>, EditorError>
Named commands with typed arguments. They are what dynamic hosts
run with
Editor::run_named, and their
metadata is what bindings generate typed APIs from.Source§fn queries(&self, _schema: &Schema) -> Result<Vec<QuerySpec>, EditorError>
fn queries(&self, _schema: &Schema) -> Result<Vec<QuerySpec>, EditorError>
Named questions about the state, such as whether a mark is active
or a block’s attribute value.
Source§fn nodes(&self) -> Vec<NodeMeta>
fn nodes(&self) -> Vec<NodeMeta>
The blocks, marks, and embeds
Extension::schema registers, with
typed attributes, for generated bindings.Source§fn input_rules(&self, _schema: &Schema) -> Result<Vec<InputRule>, EditorError>
fn input_rules(&self, _schema: &Schema) -> Result<Vec<InputRule>, EditorError>
Rules that rewrite text as it is typed.
Source§fn paste_rules(&self, _schema: &Schema) -> Result<Vec<PasteRule>, EditorError>
fn paste_rules(&self, _schema: &Schema) -> Result<Vec<PasteRule>, EditorError>
Rules that format pasted text.
Source§fn code_blocks(&self, _schema: &Schema) -> Result<Vec<BlockTypeId>, EditorError>
fn code_blocks(&self, _schema: &Schema) -> Result<Vec<BlockTypeId>, EditorError>
Text block types that hold code: input and paste rules never run
inside them and pasted text keeps its line breaks.
Source§fn after_update(
&self,
_state: &mut EditorState,
_update: &Update,
) -> CommandResult
fn after_update( &self, _state: &mut EditorState, _update: &Update, ) -> CommandResult
Fix up the state after a local update, e.g. keep a trailing
paragraph. The result is folded into the same update and undo step.
Source§fn update_filters(
&self,
_schema: &Schema,
) -> Result<Vec<UpdateFilter>, EditorError>
fn update_filters( &self, _schema: &Schema, ) -> Result<Vec<UpdateFilter>, EditorError>
Checks a local update, fix-ups included, must pass to stand. One
that returns
false undoes the update, and the command reports that
it did not apply, as TipTap’s filterTransaction does; a character
limit uses one to refuse text past the limit. They are collected when
the editor is built, so an editor whose extensions have none pays
nothing per update.Source§fn adornments(&self, _state: &EditorState) -> Vec<Adornment>
fn adornments(&self, _state: &EditorState) -> Vec<Adornment>
Text to show in the document without it being part of it, for
state: see Adornment. Hosts ask after every update, through
Editor::adornments, and lay the text
out where it goes.Source§fn adorns(&self) -> bool
fn adorns(&self) -> bool
Whether
Extension::adornments can return any, so editors whose
extensions never adorn skip asking after every update.Source§impl TypedExtension for BaseKeymap
The standard keys add no commands of their own, so their handle is just
the proof of registration.
impl TypedExtension for BaseKeymap
The standard keys add no commands of their own, so their handle is just the proof of registration.
Source§type Handle = Registration
type Handle = Registration
The handle
EditorBuilder::add returns: methods for this
extension’s commands, queries, and attributes.Source§fn handle(&self, registration: Registration) -> Registration
fn handle(&self, registration: Registration) -> Registration
The handle, given proof of registration.
Auto Trait Implementations§
impl Forget for BaseKeymap
impl Freeze for BaseKeymap
impl Move for BaseKeymap
impl RefUnwindSafe for BaseKeymap
impl Send for BaseKeymap
impl Sync for BaseKeymap
impl Unpin for BaseKeymap
impl UnsafeUnpin for BaseKeymap
impl UnwindSafe for BaseKeymap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more