/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/rich-text/src/remove.js
18 строк
642 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import { insert } from './insert'; import { create } from './create'; /** @typedef {import('./types').RichTextValue} RichTextValue */ /** * Remove content from a Rich Text value between the given `startIndex` and * `endIndex`. Indices are retrieved from the selection if none are provided. * * @param {RichTextValue} value Value to modify. * @param {number} [startIndex] Start index. * @param {number} [endIndex] End index. * * @return {RichTextValue} A new value with the content removed. */ export function remove( value, startIndex, endIndex ) { return insert( value, create(), startIndex, endIndex ); }