tinymce
- Version 7.4.1
- Published
- 8.58 MB
- No dependencies
- GPL-2.0-or-later license
Install
npm i tinymce
yarn add tinymce
pnpm add tinymce
Overview
Web based JavaScript HTML WYSIWYG editor control.
Index
Variables
Classes
Editor
- addCommand()
- addQueryStateHandler()
- addQueryValueHandler()
- addShortcut()
- addVisual()
- annotator
- baseUri
- baseURI
- bindPendingEventDelegates
- bodyElement
- bookmark
- composing
- container
- contentAreaContainer
- contentCSS
- contentDocument
- contentStyles
- contentWindow
- convertURL()
- delegates
- destroy()
- destroyed
- dispatch
- documentBaseURI
- documentBaseUrl
- dom
- editorCommands
- editorContainer
- editorManager
- editorUpload
- eventRoot
- execCommand()
- fire
- focus()
- formatter
- formElement
- formEventDelegate
- getBody()
- getContainer()
- getContent()
- getContentAreaContainer()
- getDoc()
- getElement()
- getParam()
- getWin()
- hasEditableRoot()
- hasEventListeners
- hasFocus()
- hasHiddenInput
- hasPlugin()
- hasVisual
- hidden
- hide()
- id
- iframeElement
- iframeHTML
- initialized
- inline
- insertContent()
- isDirty()
- isHidden()
- isNotDirty
- load()
- loadedCSS
- mode
- model
- nodeChanged()
- notificationManager
- off
- on
- once
- options
- orgDisplay
- orgVisibility
- parser
- plugins
- queryCommandState()
- queryCommandSupported()
- queryCommandValue()
- quirks
- readonly
- remove()
- removed
- render()
- resetContent()
- save()
- schema
- selection
- serializer
- setContent()
- setDirty()
- setEditableRoot()
- setProgressState()
- shortcuts
- show()
- startContent
- suffix
- targetElm
- theme
- toggleNativeEvent
- translate()
- ui
- unbindAllNativeEvents
- undoManager
- uploadImages()
- windowManager
Interfaces
DomParserSettings
- allow_conditional_comments
- allow_html_data_urls
- allow_html_in_named_anchor
- allow_mathml_annotation_encodings
- allow_script_urls
- allow_svg_data_urls
- allow_unsafe_link_target
- blob_cache
- convert_fonts_to_spans
- convert_unsafe_embeds
- document
- fix_list_elements
- font_size_legacy_values
- forced_root_block
- forced_root_block_attrs
- inline_styles
- pad_empty_with_br
- preserve_cdata
- root_name
- sandbox_iframes
- sandbox_iframes_exclusions
- sanitize
- validate
DOMUtils
- add
- addClass
- addStyle
- bind
- boundEvents
- boxModel
- clone
- create
- createFragment
- createHTML
- createRng
- decode
- destroy
- dispatch
- doc
- dumpRng
- encode
- events
- files
- findCommonAncestor
- fire
- get
- getAttrib
- getAttribs
- getContentEditable
- getContentEditableParent
- getNext
- getOuterHTML
- getParent
- getParents
- getPos
- getPrev
- getRect
- getRoot
- getSize
- getStyle
- getViewPort
- hasClass
- hide
- insertAfter
- is
- isBlock
- isChildOf
- isEditable
- isEmpty
- isHidden
- loadCSS
- nodeIndex
- parseStyle
- remove
- removeAllAttribs
- removeClass
- rename
- replace
- root
- run()
- schema
- select
- serializeStyle
- setAttrib
- setAttribs
- setHTML
- setOuterHTML
- setStyle
- setStyles
- settings
- show
- split
- stdMode
- styles
- styleSheetLoader
- toggleClass
- unbind
- uniqueId
- win
EditorOptions
- a11y_advanced_options
- allow_unsafe_link_target
- anchor_bottom
- anchor_top
- automatic_uploads
- block_formats
- body_class
- body_id
- br_newline_selector
- color_cols
- color_cols_background
- color_cols_foreground
- color_default_background
- color_default_foreground
- color_map
- content_css
- contextmenu
- convert_unsafe_embeds
- custom_colors
- default_font_stack
- document_base_url
- draggable_modal
- editable_class
- editable_root
- font_css
- font_family_formats
- font_size_classes
- font_size_formats
- font_size_input_default_unit
- font_size_legacy_values
- font_size_style_values
- forced_root_block
- forced_root_block_attrs
- format_noneditable_selector
- height
- highlight_on_focus
- iframe_attrs
- images_file_types
- images_upload_base_path
- images_upload_credentials
- images_upload_url
- indent_use_margin
- indentation
- init_content_sync
- inline
- inline_boundaries_selector
- language
- language_load
- language_url
- line_height_formats
- menu
- menubar
- model
- newdocument_content
- no_newline_selector
- noneditable_class
- noneditable_regexp
- object_resizing
- pad_empty_with_br
- paste_as_text
- preview_styles
- promotion
- readonly
- removed_menuitems
- sandbox_iframes
- sandbox_iframes_exclusions
- text_patterns
- text_patterns_lookup
- toolbar
- toolbar_groups
- toolbar_location
- toolbar_mode
- toolbar_persist
- toolbar_sticky
- toolbar_sticky_offset
- visual
- visual_anchor_class
- visual_table_class
- width
- xss_sanitization
EditorSelection
- bookmarkManager
- collapse
- controlSelection
- destroy
- dom
- editor
- expand
- getBookmark
- getBoundingClientRect
- getContent
- getEnd
- getNode
- getRng
- getScrollContainer
- getSel
- getSelectedBlocks
- getStart
- isCollapsed
- isEditable
- isForward
- moveToBookmark
- normalize
- placeCaretAt
- scrollIntoView
- select
- selectorChanged
- selectorChangedWithUnbind
- serializer
- setContent
- setCursorLocation
- setNode
- setRng
- win
Schema
- addCustomElements
- addValidChildren
- addValidElements
- children
- elements
- getBlockElements
- getBoolAttrs
- getCustomElements
- getElementRule
- getInvalidStyles
- getMoveCaretBeforeOnEnterElements
- getNonEmptyElements
- getSelfClosingElements
- getSpecialElements
- getTextBlockElements
- getTextInlineElements
- getTransparentElements
- getValidClasses
- getValidStyles
- getVoidElements
- getWhitespaceElements
- isBlock
- isInline
- isValid
- isValidChild
- isWrapper
- setValidElements
- type
TinyMCE
- AddOnManager
- Annotator
- dom
- DOM
- each
- Editor
- EditorCommands
- EditorManager
- EditorObservable
- Env
- explode
- extend
- FakeClipboard
- FocusManager
- Formatter
- geom
- grep
- html
- IconManager
- inArray
- is
- isArray
- makeMap
- map
- ModelManager
- NotificationManager
- PluginManager
- resolve
- Resource
- ScriptLoader
- Shortcuts
- ThemeManager
- toArray
- trim
- UndoManager
- util
- walk
- WindowManager
Type Aliases
Namespaces
Events
- AddUndoEvent
- AfterProgressStateEvent
- BeforeGetContentEvent
- BeforeOpenNotificationEvent
- BeforeSetContentEvent
- ChangeEvent
- EditableRootStateChangeEvent
- EditorEventMap
- EditorManagerEventMap
- ExecCommandEvent
- FormatEvent
- GetContentEvent
- LoadErrorEvent
- NewBlockEvent
- NewTableCellEvent
- NewTableRowEvent
- NodeChangeEvent
- ObjectResizeEvent
- ObjectSelectedEvent
- OpenNotificationEvent
- PastePlainTextToggleEvent
- PastePostProcessEvent
- PastePreProcessEvent
- PlaceholderToggleEvent
- PostProcessEvent
- PreProcessEvent
- ProgressStateEvent
- SaveContentEvent
- ScrollIntoViewEvent
- SetContentEvent
- SetSelectionRangeEvent
- ShowCaretEvent
- SwitchModeEvent
- TableEventData
- TableModifiedEvent
- UndoRedoEvent
- WindowEvent
PublicDialog_d
- AlertBannerSpec
- BarSpec
- BodyComponentSpec
- ButtonSpec
- CheckboxSpec
- CollectionItem
- CollectionSpec
- ColorInputSpec
- ColorPickerSpec
- CustomEditorInit
- CustomEditorInitFn
- CustomEditorSpec
- DialogActionDetails
- DialogChangeDetails
- DialogData
- DialogFooterButtonSpec
- DialogInstanceApi
- DialogSize
- DialogSpec
- DialogTabChangeDetails
- DropZoneSpec
- GridSpec
- HtmlPanelSpec
- IframeSpec
- ImagePreviewSpec
- InputSpec
- LabelSpec
- ListBoxItemSpec
- ListBoxNestedItemSpec
- ListBoxSingleItemSpec
- ListBoxSpec
- PanelSpec
- SelectBoxItemSpec
- SelectBoxSpec
- SizeInputSpec
- SliderSpec
- TableSpec
- TabPanelSpec
- TabSpec
- TextAreaSpec
- TreeDirectorySpec
- TreeItemSpec
- TreeLeafSpec
- TreeSpec
- UrlDialogActionDetails
- UrlDialogFooterButtonSpec
- UrlDialogInstanceApi
- UrlDialogMessage
- UrlDialogSpec
- UrlInputData
- UrlInputSpec
PublicMenu_d
- CardContainerSpec
- CardImageSpec
- CardItemSpec
- CardMenuItemInstanceApi
- CardMenuItemSpec
- CardTextSpec
- ChoiceMenuItemInstanceApi
- ChoiceMenuItemSpec
- ColorSwatchMenuItemSpec
- ContextMenuApi
- ContextMenuContents
- ContextMenuItem
- ContextSubMenu
- FancyMenuItemSpec
- InsertTableMenuItemSpec
- MenuItemInstanceApi
- MenuItemSpec
- NestedMenuItemContents
- NestedMenuItemInstanceApi
- NestedMenuItemSpec
- SeparatorMenuItemSpec
- ToggleMenuItemInstanceApi
- ToggleMenuItemSpec
Ui.Dialog
- AlertBannerSpec
- BarSpec
- BodyComponentSpec
- ButtonSpec
- CheckboxSpec
- CollectionItem
- CollectionSpec
- ColorInputSpec
- ColorPickerSpec
- CustomEditorInit
- CustomEditorInitFn
- CustomEditorSpec
- DialogActionDetails
- DialogChangeDetails
- DialogData
- DialogFooterButtonSpec
- DialogInstanceApi
- DialogSize
- DialogSpec
- DialogTabChangeDetails
- DropZoneSpec
- GridSpec
- HtmlPanelSpec
- IframeSpec
- ImagePreviewSpec
- InputSpec
- LabelSpec
- ListBoxItemSpec
- ListBoxNestedItemSpec
- ListBoxSingleItemSpec
- ListBoxSpec
- PanelSpec
- SelectBoxItemSpec
- SelectBoxSpec
- SizeInputSpec
- SliderSpec
- TableSpec
- TabPanelSpec
- TabSpec
- TextAreaSpec
- TreeDirectorySpec
- TreeItemSpec
- TreeLeafSpec
- TreeSpec
- UrlDialogActionDetails
- UrlDialogFooterButtonSpec
- UrlDialogInstanceApi
- UrlDialogMessage
- UrlDialogSpec
- UrlInputData
- UrlInputSpec
Ui.Menu
- CardContainerSpec
- CardImageSpec
- CardItemSpec
- CardMenuItemInstanceApi
- CardMenuItemSpec
- CardTextSpec
- ChoiceMenuItemInstanceApi
- ChoiceMenuItemSpec
- ColorSwatchMenuItemSpec
- ContextMenuApi
- ContextMenuContents
- ContextMenuItem
- ContextSubMenu
- FancyMenuItemSpec
- InsertTableMenuItemSpec
- MenuItemInstanceApi
- MenuItemSpec
- NestedMenuItemContents
- NestedMenuItemInstanceApi
- NestedMenuItemSpec
- SeparatorMenuItemSpec
- ToggleMenuItemInstanceApi
- ToggleMenuItemSpec
Variables
variable tinymce
const tinymce: TinyMCE;
Classes
class AstNode
class AstNode {}
constructor
constructor(name: string, type: number);
property attributes
attributes?: { name: string; value: string }[] & { map: Record<string, string> };
property firstChild
firstChild?: AstNode;
property lastChild
lastChild?: AstNode;
property name
name: string;
property next
next?: AstNode;
property parent
parent?: AstNode;
property prev
prev?: AstNode;
property raw
raw?: boolean;
property type
type: number;
property value
value?: string;
method append
append: (node: AstNode) => AstNode;
method attr
attr: { (name: string, value: string | null | undefined): AstNode | undefined; (name: Record<string, string>): AstNode; (name: string): string;};
method children
children: () => AstNode[];
method clone
clone: () => AstNode;
method create
static create: (name: string, attrs?: Record<string, string>) => AstNode;
method empty
empty: () => AstNode;
method getAll
getAll: (name: string) => AstNode[];
method insert
insert: (node: AstNode, refNode: AstNode, before?: boolean) => AstNode;
method isEmpty
isEmpty: ( elements: SchemaMap, whitespace?: SchemaMap, predicate?: (node: AstNode) => boolean) => boolean;
method remove
remove: () => AstNode;
method replace
replace: (node: AstNode) => AstNode;
method unwrap
unwrap: () => void;
method walk
walk: (prev?: boolean) => AstNode | null | undefined;
method wrap
wrap: (wrapper: AstNode) => AstNode;
class DomTreeWalker
class DomTreeWalker {}
constructor
constructor(startNode: Node, rootNode: Node);
method current
current: () => Node | null | undefined;
method next
next: (shallow?: boolean) => Node | null | undefined;
method prev
prev: (shallow?: boolean) => Node | null | undefined;
method prev2
prev2: (shallow?: boolean) => Node | null | undefined;
class Editor
class Editor implements EditorObservable {}
constructor
constructor(id: string, options: RawEditorOptions, editorManager: EditorManager);
property annotator
annotator: Annotator;
property baseUri
baseUri: URI;
property baseURI
baseURI: URI;
property bindPendingEventDelegates
bindPendingEventDelegates: (this: Editor) => void;
property bodyElement
bodyElement: HTMLElement;
property bookmark
bookmark: any;
property composing
composing: boolean;
property container
container: HTMLElement;
property contentAreaContainer
contentAreaContainer: HTMLElement;
property contentCSS
contentCSS: string[];
property contentDocument
contentDocument: Document;
property contentStyles
contentStyles: string[];
property contentWindow
contentWindow: Window;
property delegates
delegates: Record<string, EventUtilsCallback<any>>;
property destroyed
destroyed: boolean;
property dispatch
dispatch: <K extends string, U extends MappedEvent<EditorEventMap, K>>( name: K, args?: U, bubble?: boolean) => EditorEvent<U>;
property documentBaseURI
documentBaseURI: URI;
property documentBaseUrl
documentBaseUrl: string;
property dom
dom: DOMUtils;
property editorCommands
editorCommands: EditorCommands;
property editorContainer
editorContainer: HTMLElement;
property editorManager
editorManager: EditorManager;
property editorUpload
editorUpload: EditorUpload;
property eventRoot
eventRoot: Element;
property fire
fire: <K extends string, U extends MappedEvent<EditorEventMap, K>>( name: K, args?: U, bubble?: boolean) => EditorEvent<U>;
property formatter
formatter: Formatter;
property formElement
formElement: HTMLElement;
property formEventDelegate
formEventDelegate: (e: Event) => void;
property hasEventListeners
hasEventListeners: (name: string) => boolean;
property hasHiddenInput
hasHiddenInput: boolean;
property hasVisual
hasVisual: boolean;
property hidden
hidden: boolean;
property id
id: string;
property iframeElement
iframeElement: HTMLIFrameElement;
property iframeHTML
iframeHTML: string;
property initialized
initialized: boolean;
property inline
inline: boolean;
property isNotDirty
isNotDirty: boolean;
property loadedCSS
loadedCSS: Record<string, any>;
property mode
mode: EditorMode;
property model
model: Model;
property notificationManager
notificationManager: NotificationManager;
property off
off: <K extends string>( name?: K, callback?: (event: EditorEvent<MappedEvent<EditorEventMap, K>>) => void) => EventDispatcher<EditorEventMap>;
property on
on: <K extends string>( name: K, callback: (event: EditorEvent<MappedEvent<EditorEventMap, K>>) => void, prepend?: boolean) => EventDispatcher<EditorEventMap>;
property once
once: <K extends string>( name: K, callback: (event: EditorEvent<MappedEvent<EditorEventMap, K>>) => void) => EventDispatcher<EditorEventMap>;
property options
options: Options;
property orgDisplay
orgDisplay: string;
property orgVisibility
orgVisibility: string;
property parser
parser: DomParser;
property plugins
plugins: Record<string, Plugin>;
property quirks
quirks: Quirks;
property readonly
readonly: boolean;
property removed
removed: boolean;
property schema
schema: Schema;
property selection
selection: EditorSelection;
property serializer
serializer: DomSerializer;
property shortcuts
shortcuts: Shortcuts;
property startContent
startContent: string;
property suffix
suffix: string;
property targetElm
targetElm: HTMLElement;
property theme
theme: Theme;
property toggleNativeEvent
toggleNativeEvent: (this: Editor, name: string, state: boolean) => void;
property ui
ui: EditorUi;
property unbindAllNativeEvents
unbindAllNativeEvents: (this: Editor) => void;
property undoManager
undoManager: UndoManager;
property windowManager
windowManager: WindowManager;
method addCommand
addCommand: { <S>(name: string, callback: EditorCommandCallback<S>, scope: S): void; (name: string, callback: EditorCommandCallback<Editor>): void;};
method addQueryStateHandler
addQueryStateHandler: { <S>(name: string, callback: (this: S) => boolean, scope?: S): void; (name: string, callback: (this: Editor) => boolean): void;};
method addQueryValueHandler
addQueryValueHandler: { <S>(name: string, callback: (this: S) => string, scope: S): void; (name: string, callback: (this: Editor) => string): void;};
method addShortcut
addShortcut: ( pattern: string, desc: string, cmdFunc: string | [string, boolean, any] | (() => void), scope?: any) => void;
method addVisual
addVisual: (elm?: HTMLElement) => void;
method convertURL
convertURL: (url: string, name: string, elm?: string | Element) => string;
method destroy
destroy: (automatic?: boolean) => void;
method execCommand
execCommand: ( cmd: string, ui?: boolean, value?: any, args?: ExecCommandArgs) => boolean;
method focus
focus: (skipFocus?: boolean) => void;
method getBody
getBody: () => HTMLElement;
method getContainer
getContainer: () => HTMLElement;
method getContent
getContent: { (args: { format: 'tree' } & Partial<GetContentArgs>): AstNode; (args?: Partial<GetContentArgs>): string;};
method getContentAreaContainer
getContentAreaContainer: () => HTMLElement;
method getDoc
getDoc: () => Document;
method getElement
getElement: () => HTMLElement;
method getParam
getParam: { <K extends keyof BuiltInOptionTypeMap>( name: string, defaultVal: BuiltInOptionTypeMap[K], type: K ): BuiltInOptionTypeMap[K]; <K extends keyof NormalizedEditorOptions>( name: K, defaultVal?: NormalizedEditorOptions[K], type?: keyof BuiltInOptionTypeMap ): NormalizedEditorOptions[K]; <T>(name: string, defaultVal: T, type?: keyof BuiltInOptionTypeMap): T;};
method getWin
getWin: () => Window;
method hasEditableRoot
hasEditableRoot: () => boolean;
method hasFocus
hasFocus: () => boolean;
method hasPlugin
hasPlugin: (name: string, loaded?: boolean) => boolean;
method hide
hide: () => void;
method insertContent
insertContent: (content: string, args?: any) => void;
method isDirty
isDirty: () => boolean;
method isHidden
isHidden: () => boolean;
method load
load: (args?: Partial<SetContentArgs>) => string;
method nodeChanged
nodeChanged: (args?: any) => void;
method queryCommandState
queryCommandState: (cmd: string) => boolean;
method queryCommandSupported
queryCommandSupported: (cmd: string) => boolean;
method queryCommandValue
queryCommandValue: (cmd: string) => string;
method remove
remove: () => void;
method render
render: () => void;
method resetContent
resetContent: (initialContent?: string) => void;
method save
save: (args?: Partial<GetContentArgs>) => string;
method setContent
setContent: { (content: string, args?: Partial<SetContentArgs>): string; (content: AstNode, args?: Partial<SetContentArgs>): AstNode; (content: Content, args?: Partial<SetContentArgs>): Content;};
method setDirty
setDirty: (state: boolean) => void;
method setEditableRoot
setEditableRoot: (state: boolean) => void;
method setProgressState
setProgressState: (state: boolean, time?: number) => void;
method show
show: () => void;
method translate
translate: (text: Untranslated) => TranslatedString;
method uploadImages
uploadImages: () => Promise<UploadResult$1[]>;
class EditorCommands
class EditorCommands {}
constructor
constructor(editor: Editor);
method addCommand
addCommand: { <S>(command: string, callback: EditorCommandCallback<S>, scope: S): void; (command: string, callback: EditorCommandCallback<Editor>): void;};
method addCommands
addCommands: { <K extends keyof Commands>(commandList: Commands[K], type: K): void; (commandList: Record<string, EditorCommandsCallback>): void;};
method addQueryStateHandler
addQueryStateHandler: { <S>(command: string, callback: (this: S) => boolean, scope: S): void; (command: string, callback: (this: Editor) => boolean): void;};
method addQueryValueHandler
addQueryValueHandler: { <S>(command: string, callback: (this: S) => string, scope: S): void; (command: string, callback: (this: Editor) => string): void;};
method execCommand
execCommand: ( command: string, ui?: boolean, value?: any, args?: ExecCommandArgs) => boolean;
method queryCommandState
queryCommandState: (command: string) => boolean;
method queryCommandSupported
queryCommandSupported: (command: string) => boolean;
method queryCommandValue
queryCommandValue: (command: string) => string;
class EventDispatcher
class EventDispatcher<T extends {}> {}
constructor
constructor(settings?: EventDispatcherSettings);
method dispatch
dispatch: <K extends string, U extends MappedEvent<T, K>>( name: K, args?: U) => EditorEvent<U>;
method fire
fire: <K extends string, U extends MappedEvent<T, K>>( name: K, args?: U) => EditorEvent<U>;
method has
has: (name: string) => boolean;
method isNative
static isNative: (name: string) => boolean;
method off
off: <K extends string>( name?: K, callback?: (event: EditorEvent<MappedEvent<T, K>>) => void) => this;
method on
on: <K extends string>( name: K, callback: | false | ((event: EditorEvent<MappedEvent<T, K>>) => void | boolean), prepend?: boolean, extra?: {}) => this;
method once
once: <K extends string>( name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean) => this;
class EventUtils
class EventUtils {}
constructor
constructor();
property domLoaded
domLoaded: boolean;
property Event
static Event: EventUtils;
property events
events: Record<number, Record<string, CallbackList<any>>>;
method bind
bind: { <K extends keyof HTMLElementEventMap>( target: any, name: K, callback: EventUtilsCallback<HTMLElementEventMap[K]>, scope?: any ): EventUtilsCallback<HTMLElementEventMap[K]>; <T = any>( target: any, names: string, callback: EventUtilsCallback<T>, scope?: any ): EventUtilsCallback<T>;};
method cancel
cancel: <T>(e: EventUtilsEvent<T>) => boolean;
method clean
clean: (target: any) => this;
method destroy
destroy: () => void;
method dispatch
dispatch: (target: any, name: string, args?: {}) => this;
method fire
fire: (target: any, name: string, args?: {}) => this;
method unbind
unbind: { <K extends keyof HTMLElementEventMap>( target: any, name: K, callback?: EventUtilsCallback<HTMLElementEventMap[K]> ): this; <T = any>( target: any, names: string, callback?: EventUtilsCallback<T> ): this; (target: any): this;};
class ScriptLoader
class ScriptLoader {}
constructor
constructor(settings?: ScriptLoaderSettings);
property ScriptLoader
static ScriptLoader: ScriptLoader;
method add
add: (url: string) => Promise<void>;
method isDone
isDone: (url: string) => boolean;
method load
load: (url: string) => Promise<void>;
method loadQueue
loadQueue: () => Promise<void>;
method loadScript
loadScript: (url: string) => Promise<void>;
method loadScripts
loadScripts: (scripts: string[]) => Promise<void>;
method markDone
markDone: (url: string) => void;
method remove
remove: (url: string) => void;
class Shortcuts
class Shortcuts {}
constructor
constructor(editor: Editor);
method add
add: ( pattern: string, desc: string | null, cmdFunc: CommandFunc, scope?: any) => boolean;
method remove
remove: (pattern: string) => boolean;
class URI
class URI {}
constructor
constructor(url: string, settings?: URISettings);
property anchor
anchor: string;
property authority
authority: string;
property directory
directory: string;
property file
file: string;
property host
host: string;
property password
password: string;
property path
path: string;
property port
port: string;
property protocol
protocol: string;
property query
query: string;
property relative
relative: string;
property settings
settings: URISettings;
property source
source: string;
property user
user: string;
property userInfo
userInfo: string;
method getDocumentBaseUrl
static getDocumentBaseUrl: (loc: { protocol: string; host?: string; href?: string; pathname?: string;}) => string;
method getURI
getURI: (noProtoHost?: boolean) => string;
method isDomSafe
static isDomSafe: ( uri: string, context?: string, options?: SafeUriOptions) => boolean;
method isSameOrigin
isSameOrigin: (uri: URI) => boolean;
method parseDataUri
static parseDataUri: (uri: string) => { type: string | undefined; data: string };
method setPath
setPath: (path: string) => void;
method toAbsolute
toAbsolute: (uri: string, noHost?: boolean) => string;
method toAbsPath
toAbsPath: (base: string, path: string) => string;
method toRelative
toRelative: (uri: string) => string;
method toRelPath
toRelPath: (base: string, path: string) => string;
Interfaces
interface AddOnManager
interface AddOnManager<T> {}
property add
add: (id: string, addOn: AddOnConstructor<T>) => AddOnConstructor<T>;
property createUrl
createUrl: (baseUrl: UrlObject, dep: string | UrlObject) => UrlObject;
property get
get: (name: string) => AddOnConstructor<T> | undefined;
property items
items: AddOnConstructor<T>[];
property load
load: (name: string, addOnUrl: string | UrlObject) => Promise<void>;
property lookup
lookup: Record< string, { instance: AddOnConstructor<T>; }>;
property remove
remove: (name: string) => void;
property requireLangPack
requireLangPack: (name: string, languages?: string) => void;
property urls
urls: Record<string, string>;
property waitFor
waitFor: (name: string, state?: WaitState) => Promise<void>;
interface Annotator
interface Annotator {}
property annotate
annotate: (name: string, data: DecoratorData) => void;
property annotationChanged
annotationChanged: (name: string, f: AnnotationListenerApi) => void;
property getAll
getAll: (name: string) => Record<string, Element[]>;
property register
register: (name: string, settings: AnnotatorSettings) => void;
property remove
remove: (name: string) => void;
property removeAll
removeAll: (name: string) => void;
interface BookmarkManager
interface BookmarkManager {}
property getBookmark
getBookmark: (type?: number, normalized?: boolean) => Bookmark;
property moveToBookmark
moveToBookmark: (bookmark: Bookmark) => void;
interface ControlSelection
interface ControlSelection {}
property destroy
destroy: () => void;
property hideResizeRect
hideResizeRect: () => void;
property isResizable
isResizable: (elm: Element) => boolean;
property showResizeRect
showResizeRect: (elm: HTMLElement) => void;
property updateResizeRect
updateResizeRect: (evt: EditorEvent<any>) => void;
interface Delay
interface Delay {}
property setEditorInterval
setEditorInterval: ( editor: Editor, callback: () => void, time?: number) => number;
property setEditorTimeout
setEditorTimeout: ( editor: Editor, callback: () => void, time?: number) => number;
interface DomParser
interface DomParser {}
property addAttributeFilter
addAttributeFilter: (name: string, callback: ParserFilterCallback) => void;
property addNodeFilter
addNodeFilter: (name: string, callback: ParserFilterCallback) => void;
property getAttributeFilters
getAttributeFilters: () => ParserFilter[];
property getNodeFilters
getNodeFilters: () => ParserFilter[];
property parse
parse: (html: string, args?: ParserArgs) => AstNode;
property removeAttributeFilter
removeAttributeFilter: (name: string, callback?: ParserFilterCallback) => void;
property removeNodeFilter
removeNodeFilter: (name: string, callback?: ParserFilterCallback) => void;
property schema
schema: Schema;
interface DomParserSettings
interface DomParserSettings {}
property allow_conditional_comments
allow_conditional_comments?: boolean;
property allow_html_data_urls
allow_html_data_urls?: boolean;
property allow_html_in_named_anchor
allow_html_in_named_anchor?: boolean;
property allow_mathml_annotation_encodings
allow_mathml_annotation_encodings?: string[];
property allow_script_urls
allow_script_urls?: boolean;
property allow_svg_data_urls
allow_svg_data_urls?: boolean;
property allow_unsafe_link_target
allow_unsafe_link_target?: boolean;
property blob_cache
blob_cache?: BlobCache;
property convert_fonts_to_spans
convert_fonts_to_spans?: boolean;
property convert_unsafe_embeds
convert_unsafe_embeds?: boolean;
property document
document?: Document;
property fix_list_elements
fix_list_elements?: boolean;
property font_size_legacy_values
font_size_legacy_values?: string;
property forced_root_block
forced_root_block?: boolean | string;
property forced_root_block_attrs
forced_root_block_attrs?: Record<string, string>;
property inline_styles
inline_styles?: boolean;
property pad_empty_with_br
pad_empty_with_br?: boolean;
property preserve_cdata
preserve_cdata?: boolean;
property root_name
root_name?: string;
property sandbox_iframes
sandbox_iframes?: boolean;
property sandbox_iframes_exclusions
sandbox_iframes_exclusions?: string[];
property sanitize
sanitize?: boolean;
property validate
validate?: boolean;
interface DomSerializer
interface DomSerializer extends DomSerializerImpl {}
interface DomSerializerSettings
interface DomSerializerSettings extends DomParserSettings, WriterSettings, SchemaSettings, HtmlSerializerSettings {}
property remove_trailing_brs
remove_trailing_brs?: boolean;
property url_converter
url_converter?: URLConverter;
property url_converter_scope
url_converter_scope?: {};
interface DOMUtils
interface DOMUtils {}
property add
add: ( parentElm: RunArguments, name: string | Element, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null, create?: boolean) => HTMLElement;
property addClass
addClass: (elm: RunArguments<Element>, cls: string) => void;
property addStyle
addStyle: (cssText: string) => void;
property bind
bind: { <K extends string>( target: Target, name: K, func: Callback<K>, scope?: any ): Callback<K>; <K extends string>( target: Target[], name: K, func: Callback<K>, scope?: any ): Callback<K>[];};
property boundEvents
boundEvents: BoundEvent[];
property boxModel
boxModel: boolean;
property clone
clone: (node: Node, deep: boolean) => Node;
property create
create: { <K extends keyof HTMLElementTagNameMap>( name: K, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null ): HTMLElementTagNameMap[K]; ( name: string, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null ): HTMLElement;};
property createFragment
createFragment: (html?: string) => DocumentFragment;
property createHTML
createHTML: ( name: string, attrs?: Record<string, string | null>, html?: string) => string;
property createRng
createRng: () => Range;
property decode
decode: (text: string) => string;
property destroy
destroy: () => void;
property dispatch
dispatch: (target: Node | Window, name: string, evt?: {}) => EventUtils;
property doc
doc: Document;
property dumpRng
dumpRng: (r: Range) => string;
property encode
encode: (text: string) => string;
property events
events: EventUtils;
property files
files: Record<string, boolean>;
property findCommonAncestor
findCommonAncestor: (a: Node, b: Node) => Node | null;
property fire
fire: (target: Node | Window, name: string, evt?: {}) => EventUtils;
property get
get: { <T extends Node>(elm: T): T; (elm: string): HTMLElement | null;};
property getAttrib
getAttrib: ( elm: string | Element | null, name: string, defaultVal?: string) => string;
property getAttribs
getAttribs: (elm: string | Element) => NamedNodeMap | Attr[];
property getContentEditable
getContentEditable: (node: Node) => string | null;
property getContentEditableParent
getContentEditableParent: (node: Node) => string | null;
property getNext
getNext: ( node: Node | null, selector: string | ((node: Node) => boolean)) => Node | null;
property getOuterHTML
getOuterHTML: (elm: string | Node) => string;
property getParent
getParent: { <K extends keyof HTMLElementTagNameMap>( node: string | Node | null, selector: K, root?: Node ): HTMLElementTagNameMap[K] | null; <T extends Element>( node: string | Node | null, selector: string | ((node: Node) => node is T), root?: Node ): T | null; ( node: string | Node | null, selector?: string | ((node: Node) => boolean | void), root?: Node ): Node | null;};
property getParents
getParents: { <K extends keyof HTMLElementTagNameMap>( elm: string | HTMLElementTagNameMap[K] | null, selector: K, root?: Node, collect?: boolean ): Array<HTMLElementTagNameMap[K]>; <T extends Element>( node: string | Node | null, selector: string | ((node: Node) => node is T), root?: Node, collect?: boolean ): T[]; ( elm: string | Node | null, selector?: string | ((node: Node) => boolean | void), root?: Node, collect?: boolean ): Node[];};
property getPos
getPos: ( elm: string | Element, rootElm?: Node) => { x: number; y: number;};
property getPrev
getPrev: ( node: Node | null, selector: string | ((node: Node) => boolean)) => Node | null;
property getRect
getRect: (elm: string | HTMLElement) => GeomRect;
property getRoot
getRoot: () => HTMLElement;
property getSize
getSize: (elm: string | HTMLElement) => { w: number; h: number;};
property getStyle
getStyle: { (elm: Element, name: string, computed: true): string; (elm: string | Element | null, name: string, computed?: boolean): | string | undefined;};
property getViewPort
getViewPort: (argWin?: Window) => GeomRect;
property hasClass
hasClass: (elm: string | Element, cls: string) => boolean;
property hide
hide: (elm: string | Node | Node[]) => void;
property insertAfter
insertAfter: { <T extends Node>(node: T | T[], reference: string | Node): T; <T extends Node>(node: RunArguments<T>, reference: string | Node): RunResult< typeof node, T >;};
property is
is: { <T extends Element>(elm: Node | Node[] | null, selector: string): elm is T; (elm: Node | Node[] | null, selector: string): boolean;};
property isBlock
isBlock: { (node: Node | null): node is HTMLElement; (node: string): boolean;};
property isChildOf
isChildOf: (node: Node, parent: Node) => boolean;
property isEditable
isEditable: (node: Node | null | undefined) => boolean;
property isEmpty
isEmpty: ( node: Node, elements?: Record<string, any>, options?: IsEmptyOptions) => boolean;
property isHidden
isHidden: (elm: string | Node) => boolean;
property loadCSS
loadCSS: (url: string) => void;
property nodeIndex
nodeIndex: (node: Node, normalized?: boolean) => number;
property parseStyle
parseStyle: (cssText: string) => Record<string, string>;
property remove
remove: { <T extends Node>( node: T | T[], keepChildren?: boolean ): typeof node extends Array<any> ? T[] : T; <T extends Node>(node: string, keepChildren?: boolean): T | false;};
property removeAllAttribs
removeAllAttribs: (e: RunArguments<Element>) => void;
property removeClass
removeClass: (elm: RunArguments<Element>, cls: string) => void;
property rename
rename: { <K extends keyof HTMLElementTagNameMap>( elm: Element, name: K ): HTMLElementTagNameMap[K]; (elm: Element, name: string): Element;};
property replace
replace: { <T extends Node>(newElm: Node, oldElm: T | T[], keepChildren?: boolean): T; <T extends Node>( newElm: Node, oldElm: RunArguments<T>, keepChildren?: boolean ): false | T;};
property root
root: Node | null;
property schema
schema: Schema;
property select
select: { <K extends keyof HTMLElementTagNameMap>( selector: K, scope?: string | Node ): Array<HTMLElementTagNameMap[K]>; <T extends HTMLElement = HTMLElement>( selector: string, scope?: string | Node ): T[];};
property serializeStyle
serializeStyle: (stylesArg: StyleMap, name?: string) => string;
property setAttrib
setAttrib: ( elm: RunArguments<Element>, name: string, value: string | boolean | number | null) => void;
property setAttribs
setAttribs: ( elm: RunArguments<Element>, attrs: Record<string, string | boolean | number | null>) => void;
property setHTML
setHTML: (elm: RunArguments<Element>, html: string) => void;
property setOuterHTML
setOuterHTML: (elm: string | Node | Node[], html: string) => void;
property setStyle
setStyle: ( elm: string | Element | Element[], name: string, value: string | number | null) => void;
property setStyles
setStyles: (elm: string | Element | Element[], stylesArg: StyleMap) => void;
property settings
settings: Partial<DOMUtilsSettings>;
property show
show: (elm: string | Node | Node[]) => void;
property split
split: { <T extends Node>(parentElm: Node, splitElm: Node, replacementElm: T): | T | undefined; <T extends Node>(parentElm: Node, splitElm: T): T | undefined;};
property stdMode
stdMode: boolean;
property styles
styles: Styles;
property styleSheetLoader
styleSheetLoader: StyleSheetLoader;
property toggleClass
toggleClass: (elm: RunArguments<Element>, cls: string, state?: boolean) => void;
property unbind
unbind: { <K extends string>( target: Target, name?: K, func?: EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>> ): EventUtils; <K extends string>( target: Target[], name?: K, func?: EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>> ): EventUtils[];};
property uniqueId
uniqueId: (prefix?: string) => string;
property win
win: Window;
method run
run: { <R, T extends Node>( this: DOMUtils, elm: T | T[], func: (node: T) => R, scope?: any ): T | T[] extends any[] ? R[] : R; <R, T extends Node>( this: DOMUtils, elm: RunArguments<T>, func: (node: T) => R, scope?: any ): false | R | RunResult<T, R> | R[];};
interface EditorManager
interface EditorManager extends Observable<EditorManagerEventMap> {}
property activeEditor
activeEditor: Editor | null;
property addI18n
addI18n: (code: string, item: Record<string, string>) => void;
property baseURI
baseURI: URI;
property baseURL
baseURL: string;
property defaultOptions
defaultOptions: RawEditorOptions;
property documentBaseURL
documentBaseURL: string;
property focusedEditor
focusedEditor: Editor | null;
property i18n
i18n: I18n;
property majorVersion
majorVersion: string;
property minorVersion
minorVersion: string;
property releaseDate
releaseDate: string;
property suffix
suffix: string;
property translate
translate: (text: Untranslated) => TranslatedString;
property triggerSave
triggerSave: () => void;
method add
add: (this: EditorManager, editor: Editor) => Editor;
method createEditor
createEditor: ( this: EditorManager, id: string, options: RawEditorOptions) => Editor;
method execCommand
execCommand: ( this: EditorManager, cmd: string, ui: boolean, value: any) => boolean;
method get
get: { (this: EditorManager): Editor[]; (this: EditorManager, id: string | number): Editor;};
method init
init: (this: EditorManager, options: RawEditorOptions) => Promise<Editor[]>;
method overrideDefaults
overrideDefaults: ( this: EditorManager, defaultOptions: Partial<RawEditorOptions>) => void;
method remove
remove: { (this: EditorManager): void; (this: EditorManager, selector: string): void; (this: EditorManager, editor: Editor): Editor;};
method setActive
setActive: (this: EditorManager, editor: Editor) => void;
method setup
setup: (this: EditorManager) => void;
interface EditorModeApi
interface EditorModeApi {}
property activate
activate: () => void;
property deactivate
deactivate: () => void;
property editorReadOnly
editorReadOnly: boolean;
interface EditorObservable
interface EditorObservable extends Observable<EditorEventMap> {}
method bindPendingEventDelegates
bindPendingEventDelegates: (this: Editor) => void;
method toggleNativeEvent
toggleNativeEvent: (this: Editor, name: string, state: boolean) => void;
method unbindAllNativeEvents
unbindAllNativeEvents: (this: Editor) => void;
interface EditorOptions
interface EditorOptions extends NormalizedEditorOptions {}
property a11y_advanced_options
a11y_advanced_options: boolean;
property allow_unsafe_link_target
allow_unsafe_link_target: boolean;
property anchor_bottom
anchor_bottom: string;
property anchor_top
anchor_top: string;
property automatic_uploads
automatic_uploads: boolean;
property block_formats
block_formats: string;
property body_class
body_class: string;
property body_id
body_id: string;
property br_newline_selector
br_newline_selector: string;
property color_cols
color_cols: number;
property color_cols_background
color_cols_background: number;
property color_cols_foreground
color_cols_foreground: number;
property color_default_background
color_default_background: string;
property color_default_foreground
color_default_foreground: string;
property color_map
color_map: string[];
property content_css
content_css: string[];
property contextmenu
contextmenu: string[];
property convert_unsafe_embeds
convert_unsafe_embeds: boolean;
property custom_colors
custom_colors: boolean;
property default_font_stack
default_font_stack: string[];
property document_base_url
document_base_url: string;
property draggable_modal
draggable_modal: boolean;
property editable_class
editable_class: string;
property editable_root
editable_root: boolean;
property font_css
font_css: string[];
property font_family_formats
font_family_formats: string;
property font_size_classes
font_size_classes: string;
property font_size_formats
font_size_formats: string;
property font_size_input_default_unit
font_size_input_default_unit: string;
property font_size_legacy_values
font_size_legacy_values: string;
property font_size_style_values
font_size_style_values: string;
property forced_root_block
forced_root_block: string;
property forced_root_block_attrs
forced_root_block_attrs: Record<string, string>;
property format_noneditable_selector
format_noneditable_selector: string;
property height
height: number | string;
property highlight_on_focus
highlight_on_focus: boolean;
property iframe_attrs
iframe_attrs: Record<string, string>;
property images_file_types
images_file_types: string;
property images_upload_base_path
images_upload_base_path: string;
property images_upload_credentials
images_upload_credentials: boolean;
property images_upload_url
images_upload_url: string;
property indent_use_margin
indent_use_margin: boolean;
property indentation
indentation: string;
property init_content_sync
init_content_sync: boolean;
property inline
inline: boolean;
property inline_boundaries_selector
inline_boundaries_selector: string;
property language
language: string;
property language_load
language_load: boolean;
property language_url
language_url: string;
property line_height_formats
line_height_formats: string;
property menu
menu: Record< string, { title: string; items: string; }>;
property menubar
menubar: boolean | string;
property model
model: string;
property newdocument_content
newdocument_content: string;
property no_newline_selector
no_newline_selector: string;
property noneditable_class
noneditable_class: string;
property noneditable_regexp
noneditable_regexp: RegExp[];
property object_resizing
object_resizing: string;
property pad_empty_with_br
pad_empty_with_br: boolean;
property paste_as_text
paste_as_text: boolean;
property preview_styles
preview_styles: string;
property promotion
promotion: boolean;
property readonly
readonly: boolean;
property removed_menuitems
removed_menuitems: string;
property sandbox_iframes
sandbox_iframes: boolean;
property sandbox_iframes_exclusions
sandbox_iframes_exclusions: string[];
property text_patterns
text_patterns: Pattern[];
property text_patterns_lookup
text_patterns_lookup: DynamicPatternsLookup;
property toolbar
toolbar: boolean | string | string[] | Array<ToolbarGroup>;
property toolbar_groups
toolbar_groups: Record<string, GroupToolbarButtonSpec>;
property toolbar_location
toolbar_location: ToolbarLocation;
property toolbar_mode
toolbar_mode: ToolbarMode;
property toolbar_persist
toolbar_persist: boolean;
property toolbar_sticky
toolbar_sticky: boolean;
property toolbar_sticky_offset
toolbar_sticky_offset: number;
property visual
visual: boolean;
property visual_anchor_class
visual_anchor_class: string;
property visual_table_class
visual_table_class: string;
property width
width: number | string;
property xss_sanitization
xss_sanitization: boolean;
interface EditorSelection
interface EditorSelection {}
property bookmarkManager
bookmarkManager: BookmarkManager;
property collapse
collapse: (toStart?: boolean) => void;
property controlSelection
controlSelection: ControlSelection;
property destroy
destroy: () => void;
property dom
dom: DOMUtils;
property editor
editor: Editor;
property expand
expand: (options?: { type: 'word' }) => void;
property getBookmark
getBookmark: (type?: number, normalized?: boolean) => Bookmark;
property getBoundingClientRect
getBoundingClientRect: () => ClientRect | DOMRect;
property getContent
getContent: { ( args: { format: 'tree'; } & Partial<GetSelectionContentArgs> ): AstNode; (args?: Partial<GetSelectionContentArgs>): string;};
property getEnd
getEnd: (real?: boolean) => Element;
property getNode
getNode: () => HTMLElement;
property getRng
getRng: () => Range;
property getScrollContainer
getScrollContainer: () => HTMLElement | undefined;
property getSel
getSel: () => Selection | null;
property getSelectedBlocks
getSelectedBlocks: (startElm?: Element, endElm?: Element) => Element[];
property getStart
getStart: (real?: boolean) => Element;
property isCollapsed
isCollapsed: () => boolean;
property isEditable
isEditable: () => boolean;
property isForward
isForward: () => boolean;
property moveToBookmark
moveToBookmark: (bookmark: Bookmark) => void;
property normalize
normalize: () => Range;
property placeCaretAt
placeCaretAt: (clientX: number, clientY: number) => void;
property scrollIntoView
scrollIntoView: (elm?: HTMLElement, alignToTop?: boolean) => void;
property select
select: (node: Node, content?: boolean) => Node;
property selectorChanged
selectorChanged: ( selector: string, callback: ( active: boolean, args: { node: Node; selector: String; parents: Node[]; } ) => void) => EditorSelection;
property selectorChangedWithUnbind
selectorChangedWithUnbind: ( selector: string, callback: ( active: boolean, args: { node: Node; selector: String; parents: Node[]; } ) => void) => { unbind: () => void;};
property serializer
serializer: DomSerializer;
property setContent
setContent: (content: string, args?: Partial<SetSelectionContentArgs>) => void;
property setCursorLocation
setCursorLocation: { (node: Node, offset: number): void; (): void;};
property setNode
setNode: (elm: Element) => Element;
property setRng
setRng: (rng: Range, forward?: boolean) => void;
property win
win: Window;
interface Entities
interface Entities {}
property decode
decode: (text: string) => string;
property encodeAllRaw
encodeAllRaw: (text: string) => string;
property encodeNamed
encodeNamed: (text: string, attr?: boolean, entities?: EntitiesMap) => string;
property encodeNumeric
encodeNumeric: (text: string, attr?: boolean) => string;
property encodeRaw
encodeRaw: (text: string, attr?: boolean) => string;
property getEncodeFunc
getEncodeFunc: ( name: string, entities?: string) =>