mirror of
https://github.com/codex-team/editor.js
synced 2024-05-17 22:06:49 +02:00
6f36707f67
* Add tunes improvements * Allow to show Inline Toolbar at Block Tune Wrapper element * Add fake cursor on block selection * Fix lint * Update types * Fix bugs with selection * Remove selection observer * Update due to comments * Fix tests * Update docs/block-tunes.md Co-authored-by: Peter Savchenko <specc.dev@gmail.com> * Move fake cursor to selection utils * Fix missing range for Safari * Fix data attribute value * Add comment * Update z-index for inline-toolbar * Add changelog * Remove fake cursor visibility for the core Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
18 lines
335 B
TypeScript
18 lines
335 B
TypeScript
/**
|
|
* ReadOnly API
|
|
*/
|
|
export interface ReadOnly {
|
|
/**
|
|
* Set or toggle read-only state
|
|
*
|
|
* @param {Boolean|undefined} state - set or toggle state
|
|
* @returns {Promise<boolean>} current value
|
|
*/
|
|
toggle: (state?: boolean) => Promise<boolean>;
|
|
|
|
/**
|
|
* Contains current read-only state
|
|
*/
|
|
isEnabled: boolean;
|
|
}
|