mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Added another formatText case and new test for it
This commit is contained in:
parent
f751931437
commit
8d36dce6aa
1
types/quill/index.d.ts
vendored
1
types/quill/index.d.ts
vendored
@ -176,6 +176,7 @@ export class Quill implements EventEmitter {
|
||||
formatText(index: number, length: number, format: string, value: any, source?: Sources): DeltaStatic;
|
||||
formatText(index: number, length: number, formats: StringMap, source?: Sources): DeltaStatic;
|
||||
formatText(range: RangeStatic, format: string, value: any, source?: Sources): DeltaStatic;
|
||||
formatText(range: RangeStatic, formats: StringMap, source?: Sources): DeltaStatic;
|
||||
getFormat(range?: RangeStatic): StringMap;
|
||||
getFormat(index: number, length?: number): StringMap;
|
||||
removeFormat(index: number, length: number, source?: Sources): DeltaStatic;
|
||||
|
||||
@ -85,6 +85,15 @@ function test_formatText3() {
|
||||
quillEditor.formatText(range, 'bold', true);
|
||||
}
|
||||
|
||||
function test_formatText4() {
|
||||
const quillEditor = new Quill('#editor');
|
||||
const range = {index: 0, length: 5};
|
||||
quillEditor.formatText(range, {
|
||||
bold: false,
|
||||
color: 'rgb(0, 0, 255)'
|
||||
});
|
||||
}
|
||||
|
||||
function test_formatLine1() {
|
||||
const quillEditor = new Quill('#editor');
|
||||
quillEditor.formatLine(1, 3, 'api');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user