UNPKG

@yoopta/editor

Version:

<h2 align="center">Yoopta-Editor v1 🎉</h2> <p align="center">Yoopta-Editor - is an open source notion-like editor 💥</p> <div align="center"> <img width="574" alt="Screen Shot 2023-01-25 at 16 04 29" src="https://user-images.githubusercontent.com/2909311

33 lines • 924 B
import type { YooEditor } from '../types'; import type { UpdateMarkOptions } from './types'; /** * Update mark value in specified selection or blocks * * @param editor - YooEditor instance * @param options - Update mark options * * @example * ```typescript * // Update color mark in current text selection (slate.selection) or whole block * Marks.update(editor, { * type: 'color', * value: '#ff0000' * }); * * // Update mark in specific selection * Marks.update(editor, { * type: 'color', * value: '#ff0000', * selection: { anchor: { path: [0, 0], offset: 0 }, focus: { path: [0, 0], offset: 5 } } * }); * * // Update font size in specific block * Marks.update(editor, { * type: 'fontSize', * value: 16, * at: 0 * }); * ``` */ export declare function update(editor: YooEditor, options: UpdateMarkOptions): void; //# sourceMappingURL=update.d.ts.map