Skip to content

BlockSuite API Documentation / @blocksuite/affine-inline-preset

@blocksuite/affine-inline-preset

Interfaces

TextFormatConfig

Properties

action()

action: (host) => void

Parameters
host

EditorHost

Returns

void

activeWhen()

activeWhen: (host) => boolean

Parameters
host

EditorHost

Returns

boolean

hotkey?

optional hotkey: string

icon

icon: TemplateResult<1>

id

id: string

name

name: string

textChecker()?

optional textChecker: (host) => boolean

Parameters
host

EditorHost

Returns

boolean

Type Aliases

AffineInlineRootElement

AffineInlineRootElement = InlineRootElement<AffineTextAttributes>

Variables

BackgroundInlineSpecExtension

const BackgroundInlineSpecExtension: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineSpecs<AffineTextAttributes>>


boldDeltaToHtmlAdapterMatcher

const boldDeltaToHtmlAdapterMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineDeltaToHtmlAdapterMatcher>


boldDeltaToMarkdownAdapterMatcher

const boldDeltaToMarkdownAdapterMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineDeltaToMarkdownAdapterMatcher>


BoldInlineSpecExtension

const BoldInlineSpecExtension: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineSpecs<AffineTextAttributes>>


BoldItalicMarkdown

const BoldItalicMarkdown: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineMarkdownMatch<AffineTextAttributes>>


BoldMarkdown

const BoldMarkdown: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineMarkdownMatch<AffineTextAttributes>>


CodeExtension

const CodeExtension: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineMarkdownMatch<AffineTextAttributes>>


CodeInlineSpecExtension

const CodeInlineSpecExtension: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineSpecs<AffineTextAttributes>>


ColorInlineSpecExtension

const ColorInlineSpecExtension: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineSpecs<AffineTextAttributes>>


DefaultInlineManagerExtension

const DefaultInlineManagerExtension: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineManager<AffineTextAttributes>>


deleteTextCommand

const deleteTextCommand: Command<{ currentTextSelection?: TextSelection; textSelection?: TextSelection; }>


FORMAT_BLOCK_SUPPORT_FLAVOURS

const FORMAT_BLOCK_SUPPORT_FLAVOURS: string[]


FORMAT_NATIVE_SUPPORT_FLAVOURS

const FORMAT_NATIVE_SUPPORT_FLAVOURS: string[]


FORMAT_TEXT_SUPPORT_FLAVOURS

const FORMAT_TEXT_SUPPORT_FLAVOURS: string[]


formatBlockCommand

const formatBlockCommand: Command<{ blockSelections?: BlockSelection[]; currentBlockSelections?: BlockSelection[]; mode?: "replace" | "merge"; styles: AffineTextAttributes; }>


formatNativeCommand

const formatNativeCommand: Command<{ mode?: "replace" | "merge"; range?: Range; styles: AffineTextAttributes; }>


formatTextCommand

const formatTextCommand: Command<{ currentTextSelection?: TextSelection; mode?: "replace" | "merge"; styles: AffineTextStyleAttributes; textSelection?: TextSelection; }>


getTextAttributes

const getTextAttributes: Command<{ }, { textAttributes: AffineTextAttributes; }>


highlightBackgroundDeltaToHtmlAdapterMatcher

const highlightBackgroundDeltaToHtmlAdapterMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineDeltaToHtmlAdapterMatcher>


highlightColorDeltaToHtmlAdapterMatcher

const highlightColorDeltaToHtmlAdapterMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineDeltaToHtmlAdapterMatcher>


htmlBrElementToDeltaMatcher

const htmlBrElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<HtmlASTToDeltaMatcher>


htmlCodeElementToDeltaMatcher

const htmlCodeElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<HtmlASTToDeltaMatcher>


htmlColorStyleElementToDeltaMatcher

const htmlColorStyleElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<HtmlASTToDeltaMatcher>


htmlDelElementToDeltaMatcher

const htmlDelElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<HtmlASTToDeltaMatcher>


HtmlInlineToDeltaAdapterExtensions

const HtmlInlineToDeltaAdapterExtensions: ExtensionType & object[]


htmlItalicElementToDeltaMatcher

const htmlItalicElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<HtmlASTToDeltaMatcher>


htmlListToDeltaMatcher

const htmlListToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<HtmlASTToDeltaMatcher>


htmlMarkElementToDeltaMatcher

const htmlMarkElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<HtmlASTToDeltaMatcher>


htmlStrongElementToDeltaMatcher

const htmlStrongElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<HtmlASTToDeltaMatcher>


htmlTextLikeElementToDeltaMatcher

const htmlTextLikeElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<HtmlASTToDeltaMatcher>


htmlTextToDeltaMatcher

const htmlTextToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<HtmlASTToDeltaMatcher>


htmlUnderlineElementToDeltaMatcher

const htmlUnderlineElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<HtmlASTToDeltaMatcher>


InlineAdapterExtensions

const InlineAdapterExtensions: ExtensionType[]


inlineCodeDeltaToHtmlAdapterMatcher

const inlineCodeDeltaToHtmlAdapterMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineDeltaToHtmlAdapterMatcher>


inlineCodeDeltaToMarkdownAdapterMatcher

const inlineCodeDeltaToMarkdownAdapterMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineDeltaToMarkdownAdapterMatcher>


InlineDeltaToHtmlAdapterExtensions

const InlineDeltaToHtmlAdapterExtensions: ExtensionType & object[]


InlineDeltaToMarkdownAdapterExtensions

const InlineDeltaToMarkdownAdapterExtensions: ExtensionType & object[]


InlineSpecExtensions

const InlineSpecExtensions: ExtensionType[]


isTextAttributeActive

const isTextAttributeActive: Command<{ key: keyof AffineTextAttributes; }>


italicDeltaToHtmlAdapterMatcher

const italicDeltaToHtmlAdapterMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineDeltaToHtmlAdapterMatcher>


italicDeltaToMarkdownAdapterMatcher

const italicDeltaToMarkdownAdapterMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineDeltaToMarkdownAdapterMatcher>


ItalicExtension

const ItalicExtension: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineMarkdownMatch<AffineTextAttributes>>


ItalicInlineSpecExtension

const ItalicInlineSpecExtension: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineSpecs<AffineTextAttributes>>


markdownDeleteToDeltaMatcher

const markdownDeleteToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<MarkdownASTToDeltaMatcher>


markdownEmphasisToDeltaMatcher

const markdownEmphasisToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<MarkdownASTToDeltaMatcher>


MarkdownExtensions

const MarkdownExtensions: ExtensionType[]


markdownHtmlToDeltaMatcher

const markdownHtmlToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<MarkdownASTToDeltaMatcher>


markdownInlineCodeToDeltaMatcher

const markdownInlineCodeToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<MarkdownASTToDeltaMatcher>


MarkdownInlineToDeltaAdapterExtensions

const MarkdownInlineToDeltaAdapterExtensions: ExtensionType & object[]


markdownListToDeltaMatcher

const markdownListToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<MarkdownASTToDeltaMatcher>


markdownStrongToDeltaMatcher

const markdownStrongToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<MarkdownASTToDeltaMatcher>


markdownTextToDeltaMatcher

const markdownTextToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<MarkdownASTToDeltaMatcher>


notionHtmlBrElementToDeltaMatcher

const notionHtmlBrElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<NotionHtmlASTToDeltaMatcher>


notionHtmlCodeElementToDeltaMatcher

const notionHtmlCodeElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<NotionHtmlASTToDeltaMatcher>


notionHtmlDelElementToDeltaMatcher

const notionHtmlDelElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<NotionHtmlASTToDeltaMatcher>


NotionHtmlInlineToDeltaAdapterExtensions

const NotionHtmlInlineToDeltaAdapterExtensions: ExtensionType[]


notionHtmlItalicElementToDeltaMatcher

const notionHtmlItalicElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<NotionHtmlASTToDeltaMatcher>


notionHtmlLiElementToDeltaMatcher

const notionHtmlLiElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<NotionHtmlASTToDeltaMatcher>


notionHtmlListToDeltaMatcher

const notionHtmlListToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<NotionHtmlASTToDeltaMatcher>


notionHtmlMarkElementToDeltaMatcher

const notionHtmlMarkElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<NotionHtmlASTToDeltaMatcher>


notionHtmlSpanElementToDeltaMatcher

const notionHtmlSpanElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<NotionHtmlASTToDeltaMatcher>


notionHtmlStrongElementToDeltaMatcher

const notionHtmlStrongElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<NotionHtmlASTToDeltaMatcher>


notionHtmlStyleElementToDeltaMatcher

const notionHtmlStyleElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<NotionHtmlASTToDeltaMatcher>


notionHtmlTextToDeltaMatcher

const notionHtmlTextToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<NotionHtmlASTToDeltaMatcher>


notionHtmlUnderlineElementToDeltaMatcher

const notionHtmlUnderlineElementToDeltaMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<NotionHtmlASTToDeltaMatcher>


strikeDeltaToHtmlAdapterMatcher

const strikeDeltaToHtmlAdapterMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineDeltaToHtmlAdapterMatcher>


strikeDeltaToMarkdownAdapterMatcher

const strikeDeltaToMarkdownAdapterMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineDeltaToMarkdownAdapterMatcher>


StrikeInlineSpecExtension

const StrikeInlineSpecExtension: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineSpecs<AffineTextAttributes>>


StrikethroughExtension

const StrikethroughExtension: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineMarkdownMatch<AffineTextAttributes>>


textFormatConfigs

const textFormatConfigs: TextFormatConfig[]


toggleBold

const toggleBold: Command


toggleCode

const toggleCode: Command


toggleItalic

const toggleItalic: Command


toggleStrike

const toggleStrike: Command


toggleTextStyleCommand

const toggleTextStyleCommand: Command<{ key: Extract<keyof AffineTextStyleAttributes, "bold" | "italic" | "underline" | "strike" | "code">; }>


toggleUnderline

const toggleUnderline: Command


underlineDeltaToHtmlAdapterMatcher

const underlineDeltaToHtmlAdapterMatcher: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineDeltaToHtmlAdapterMatcher>


UnderlineInlineSpecExtension

const UnderlineInlineSpecExtension: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineSpecs<AffineTextAttributes>>


UnderthroughExtension

const UnderthroughExtension: ExtensionType & object

Type Declaration

identifier

identifier: ServiceIdentifier<InlineMarkdownMatch<AffineTextAttributes>>

Functions

isFormatSupported()

isFormatSupported(chain): Chain<InitCommandCtx & object>

Parameters

chain

Chain<InitCommandCtx>

Returns

Chain<InitCommandCtx & object>


textKeymap()

textKeymap(std): Record<string, UIEventHandler>

Parameters

std

BlockStdScope

Returns

Record<string, UIEventHandler>