MCPcopy
hub / github.com/slab/quill / formatText

Method formatText

packages/quill/src/core/quill.ts:434–460  ·  view source on GitHub ↗
(
    index: number | Range,
    length: number | string,
    name: string | unknown,
    value?: unknown | EmitterSource,
    source?: EmitterSource,
  )

Source from the content-addressed store, hash-verified

432 source?: EmitterSource,
433 ): Delta;
434 formatText(
435 index: number | Range,
436 length: number | string,
437 name: string | unknown,
438 value?: unknown | EmitterSource,
439 source?: EmitterSource,
440 ): Delta {
441 let formats: Record<string, unknown>;
442 // eslint-disable-next-line prefer-const
443 [index, length, formats, source] = overload(
444 // @ts-expect-error
445 index,
446 length,
447 name,
448 value,
449 source,
450 );
451 return modify.call(
452 this,
453 () => {
454 return this.editor.formatText(index, length, formats);
455 },
456 source,
457 index,
458 0,
459 );
460 }
461
462 getBounds(index: number | Range, length = 0): Bounds | null {
463 let bounds: Bounds | null = null;

Callers 14

quill.test-d.tsFile · 0.45
syntax.spec.tsFile · 0.45
quill.spec.tsFile · 0.45
indent.spec.tsFile · 0.45
color.spec.tsFile · 0.45
align.spec.tsFile · 0.45
link.spec.tsFile · 0.45
code.spec.tsFile · 0.45
list.spec.tsFile · 0.45
script.spec.tsFile · 0.45
header.spec.tsFile · 0.45
formatMethod · 0.45

Calls 1

overloadFunction · 0.85

Tested by

no test coverage detected