repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/blots/cursor.ts
packages/quill/src/blots/cursor.ts
import { EmbedBlot, Scope } from 'parchment'; import type { Parent, ScrollBlot } from 'parchment'; import type Selection from '../core/selection.js'; import TextBlot from './text.js'; import type { EmbedContextRange } from './embed.js'; class Cursor extends EmbedBlot { static blotName = 'cursor'; static className ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/blots/scroll.ts
packages/quill/src/blots/scroll.ts
import { ContainerBlot, LeafBlot, Scope, ScrollBlot } from 'parchment'; import type { Blot, Parent, EmbedBlot, ParentBlot, Registry } from 'parchment'; import Delta, { AttributeMap, Op } from 'quill-delta'; import Emitter from '../core/emitter.js'; import type { EmitterSource } from '../core/emitter.js'; import Block, ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/blots/block.ts
packages/quill/src/blots/block.ts
import { AttributorStore, BlockBlot, EmbedBlot, LeafBlot, Scope, } from 'parchment'; import type { Blot, Parent } from 'parchment'; import Delta from 'quill-delta'; import Break from './break.js'; import Inline from './inline.js'; import TextBlot from './text.js'; const NEWLINE_LENGTH = 1; class Block exten...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/blots/embed.ts
packages/quill/src/blots/embed.ts
import type { ScrollBlot } from 'parchment'; import { EmbedBlot } from 'parchment'; import TextBlot from './text.js'; const GUARD_TEXT = '\uFEFF'; export interface EmbedContextRange { startNode: Node | Text; startOffset: number; endNode?: Node | Text; endOffset?: number; } class Embed extends EmbedBlot { c...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/blots/break.ts
packages/quill/src/blots/break.ts
import { EmbedBlot } from 'parchment'; class Break extends EmbedBlot { static value() { return undefined; } optimize() { if (this.prev || this.next) { this.remove(); } } length() { return 0; } value() { return ''; } } Break.blotName = 'break'; Break.tagName = 'BR'; export ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/blots/text.ts
packages/quill/src/blots/text.ts
import { TextBlot } from 'parchment'; class Text extends TextBlot {} // https://lodash.com/docs#escape const entityMap: Record<string, string> = { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;', }; function escapeText(text: string) { return text.replace(/[&<>"']/g, (s) => entityMap[s...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/blots/inline.ts
packages/quill/src/blots/inline.ts
import { EmbedBlot, InlineBlot, Scope } from 'parchment'; import type { BlotConstructor } from 'parchment'; import Break from './break.js'; import Text from './text.js'; class Inline extends InlineBlot { static allowedChildren: BlotConstructor[] = [Inline, Break, EmbedBlot, Text]; // Lower index means deeper in th...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/align.ts
packages/quill/src/formats/align.ts
import { Attributor, ClassAttributor, Scope, StyleAttributor } from 'parchment'; const config = { scope: Scope.BLOCK, whitelist: ['right', 'center', 'justify'], }; const AlignAttribute = new Attributor('align', 'align', config); const AlignClass = new ClassAttributor('align', 'ql-align', config); const AlignStyle...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/blockquote.ts
packages/quill/src/formats/blockquote.ts
import Block from '../blots/block.js'; class Blockquote extends Block { static blotName = 'blockquote'; static tagName = 'blockquote'; } export default Blockquote;
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/formula.ts
packages/quill/src/formats/formula.ts
import Embed from '../blots/embed.js'; class Formula extends Embed { static blotName = 'formula'; static className = 'ql-formula'; static tagName = 'SPAN'; static create(value: string) { // @ts-expect-error if (window.katex == null) { throw new Error('Formula module requires KaTeX.'); } ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/direction.ts
packages/quill/src/formats/direction.ts
import { Attributor, ClassAttributor, Scope, StyleAttributor } from 'parchment'; const config = { scope: Scope.BLOCK, whitelist: ['rtl'], }; const DirectionAttribute = new Attributor('direction', 'dir', config); const DirectionClass = new ClassAttributor('direction', 'ql-direction', config); const DirectionStyle ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/color.ts
packages/quill/src/formats/color.ts
import { ClassAttributor, Scope, StyleAttributor } from 'parchment'; class ColorAttributor extends StyleAttributor { value(domNode: HTMLElement) { let value = super.value(domNode) as string; if (!value.startsWith('rgb(')) return value; value = value.replace(/^[^\d]+/, '').replace(/[^\d]+$/, ''); cons...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/script.ts
packages/quill/src/formats/script.ts
import Inline from '../blots/inline.js'; class Script extends Inline { static blotName = 'script'; static tagName = ['SUB', 'SUP']; static create(value: 'super' | 'sub' | (string & {})) { if (value === 'super') { return document.createElement('sup'); } if (value === 'sub') { return docum...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/link.ts
packages/quill/src/formats/link.ts
import Inline from '../blots/inline.js'; class Link extends Inline { static blotName = 'link'; static tagName = 'A'; static SANITIZED_URL = 'about:blank'; static PROTOCOL_WHITELIST = ['http', 'https', 'mailto', 'tel', 'sms']; static create(value: string) { const node = super.create(value) as HTMLElement...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/underline.ts
packages/quill/src/formats/underline.ts
import Inline from '../blots/inline.js'; class Underline extends Inline { static blotName = 'underline'; static tagName = 'U'; } export default Underline;
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/code.ts
packages/quill/src/formats/code.ts
import Block from '../blots/block.js'; import Break from '../blots/break.js'; import Cursor from '../blots/cursor.js'; import Inline from '../blots/inline.js'; import TextBlot, { escapeText } from '../blots/text.js'; import Container from '../blots/container.js'; import Quill from '../core/quill.js'; class CodeBlockCo...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/header.ts
packages/quill/src/formats/header.ts
import Block from '../blots/block.js'; class Header extends Block { static blotName = 'header'; static tagName = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6']; static formats(domNode: Element) { return this.tagName.indexOf(domNode.tagName) + 1; } } export default Header;
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/table.ts
packages/quill/src/formats/table.ts
import type { LinkedList } from 'parchment'; import Block from '../blots/block.js'; import Container from '../blots/container.js'; class TableCell extends Block { static blotName = 'table'; static tagName = 'TD'; static create(value: string) { const node = super.create() as HTMLElement; if (value) { ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/font.ts
packages/quill/src/formats/font.ts
import { ClassAttributor, Scope, StyleAttributor } from 'parchment'; const config = { scope: Scope.INLINE, whitelist: ['serif', 'monospace'], }; const FontClass = new ClassAttributor('font', 'ql-font', config); class FontStyleAttributor extends StyleAttributor { value(node: HTMLElement) { return super.valu...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/video.ts
packages/quill/src/formats/video.ts
import { BlockEmbed } from '../blots/block.js'; import Link from './link.js'; const ATTRIBUTES = ['height', 'width']; class Video extends BlockEmbed { static blotName = 'video'; static className = 'ql-video'; static tagName = 'IFRAME'; static create(value: string) { const node = super.create(value) as El...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/background.ts
packages/quill/src/formats/background.ts
import { ClassAttributor, Scope } from 'parchment'; import { ColorAttributor } from './color.js'; const BackgroundClass = new ClassAttributor('background', 'ql-bg', { scope: Scope.INLINE, }); const BackgroundStyle = new ColorAttributor('background', 'background-color', { scope: Scope.INLINE, }); export { Backgrou...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/size.ts
packages/quill/src/formats/size.ts
import { ClassAttributor, Scope, StyleAttributor } from 'parchment'; const SizeClass = new ClassAttributor('size', 'ql-size', { scope: Scope.INLINE, whitelist: ['small', 'large', 'huge'], }); const SizeStyle = new StyleAttributor('size', 'font-size', { scope: Scope.INLINE, whitelist: ['10px', '18px', '32px'], ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/italic.ts
packages/quill/src/formats/italic.ts
import Bold from './bold.js'; class Italic extends Bold { static blotName = 'italic'; static tagName = ['EM', 'I']; } export default Italic;
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/strike.ts
packages/quill/src/formats/strike.ts
import Bold from './bold.js'; class Strike extends Bold { static blotName = 'strike'; static tagName = ['S', 'STRIKE']; } export default Strike;
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/image.ts
packages/quill/src/formats/image.ts
import { EmbedBlot } from 'parchment'; import { sanitize } from './link.js'; const ATTRIBUTES = ['alt', 'height', 'width']; class Image extends EmbedBlot { static blotName = 'image'; static tagName = 'IMG'; static create(value: string) { const node = super.create(value) as Element; if (typeof value ===...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/list.ts
packages/quill/src/formats/list.ts
import Block from '../blots/block.js'; import Container from '../blots/container.js'; import type Scroll from '../blots/scroll.js'; import Quill from '../core/quill.js'; class ListContainer extends Container {} ListContainer.blotName = 'list-container'; ListContainer.tagName = 'OL'; class ListItem extends Block { s...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/indent.ts
packages/quill/src/formats/indent.ts
import { ClassAttributor, Scope } from 'parchment'; class IndentAttributor extends ClassAttributor { add(node: HTMLElement, value: string | number) { let normalizedValue = 0; if (value === '+1' || value === '-1') { const indent = this.value(node) || 0; normalizedValue = value === '+1' ? indent + ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/formats/bold.ts
packages/quill/src/formats/bold.ts
import Inline from '../blots/inline.js'; class Bold extends Inline { static blotName = 'bold'; static tagName = ['STRONG', 'B']; static create() { return super.create(); } static formats() { return true; } optimize(context: { [key: string]: any }) { super.optimize(context); if (this.do...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/modules/syntax.ts
packages/quill/src/modules/syntax.ts
import Delta from 'quill-delta'; import { ClassAttributor, Scope } from 'parchment'; import type { Blot, ScrollBlot } from 'parchment'; import Inline from '../blots/inline.js'; import Quill from '../core/quill.js'; import Module from '../core/module.js'; import { blockDelta } from '../blots/block.js'; import BreakBlot ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/modules/keyboard.ts
packages/quill/src/modules/keyboard.ts
import { cloneDeep, isEqual } from 'lodash-es'; import Delta, { AttributeMap } from 'quill-delta'; import { EmbedBlot, Scope, TextBlot } from 'parchment'; import type { Blot, BlockBlot } from 'parchment'; import Quill from '../core/quill.js'; import logger from '../core/logger.js'; import Module from '../core/module.js...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/modules/toolbar.ts
packages/quill/src/modules/toolbar.ts
import Delta from 'quill-delta'; import { EmbedBlot, Scope } from 'parchment'; import Quill from '../core/quill.js'; import logger from '../core/logger.js'; import Module from '../core/module.js'; import type { Range } from '../core/selection.js'; const debug = logger('quill:toolbar'); type Handler = (this: Toolbar, ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/modules/table.ts
packages/quill/src/modules/table.ts
import Delta from 'quill-delta'; import Quill from '../core/quill.js'; import Module from '../core/module.js'; import { TableCell, TableRow, TableBody, TableContainer, tableId, } from '../formats/table.js'; class Table extends Module { static register() { Quill.register(TableCell); Quill.register(T...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/modules/history.ts
packages/quill/src/modules/history.ts
import { Scope } from 'parchment'; import type Delta from 'quill-delta'; import Module from '../core/module.js'; import Quill from '../core/quill.js'; import type Scroll from '../blots/scroll.js'; import type { Range } from '../core/selection.js'; export interface HistoryOptions { userOnly: boolean; delay: number;...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/modules/uploader.ts
packages/quill/src/modules/uploader.ts
import Delta from 'quill-delta'; import type Quill from '../core/quill.js'; import Emitter from '../core/emitter.js'; import Module from '../core/module.js'; import type { Range } from '../core/selection.js'; interface UploaderOptions { mimetypes: string[]; handler: (this: { quill: Quill }, range: Range, files: Fi...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/modules/clipboard.ts
packages/quill/src/modules/clipboard.ts
import type { ScrollBlot } from 'parchment'; import { Attributor, BlockBlot, ClassAttributor, EmbedBlot, Scope, StyleAttributor, } from 'parchment'; import Delta from 'quill-delta'; import { BlockEmbed } from '../blots/block.js'; import type { EmitterSource } from '../core/emitter.js'; import logger from '....
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/modules/tableEmbed.ts
packages/quill/src/modules/tableEmbed.ts
import Delta, { OpIterator } from 'quill-delta'; import type { Op, AttributeMap } from 'quill-delta'; import Module from '../core/module.js'; export type CellData = { content?: Delta['ops']; attributes?: Record<string, unknown>; }; export type TableRowColumnOp = Omit<Op, 'insert'> & { insert?: { id: string }; }...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/modules/input.ts
packages/quill/src/modules/input.ts
import Delta from 'quill-delta'; import Module from '../core/module.js'; import Quill from '../core/quill.js'; import type { Range } from '../core/selection.js'; import { deleteRange } from './keyboard.js'; const INSERT_TYPES = ['insertText', 'insertReplacementText']; class Input extends Module { constructor(quill:...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/modules/uiNode.ts
packages/quill/src/modules/uiNode.ts
import { ParentBlot } from 'parchment'; import Module from '../core/module.js'; import Quill from '../core/quill.js'; const isMac = /Mac/i.test(navigator.platform); // Export for testing export const TTL_FOR_VALID_SELECTION_CHANGE = 100; // A loose check to determine if the shortcut can move the caret before a UI no...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/modules/normalizeExternalHTML/index.ts
packages/quill/src/modules/normalizeExternalHTML/index.ts
import googleDocs from './normalizers/googleDocs.js'; import msWord from './normalizers/msWord.js'; const NORMALIZERS = [msWord, googleDocs]; const normalizeExternalHTML = (doc: Document) => { if (doc.documentElement) { NORMALIZERS.forEach((normalize) => { normalize(doc); }); } }; export default no...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/modules/normalizeExternalHTML/normalizers/msWord.ts
packages/quill/src/modules/normalizeExternalHTML/normalizers/msWord.ts
const ignoreRegexp = /\bmso-list:[^;]*ignore/i; const idRegexp = /\bmso-list:[^;]*\bl(\d+)/i; const indentRegexp = /\bmso-list:[^;]*\blevel(\d+)/i; const parseListItem = (element: Element, html: string) => { const style = element.getAttribute('style'); const idMatch = style?.match(idRegexp); if (!idMatch) { ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/modules/normalizeExternalHTML/normalizers/googleDocs.ts
packages/quill/src/modules/normalizeExternalHTML/normalizers/googleDocs.ts
const normalWeightRegexp = /font-weight:\s*normal/; const blockTagNames = ['P', 'OL', 'UL']; const isBlockElement = (element: Element | null) => { return element && blockTagNames.includes(element.tagName); }; const normalizeEmptyLines = (doc: Document) => { Array.from(doc.querySelectorAll('br')) .filter( ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/themes/base.ts
packages/quill/src/themes/base.ts
import { merge } from 'lodash-es'; import type Quill from '../core/quill.js'; import Emitter from '../core/emitter.js'; import Theme from '../core/theme.js'; import type { ThemeOptions } from '../core/theme.js'; import ColorPicker from '../ui/color-picker.js'; import IconPicker from '../ui/icon-picker.js'; import Picke...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/themes/bubble.ts
packages/quill/src/themes/bubble.ts
import { merge } from 'lodash-es'; import Emitter from '../core/emitter.js'; import BaseTheme, { BaseTooltip } from './base.js'; import { Range } from '../core/selection.js'; import type { Bounds } from '../core/selection.js'; import icons from '../ui/icons.js'; import Quill from '../core/quill.js'; import type { Theme...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/themes/snow.ts
packages/quill/src/themes/snow.ts
import { merge } from 'lodash-es'; import Emitter from '../core/emitter.js'; import BaseTheme, { BaseTooltip } from './base.js'; import LinkBlot from '../formats/link.js'; import { Range } from '../core/selection.js'; import icons from '../ui/icons.js'; import Quill from '../core/quill.js'; import type { Context } from...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/core/instances.ts
packages/quill/src/core/instances.ts
import type Quill from '../core.js'; export default new WeakMap<Node, Quill>();
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/core/editor.ts
packages/quill/src/core/editor.ts
import { cloneDeep, isEqual, merge } from 'lodash-es'; import { LeafBlot, EmbedBlot, Scope, ParentBlot } from 'parchment'; import type { Blot } from 'parchment'; import Delta, { AttributeMap, Op } from 'quill-delta'; import Block, { BlockEmbed, bubbleFormats } from '../blots/block.js'; import Break from '../blots/break...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/core/quill.ts
packages/quill/src/core/quill.ts
import { merge } from 'lodash-es'; import * as Parchment from 'parchment'; import type { Op } from 'quill-delta'; import Delta from 'quill-delta'; import type { BlockEmbed } from '../blots/block.js'; import type Block from '../blots/block.js'; import type Scroll from '../blots/scroll.js'; import type Clipboard from '.....
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/core/composition.ts
packages/quill/src/core/composition.ts
import Embed from '../blots/embed.js'; import type Scroll from '../blots/scroll.js'; import Emitter from './emitter.js'; class Composition { isComposing = false; constructor( private scroll: Scroll, private emitter: Emitter, ) { this.setupListeners(); } private setupListeners() { this.scrol...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/core/logger.ts
packages/quill/src/core/logger.ts
const levels = ['error', 'warn', 'log', 'info'] as const; export type DebugLevel = (typeof levels)[number]; let level: DebugLevel | false = 'warn'; function debug(method: DebugLevel, ...args: unknown[]) { if (level) { if (levels.indexOf(method) <= levels.indexOf(level)) { console[method](...args); // eslin...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/core/emitter.ts
packages/quill/src/core/emitter.ts
import { EventEmitter } from 'eventemitter3'; import instances from './instances.js'; import logger from './logger.js'; const debug = logger('quill:events'); const EVENTS = ['selectionchange', 'mousedown', 'mouseup', 'click']; EVENTS.forEach((eventName) => { document.addEventListener(eventName, (...args) => { A...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/core/selection.ts
packages/quill/src/core/selection.ts
import { LeafBlot, Scope } from 'parchment'; import { cloneDeep, isEqual } from 'lodash-es'; import Emitter from './emitter.js'; import type { EmitterSource } from './emitter.js'; import logger from './logger.js'; import type Cursor from '../blots/cursor.js'; import type Scroll from '../blots/scroll.js'; const debug =...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/core/theme.ts
packages/quill/src/core/theme.ts
import type Quill from '../core.js'; import type Clipboard from '../modules/clipboard.js'; import type History from '../modules/history.js'; import type Keyboard from '../modules/keyboard.js'; import type { ToolbarProps } from '../modules/toolbar.js'; import type Uploader from '../modules/uploader.js'; export interfac...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/core/module.ts
packages/quill/src/core/module.ts
import type Quill from './quill.js'; abstract class Module<T extends {} = {}> { static DEFAULTS = {}; constructor( public quill: Quill, protected options: Partial<T> = {}, ) {} } export default Module;
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/core/utils/createRegistryWithFormats.ts
packages/quill/src/core/utils/createRegistryWithFormats.ts
import { Registry } from 'parchment'; const MAX_REGISTER_ITERATIONS = 100; const CORE_FORMATS = ['block', 'break', 'cursor', 'inline', 'scroll', 'text']; const createRegistryWithFormats = ( formats: string[], sourceRegistry: Registry, debug: { error: (errorMessage: string) => void }, ) => { const registry = n...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/core/utils/scrollRectIntoView.ts
packages/quill/src/core/utils/scrollRectIntoView.ts
export type Rect = { top: number; right: number; bottom: number; left: number; }; const getParentElement = (element: Node): Element | null => element.parentElement || (element.getRootNode() as ShadowRoot).host || null; const getElementRect = (element: Element): Rect => { const rect = element.getBoundingCl...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/ui/color-picker.ts
packages/quill/src/ui/color-picker.ts
import Picker from './picker.js'; class ColorPicker extends Picker { constructor(select: HTMLSelectElement, label: string) { super(select); this.label.innerHTML = label; this.container.classList.add('ql-color-picker'); Array.from(this.container.querySelectorAll('.ql-picker-item')) .slice(0, 7) ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/ui/picker.ts
packages/quill/src/ui/picker.ts
import DropdownIcon from '../assets/icons/dropdown.svg'; let optionsCounter = 0; function toggleAriaAttribute(element: HTMLElement, attribute: string) { element.setAttribute( attribute, `${!(element.getAttribute(attribute) === 'true')}`, ); } class Picker { select: HTMLSelectElement; container: HTMLE...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/ui/icons.ts
packages/quill/src/ui/icons.ts
import alignLeftIcon from '../assets/icons/align-left.svg'; import alignCenterIcon from '../assets/icons/align-center.svg'; import alignRightIcon from '../assets/icons/align-right.svg'; import alignJustifyIcon from '../assets/icons/align-justify.svg'; import backgroundIcon from '../assets/icons/background.svg'; import ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/ui/icon-picker.ts
packages/quill/src/ui/icon-picker.ts
import Picker from './picker.js'; class IconPicker extends Picker { defaultItem: HTMLElement | null; constructor(select: HTMLSelectElement, icons: Record<string, string>) { super(select); this.container.classList.add('ql-icon-picker'); Array.from(this.container.querySelectorAll('.ql-picker-item')).for...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/src/ui/tooltip.ts
packages/quill/src/ui/tooltip.ts
import type Quill from '../core.js'; import type { Bounds } from '../core/selection.js'; const isScrollable = (el: Element) => { const { overflowY } = getComputedStyle(el, null); return overflowY !== 'visible' && overflowY !== 'clip'; }; class Tooltip { quill: Quill; boundsContainer: HTMLElement; root: HTML...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/fuzz/vitest.config.ts
packages/quill/test/fuzz/vitest.config.ts
import { defineConfig } from 'vitest/config'; export default defineConfig({ resolve: { extensions: ['.ts', '.js'], }, test: { include: ['test/fuzz/**/*.spec.ts'], environment: 'jsdom', testTimeout: 40000, pool: 'threads', }, });
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/fuzz/tableEmbed.spec.ts
packages/quill/test/fuzz/tableEmbed.spec.ts
import type { AttributeMap } from 'quill-delta'; import Delta from 'quill-delta'; import TableEmbed from '../../src/modules/tableEmbed.js'; import type { CellData, TableData, TableRowColumnOp, } from '../../src/modules/tableEmbed.js'; import { choose, randomInt } from './__helpers__/utils.js'; import { beforeAll,...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/fuzz/editor.spec.ts
packages/quill/test/fuzz/editor.spec.ts
import type { Op } from 'quill-delta'; import Delta, { AttributeMap } from 'quill-delta'; import { choose, randomInt, runFuzz } from './__helpers__/utils.js'; import { AlignClass } from '../../src/formats/align.js'; import { FontClass } from '../../src/formats/font.js'; import { SizeClass } from '../../src/formats/size...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/fuzz/__helpers__/utils.ts
packages/quill/test/fuzz/__helpers__/utils.ts
export function randomInt(max: number) { return Math.floor(Math.random() * max); } export function choose<T>(choices: T[]): T { return choices[randomInt(choices.length)]; } export function runFuzz(testCase: () => void) { const start = performance.now(); do { testCase(); } while (performance.now() - star...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/e2e/replaceSelection.spec.ts
packages/quill/test/e2e/replaceSelection.spec.ts
import { expect } from '@playwright/test'; import { test } from './fixtures/index.js'; test.describe('replace selection', () => { test.beforeEach(async ({ editorPage }) => { await editorPage.open(); }); test.describe('replace a colored text', () => { test('after a normal text', async ({ page, editorPage...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/e2e/full.spec.ts
packages/quill/test/e2e/full.spec.ts
import { expect } from '@playwright/test'; import { getSelectionInTextNode, SHORTKEY } from './utils/index.js'; import { test, CHAPTER, P1, P2 } from './fixtures/index.js'; test('compose an epic', async ({ page, editorPage }) => { await editorPage.open(); await editorPage.root.pressSequentially('The Whale'); exp...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/e2e/list.spec.ts
packages/quill/test/e2e/list.spec.ts
import { expect } from '@playwright/test'; import { test } from './fixtures/index.js'; import { isMac, sleep } from './utils/index.js'; const listTypes = ['bullet', 'checked']; test.describe('list', () => { test.beforeEach(async ({ editorPage }) => { await editorPage.open(); }); for (const list of listType...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/e2e/history.spec.ts
packages/quill/test/e2e/history.spec.ts
import { expect } from '@playwright/test'; import type { Page } from '@playwright/test'; import { test } from './fixtures/index.js'; import { SHORTKEY } from './utils/index.js'; const undo = (page: Page) => page.keyboard.press(`${SHORTKEY}+z`); const redo = (page: Page) => page.keyboard.press(`${SHORTKEY}+Shift+z`); ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/e2e/fixtures/Composition.ts
packages/quill/test/e2e/fixtures/Composition.ts
import type { CDPSession, Page, PlaywrightWorkerOptions, } from '@playwright/test'; abstract class CompositionSession { abstract update(key: string): Promise<void>; abstract commit(committedText: string): Promise<void>; protected composingData = ''; constructor(protected page: Page) {} protected asy...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/e2e/fixtures/Clipboard.ts
packages/quill/test/e2e/fixtures/Clipboard.ts
import type { Page } from '@playwright/test'; import { SHORTKEY } from '../utils/index.js'; class Clipboard { constructor(private page: Page) {} async copy() { await this.page.keyboard.press(`${SHORTKEY}+c`); } async cut() { await this.page.keyboard.press(`${SHORTKEY}+x`); } async paste() { ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/e2e/fixtures/index.ts
packages/quill/test/e2e/fixtures/index.ts
import { test as base } from '@playwright/test'; import EditorPage from '../pageobjects/EditorPage.js'; import Composition from './Composition.js'; import Locker from './utils/Locker.js'; import Clipboard from './Clipboard.js'; export const test = base.extend<{ editorPage: EditorPage; clipboard: Clipboard; compo...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/e2e/fixtures/utils/Locker.ts
packages/quill/test/e2e/fixtures/utils/Locker.ts
import { unlink, writeFile } from 'fs/promises'; import { unlinkSync } from 'fs'; import { tmpdir } from 'os'; import { join } from 'path'; import { globSync } from 'glob'; const sleep = (ms: number) => new Promise((resolve) => { setTimeout(resolve, ms); }); const PREFIX = 'playwright_locker_'; class Locker ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/e2e/utils/index.ts
packages/quill/test/e2e/utils/index.ts
export const isMac = process.platform === 'darwin'; export const SHORTKEY = isMac ? 'Meta' : 'Control'; export function getSelectionInTextNode() { const selection = document.getSelection(); if (!selection) { throw new Error('Selection is null'); } const { anchorNode, anchorOffset, focusNode, focusOffset } ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/e2e/pageobjects/EditorPage.ts
packages/quill/test/e2e/pageobjects/EditorPage.ts
import type { Page } from '@playwright/test'; import type Composition from '../fixtures/Composition.js'; interface Op { insert?: string | Record<string, unknown>; delete?: number; retain?: number | Record<string, unknown>; attributes?: Record<string, unknown>; } const getTextNodeDef = [ 'el', 'match', `...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/types/quill.test-d.ts
packages/quill/test/types/quill.test-d.ts
import { assertType, expectTypeOf } from 'vitest'; import Quill, { Delta } from '../../src/quill.js'; import type { EmitterSource, Parchment, Range } from '../../src/quill.js'; import type { default as Block, BlockEmbed } from '../../src/blots/block.js'; import SnowTheme from '../../src/themes/snow.js'; import { LeafBl...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/vitest.config.ts
packages/quill/test/unit/vitest.config.ts
import { defineConfig } from 'vitest/config'; import { resolve } from 'path'; export default defineConfig({ resolve: { extensions: ['.ts', '.js'], }, test: { include: [resolve(__dirname, '**/*.spec.ts')], typecheck: { enabled: true, include: [resolve(__dirname, '**/*.test-d.ts')], }, ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/blots/block-embed.spec.ts
packages/quill/test/unit/blots/block-embed.spec.ts
import { describe, expect, test } from 'vitest'; import { createScroll as baseCreateScroll, createRegistry, } from '../__helpers__/factory.js'; import Video from '../../../src/formats/video.js'; import Image from '../../../src/formats/image.js'; const createScroll = (html: string) => baseCreateScroll(html, creat...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/blots/scroll.spec.ts
packages/quill/test/unit/blots/scroll.spec.ts
import { describe, expect, test, vitest } from 'vitest'; import Emitter from '../../../src/core/emitter.js'; import Selection, { Range } from '../../../src/core/selection.js'; import Cursor from '../../../src/blots/cursor.js'; import Scroll from '../../../src/blots/scroll.js'; import Delta from 'quill-delta'; import { ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/blots/inline.spec.ts
packages/quill/test/unit/blots/inline.spec.ts
import { describe, expect, test } from 'vitest'; import { createRegistry, createScroll } from '../__helpers__/factory.js'; import Bold from '../../../src/formats/bold.js'; import Italic from '../../../src/formats/italic.js'; describe('Inline', () => { test('format order', () => { const scroll = createScroll( ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/blots/block.spec.ts
packages/quill/test/unit/blots/block.spec.ts
import { describe, expect, test } from 'vitest'; import { createScroll as baseCreateScroll, createRegistry, } from '../__helpers__/factory.js'; import Header from '../../../src/formats/header.js'; import Bold from '../../../src/formats/bold.js'; const createScroll = (html: string) => baseCreateScroll(html, creat...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/formats/table.spec.ts
packages/quill/test/unit/formats/table.spec.ts
import Delta from 'quill-delta'; import Editor from '../../../src/core/editor.js'; import { createScroll as baseCreateScroll, createRegistry, } from '../__helpers__/factory.js'; import { describe, expect, test } from 'vitest'; import { TableBody, TableCell, TableContainer, TableRow, } from '../../../src/for...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/formats/link.spec.ts
packages/quill/test/unit/formats/link.spec.ts
import Delta from 'quill-delta'; import { createScroll as baseCreateScroll, createRegistry, } from '../__helpers__/factory.js'; import Editor from '../../../src/core/editor.js'; import Link from '../../../src/formats/link.js'; import { describe, expect, test } from 'vitest'; import { SizeClass } from '../../../src/...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/formats/list.spec.ts
packages/quill/test/unit/formats/list.spec.ts
import Delta from 'quill-delta'; import { createScroll as baseCreateScroll, createRegistry, } from '../__helpers__/factory.js'; import Editor from '../../../src/core/editor.js'; import { describe, expect, test } from 'vitest'; import List, { ListContainer } from '../../../src/formats/list.js'; import IndentClass fr...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/formats/header.spec.ts
packages/quill/test/unit/formats/header.spec.ts
import Delta from 'quill-delta'; import { createScroll as baseCreateScroll, createRegistry, } from '../__helpers__/factory.js'; import Editor from '../../../src/core/editor.js'; import Header from '../../../src/formats/header.js'; import Italic from '../../../src/formats/italic.js'; import { describe, expect, test ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/formats/bold.spec.ts
packages/quill/test/unit/formats/bold.spec.ts
import { describe, expect, test } from 'vitest'; import { createRegistry, createScroll as baseCreateScroll, } from '../__helpers__/factory.js'; import Bold from '../../../src/formats/bold.js'; const createScroll = (html: string) => baseCreateScroll(html, createRegistry([Bold])); describe('Bold', () => { test(...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/formats/script.spec.ts
packages/quill/test/unit/formats/script.spec.ts
import Editor from '../../../src/core/editor.js'; import Script from '../../../src/formats/script.js'; import { createScroll as baseCreateScroll, createRegistry, } from '../__helpers__/factory.js'; import { describe, expect, test } from 'vitest'; const createScroll = (html: string) => baseCreateScroll(html, crea...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/formats/align.spec.ts
packages/quill/test/unit/formats/align.spec.ts
import Delta from 'quill-delta'; import Editor from '../../../src/core/editor.js'; import { describe, test, expect } from 'vitest'; import { createRegistry, createScroll as baseCreateScroll, } from '../__helpers__/factory.js'; import { AlignClass } from '../../../src/formats/align.js'; const createScroll = (html: ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/formats/code.spec.ts
packages/quill/test/unit/formats/code.spec.ts
import Delta from 'quill-delta'; import Editor from '../../../src/core/editor.js'; import { createScroll as baseCreateScroll, createRegistry, } from '../__helpers__/factory.js'; import { describe, expect, test } from 'vitest'; import CodeBlock, { Code, CodeBlockContainer, } from '../../../src/formats/code.js'; ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/formats/indent.spec.ts
packages/quill/test/unit/formats/indent.spec.ts
import Delta from 'quill-delta'; import { createScroll as baseCreateScroll, createRegistry, } from '../__helpers__/factory.js'; import Editor from '../../../src/core/editor.js'; import List, { ListContainer } from '../../../src/formats/list.js'; import IndentClass from '../../../src/formats/indent.js'; import { des...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/formats/color.spec.ts
packages/quill/test/unit/formats/color.spec.ts
import Delta from 'quill-delta'; import Editor from '../../../src/core/editor.js'; import { createScroll as baseCreateScroll, createRegistry, } from '../__helpers__/factory.js'; import { ColorStyle } from '../../../src/formats/color.js'; import { describe, expect, test } from 'vitest'; import Bold from '../../../sr...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/modules/toolbar.spec.ts
packages/quill/test/unit/modules/toolbar.spec.ts
import { describe, expect, test } from 'vitest'; import Quill from '../../../src/core/quill.js'; import Toolbar, { addControls } from '../../../src/modules/toolbar.js'; import { normalizeHTML } from '../__helpers__/utils.js'; import SnowTheme from '../../../src/themes/snow.js'; import Clipboard from '../../../src/modul...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/modules/table.spec.ts
packages/quill/test/unit/modules/table.spec.ts
import Delta from 'quill-delta'; import Quill from '../../../src/core.js'; import { describe, expect, test } from 'vitest'; import { createRegistry } from '../__helpers__/factory.js'; import { TableBody, TableCell, TableContainer, TableRow, } from '../../../src/formats/table.js'; import { normalizeHTML } from '...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/modules/keyboard.spec.ts
packages/quill/test/unit/modules/keyboard.spec.ts
import { describe, expect, test } from 'vitest'; import Keyboard, { SHORTKEY, normalize, } from '../../../src/modules/keyboard.js'; const assert = <T>(value: T | null | undefined): T => { if (value == null) { throw new Error(); } return value; }; const createKeyboardEvent = (key: string, override?: Part...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/modules/uiNode.spec.ts
packages/quill/test/unit/modules/uiNode.spec.ts
import '../../../src/quill.js'; import { describe, expect, test } from 'vitest'; import UINode, { TTL_FOR_VALID_SELECTION_CHANGE, } from '../../../src/modules/uiNode.js'; import Quill, { Delta } from '../../../src/core.js'; // Fake timer is not supported in browser mode yet. const delay = (ms: number) => new Promise...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/modules/history.spec.ts
packages/quill/test/unit/modules/history.spec.ts
import Delta from 'quill-delta'; import { describe, expect, test, vitest } from 'vitest'; import Quill from '../../../src/core.js'; import { getLastChangeIndex } from '../../../src/modules/history.js'; import type { HistoryOptions } from '../../../src/modules/history.js'; import { createRegistry, createScroll } from '....
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/modules/syntax.spec.ts
packages/quill/test/unit/modules/syntax.spec.ts
import hljs from 'highlight.js'; import Delta from 'quill-delta'; import { afterAll, beforeAll, describe, expect, test } from 'vitest'; import Quill from '../../../src/core.js'; import Bold from '../../../src/formats/bold.js'; import Syntax, { CodeBlock, CodeToken } from '../../../src/modules/syntax.js'; import { creat...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/modules/tableEmbed.spec.ts
packages/quill/test/unit/modules/tableEmbed.spec.ts
import Delta from 'quill-delta'; import { tableHandler } from '../../../src/modules/tableEmbed.js'; import { afterEach, beforeEach, describe, expect, test } from 'vitest'; describe('tableHandler', () => { beforeEach(() => { Delta.registerEmbed('table-embed', tableHandler); }); afterEach(() => { Delta.un...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/modules/clipboard.spec.ts
packages/quill/test/unit/modules/clipboard.spec.ts
import Delta from 'quill-delta'; import { describe, expect, test, vitest } from 'vitest'; import Quill from '../../../src/core.js'; import { Range } from '../../../src/core/selection.js'; import Bold from '../../../src/formats/bold.js'; import Header from '../../../src/formats/header.js'; import Image from '../../../sr...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/modules/normalizeExternalHTML/normalizers/googleDocs.spec.ts
packages/quill/test/unit/modules/normalizeExternalHTML/normalizers/googleDocs.spec.ts
import { describe, expect, test } from 'vitest'; import normalize from '../../../../../src/modules/normalizeExternalHTML/normalizers/googleDocs.js'; describe('Google Docs', () => { test('remove unnecessary b tags', () => { const html = ` <b style="font-weight: normal;" id="docs-internal-gui...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/modules/normalizeExternalHTML/normalizers/msWord.spec.ts
packages/quill/test/unit/modules/normalizeExternalHTML/normalizers/msWord.spec.ts
import { describe, expect, test } from 'vitest'; import normalize from '../../../../../src/modules/normalizeExternalHTML/normalizers/msWord.js'; describe('Microsoft Word', () => { test('keep the list style', () => { const html = ` <html xmlns:w="urn:schemas-microsoft-com:office:word"> <style> ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false