UNPKG

ngx-quill

Version:

Angular components for the easy use of the QuillJS richt text editor.

1 lines 7.17 kB
{"version":3,"file":"ngx-quill-config.mjs","sources":["../../../projects/ngx-quill/config/src/quill-defaults.ts","../../../projects/ngx-quill/config/src/quill-editor.interfaces.ts","../../../projects/ngx-quill/config/src/quill-config.module.ts","../../../projects/ngx-quill/config/src/provide-quill-config.ts","../../../projects/ngx-quill/config/src/public_api.ts","../../../projects/ngx-quill/config/src/ngx-quill-config.ts"],"sourcesContent":["export const defaultModules = {\n toolbar: [\n ['bold', 'italic', 'underline', 'strike'], // toggled buttons\n ['blockquote', 'code-block'],\n\n [{ header: 1 }, { header: 2 }], // custom button values\n [{ list: 'ordered' }, { list: 'bullet' }],\n [{ script: 'sub' }, { script: 'super' }], // superscript/subscript\n [{ indent: '-1' }, { indent: '+1' }], // outdent/indent\n [{ direction: 'rtl' }], // text direction\n\n [{ size: ['small', false, 'large', 'huge'] }], // custom dropdown\n [{ header: [1, 2, 3, 4, 5, 6, false] }],\n\n [\n { color: [] },\n { background: [] }\n ], // dropdown with defaults from theme\n [{ font: [] }],\n [{ align: [] }],\n\n ['clean'], // remove formatting button\n\n ['link', 'image', 'video'] // link and image, video\n ]\n}\n","import { InjectionToken } from '@angular/core'\n\nimport { defaultModules } from './quill-defaults'\n\nexport interface CustomOption {\n import: string\n whitelist: any[]\n}\n\nexport interface CustomModule {\n // The `implementation` may be a custom module constructor or an Observable that resolves to\n // a custom module constructor (in case you'd want to load your custom module lazily).\n // For instance, these options are applicable:\n // import BlotFormatter from 'quill-blot-formatter';\n // customModules = [\n // { path: 'modules/blotFormatter', implementation: BlotFormatter }\n // ];\n // Or:\n // const BlotFormatter$ = defer(() => import('quill-blot-formatter').then(m => m.default))\n // customModules = [\n // { path: 'modules/blotFormatter', implementation: BlotFormatter$ }\n // ];\n implementation: any\n path: string\n}\n\nexport type QuillToolbarConfig = Array<Array< string | {\n indent?: string\n list?: string\n direction?: string\n header?: number | Array<boolean | number>\n color?: string[] | string\n background?: string[] | string\n align?: string[] | string\n script?: string\n font?: string[] | string\n size?: Array<boolean | string>\n}\n>>\n\nexport interface QuillModules {\n [key: string]: any\n clipboard?: {\n matchers?: any[]\n matchVisual?: boolean\n } | boolean\n history?: {\n delay?: number\n maxStack?: number\n userOnly?: boolean\n } | boolean\n keyboard?: {\n bindings?: any\n } | boolean\n syntax?: boolean | { highlight: any }\n toolbar?: QuillToolbarConfig | string | {\n container?: string | string[] | QuillToolbarConfig\n handlers?: {\n [key: string]: any\n }\n } | boolean\n}\n\nexport type QuillFormat = 'object' | 'json' | 'html' | 'text'\n\nexport interface QuillConfig {\n bounds?: HTMLElement | string\n customModules?: CustomModule[]\n customOptions?: CustomOption[]\n suppressGlobalRegisterWarning?: boolean\n debug?: 'error' | 'warn' | 'log' | false\n format?: QuillFormat\n formats?: string[]\n modules?: QuillModules\n placeholder?: string\n readOnly?: boolean\n scrollingContainer?: HTMLElement | string | null\n theme?: string\n strict?: boolean\n // Custom Config to track all changes or only changes by 'user'\n trackChanges?: 'user' | 'all'\n // provide default empty value\n defaultEmptyValue?: any\n sanitize?: boolean\n // A function, which is executed before the Quill editor is rendered, this might be useful\n // for lazy-loading CSS.\n beforeRender?: () => Promise<void>\n}\n\nexport const QUILL_CONFIG_TOKEN = new InjectionToken<QuillConfig>('config', {\n providedIn: 'root',\n factory: () => ({ modules: defaultModules })\n})\n","import { ModuleWithProviders, NgModule } from '@angular/core'\n\nimport { QuillConfig, QUILL_CONFIG_TOKEN } from './quill-editor.interfaces'\n\n/**\n * This `NgModule` provides a global Quill config on the root level, e.g., in `AppModule`.\n * But this eliminates the need to import the entire `ngx-quill` library into the main bundle.\n * The `quill-editor` itself may be rendered in any lazy-loaded module, but importing `QuillModule`\n * into the `AppModule` will bundle the `ngx-quill` into the vendor.\n */\n@NgModule()\nexport class QuillConfigModule {\n static forRoot(config: QuillConfig): ModuleWithProviders<QuillConfigModule> {\n return {\n ngModule: QuillConfigModule,\n providers: [{ provide: QUILL_CONFIG_TOKEN, useValue: config }],\n }\n }\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core'\n\nimport { QUILL_CONFIG_TOKEN, QuillConfig } from './quill-editor.interfaces'\n\n/**\n * Provides Quill configuration at the root level:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideQuillConfig(...)]\n * });\n * ```\n */\nexport const provideQuillConfig = (config: QuillConfig): EnvironmentProviders =>\n makeEnvironmentProviders([{ provide: QUILL_CONFIG_TOKEN, useValue: config }])\n","/*\n * Public API Surface of ngx-quill/config\n */\n\nexport * from './quill-defaults'\nexport * from './quill-config.module'\nexport * from './quill-editor.interfaces'\nexport * from './provide-quill-config'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;AAAa,MAAA,cAAc,GAAG;AAC5B,IAAA,OAAO,EAAE;AACP,QAAA,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,CAAC;QACzC,CAAC,YAAY,EAAE,YAAY,CAAC;QAE5B,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;QAC9B,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QACzC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;QACxC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACpC,QAAA,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AAEtB,QAAA,CAAC,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;AAC7C,QAAA,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CA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