Skip to main content

Crate kode_leptos

Crate kode_leptos 

Source

Re-exports§

pub use extension::Extension;
pub use extension::ExtensionEditorContext;
pub use extension::ExtensionKeyboardShortcut;
pub use extension::ExtensionToolbarItem;
pub use wysiwyg::TreeWysiwygEditor;

Modules§

extension
Extension system for the kode WYSIWYG editor.
wysiwyg

Structs§

CompletionContext
Context passed to completion providers.
CompletionItem
A single completion suggestion.
CompletionProviderConfig
Configuration for a single completion provider.
CustomToolbarButton
A custom toolbar button provided by the consuming application.
Diagnostic
A single diagnostic finding from a [DiagnosticProvider].
EditorHandle
A handle to programmatically interact with a CodeEditor instance.
FenceTracker
Tracks fenced code block state while scanning a markdown document.
FormattingState
Describes which formatting is active at the current cursor position.
Language
A language identifier used to select a grammar for syntax highlighting.
Marker
Position
A position in the document as (line, column), both 0-indexed. Column is measured in chars (not bytes).
Theme
Complete editor theme — UI chrome colors plus syntax highlighting.

Enums§

BuiltinButton
Built-in formatting buttons. kode knows how to execute these actions and track their active state via the document’s formatting state.
CompletionKind
The kind of a completion item, used for icon display and sorting.
CompletionTrigger
What triggered the completion request.
DiagnosticSeverity
Severity levels, matching LSP DiagnosticSeverity semantics.
EditorMode
InjectCommand
Commands that can be injected into the editor from outside (e.g., modals). Write to the inject signal prop on TreeWysiwygEditor.
MarkerSeverity
SyntaxTheme
Syntax highlighting theme selection.
ToolbarItem
A single item in the toolbar. Applications compose a Vec<ToolbarItem> to control which buttons appear, their order, and custom content.

Functions§

CodeEditor
Optional Props
MarkdownEditorComponent
Optional Props
Toolbar
Required Props
default_toolbar_items
The default toolbar layout — used when no custom toolbar_items is provided.
language_from_info_string
Resolve a fenced code block info string to a Language.
line_languages
Compute the effective highlight language for each line of a markdown document.
tree_sitter_provider
Create a DiagnosticProvider that uses a tree-sitter grammar to detect syntax errors. Works with any tree-sitter language — SQL, Python, JSON, BigQuery SQL, etc.

Type Aliases§

CompletionItemRenderer
A function that renders a custom view for a completion item.
CompletionProviderFn
An async function that provides completion items given editor context.
DiagnosticProvider
An async function that validates editor text and returns diagnostics.