primeng
Version:
PrimeNG is a premium UI library for Angular featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock,
182 lines (178 loc) • 7.57 kB
TypeScript
import { EditorPassThrough, EditorInitEvent, EditorTextChangeEvent, EditorSelectionChangeEvent, EditorChangeEvent, EditorFocusEvent, EditorBlurEvent } from 'primeng/types/editor';
export * from 'primeng/types/editor';
import * as _angular_core from '@angular/core';
import { TemplateRef } from '@angular/core';
import * as i2 from 'primeng/api';
import { Header } from 'primeng/api';
import { BaseEditableHolder } from 'primeng/baseeditableholder';
import * as i1 from 'primeng/bind';
import { Bind } from 'primeng/bind';
import { CSSProperties } from 'primeng/types/shared';
import { Nullable } from 'primeng/ts-helpers';
import { BaseStyle } from 'primeng/base';
/**
*
* Editor groups a collection of contents in tabs.
*
* [Live Demo](https://www.primeng.org/editor/)
*
* @module editorstyle
*
*/
declare enum EditorClasses {
/**
* Class name of the root element
*/
root = "p-editor",
/**
* Class name of the toolbar element
*/
toolbar = "p-editor-toolbar",
/**
* Class name of the content element
*/
content = "p-editor-content"
}
declare class EditorStyle extends BaseStyle {
name: string;
style: string;
classes: {
root: ({ instance }: {
instance: any;
}) => (string | {
'p-invalid': any;
})[];
toolbar: string;
content: string;
};
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EditorStyle, never>;
static ɵprov: _angular_core.ɵɵInjectableDeclaration<EditorStyle>;
}
interface EditorStyle extends BaseStyle {
}
declare const EDITOR_VALUE_ACCESSOR: any;
/**
* Editor groups a collection of contents in tabs.
* @group Components
* @deprecated Editor will be removed in a future release in favor of PrimeUI PRO Editor.
*/
declare class Editor extends BaseEditableHolder<EditorPassThrough> {
componentName: string;
$pcEditor: Editor | undefined;
bindDirectiveInstance: Bind;
onAfterViewChecked(): void;
/**
* Inline style of the container.
* @group Props
*/
style: _angular_core.InputSignal<CSSProperties>;
/**
* Placeholder text to show when editor is empty.
* @group Props
*/
placeholder: _angular_core.InputSignal<string | undefined>;
/**
* Whitelist of formats to display, see [here](https://quilljs.com/docs/formats/) for available options.
* @group Props
*/
formats: _angular_core.InputSignal<string[] | undefined>;
/**
* Modules configuration of Editor, see [here](https://quilljs.com/docs/modules/) for available options.
* @group Props
*/
modules: _angular_core.InputSignal<object | undefined>;
/**
* DOM Element or a CSS selector for a DOM Element, within which the editor's p elements (i.e. tooltips, etc.) should be confined. Currently, it only considers left and right boundaries.
* @group Props
*/
bounds: _angular_core.InputSignal<string | HTMLElement | undefined>;
/**
* DOM Element or a CSS selector for a DOM Element, specifying which container has the scrollbars (i.e. overflow-y: auto), if is has been changed from the default ql-editor with custom CSS. Necessary to fix scroll jumping bugs when Quill is set to auto grow its height, and another ancestor container is responsible from the scrolling..
* @group Props
*/
scrollingContainer: _angular_core.InputSignal<string | HTMLElement | undefined>;
/**
* Shortcut for debug. Note debug is a static method and will affect other instances of Quill editors on the page. Only warning and error messages are enabled by default.
* @group Props
*/
debug: _angular_core.InputSignal<string | undefined>;
/**
* Whether to instantiate the editor to read-only mode.
* @group Props
*/
readonly: _angular_core.InputSignal<boolean>;
/**
* Callback to invoke when the quill modules are loaded.
* @param {EditorInitEvent} event - custom event.
* @group Emits
*/
onEditorInit: _angular_core.OutputEmitterRef<EditorInitEvent>;
/**
* Callback to invoke when text of editor changes.
* @param {EditorTextChangeEvent} event - custom event.
* @group Emits
*/
onTextChange: _angular_core.OutputEmitterRef<EditorTextChangeEvent>;
/**
* Callback to invoke when selection of the text changes.
* @param {EditorSelectionChangeEvent} event - custom event.
* @group Emits
*/
onSelectionChange: _angular_core.OutputEmitterRef<EditorSelectionChangeEvent>;
/**
* Callback to invoke when editor content changes (combines both text and selection changes).
* @param {EditorChangeEvent} event - custom event.
* @group Emits
*/
onEditorChange: _angular_core.OutputEmitterRef<EditorChangeEvent>;
/**
* Callback to invoke when editor receives focus.
* @param {EditorFocusEvent} event - custom event.
* @group Emits
*/
onFocus: _angular_core.OutputEmitterRef<EditorFocusEvent>;
/**
* Callback to invoke when editor loses focus.
* @param {EditorBlurEvent} event - custom event.
* @group Emits
*/
onBlur: _angular_core.OutputEmitterRef<EditorBlurEvent>;
toolbar: _angular_core.Signal<Header | undefined>;
/**
* Custom item template.
* @group Templates
*/
headerTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
$hasCustomToolbar: _angular_core.Signal<boolean>;
value: Nullable<string>;
delayedCommand: Function | null;
quill: any;
dynamicQuill: any;
private _destroyed;
private get isAttachedQuillEditorToDOM();
private quillElements;
private focusListener;
private blurListener;
_componentStyle: EditorStyle;
constructor();
/**
* @override
*
* @see {@link BaseEditableHolder.writeControlValue}
* Writes the value to the control.
*/
writeControlValue(value: any): void;
getQuill(): any;
private initQuillEditor;
private createQuillEditor;
onDestroy(): void;
private initQuillElements;
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Editor, never>;
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Editor, "p-editor", never, { "style": { "alias": "style"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "formats": { "alias": "formats"; "required": false; "isSignal": true; }; "modules": { "alias": "modules"; "required": false; "isSignal": true; }; "bounds": { "alias": "bounds"; "required": false; "isSignal": true; }; "scrollingContainer": { "alias": "scrollingContainer"; "required": false; "isSignal": true; }; "debug": { "alias": "debug"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, { "onEditorInit": "onInit"; "onTextChange": "onTextChange"; "onSelectionChange": "onSelectionChange"; "onEditorChange": "onEditorChange"; "onFocus": "onFocus"; "onBlur": "onBlur"; }, ["toolbar", "headerTemplate"], ["p-header"], true, [{ directive: typeof i1.Bind; inputs: {}; outputs: {}; }]>;
}
declare class EditorModule {
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EditorModule, never>;
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<EditorModule, never, [typeof Editor, typeof i2.SharedModule], [typeof Editor, typeof i2.SharedModule]>;
static ɵinj: _angular_core.ɵɵInjectorDeclaration<EditorModule>;
}
export { EDITOR_VALUE_ACCESSOR, Editor, EditorClasses, EditorModule, EditorStyle };