MCPcopy Index your code

hub / github.com/JiHong88/suneditor / functions

Functions1,891 in github.com/JiHong88/suneditor

↓ 2,058 callersMethodget
* @description Get state value (supports underscore notation) * @template {keyof StoreState} K * @param {K} key * @returns {StoreState[K]}
src/core/kernel/store.js:112
↓ 692 callersMethodset
* @description Set state value and notify subscribers * @template {keyof StoreState} K * @param {K} key * @param {StoreState[K]} value - Value t
src/core/kernel/store.js:122
↓ 537 callersMethodsetRange
* @description Set current editor's range object and return. * @param {Node|Range} startCon Range object or The `startContainer` property of the sel
src/core/logic/dom/selection.js:132
↓ 453 callersMethodtest
* @description Returns `false` if char count is greater than "frameOptions.get('charCounter_max')" when "inputText" is added to the current editor.
src/core/logic/dom/char.js:143
↓ 362 callersMethodget
* @description Gets the current content * @param {Object} [options] Options * @param {boolean} [options.withFrame=false] Gets the current content
src/core/logic/dom/html.js:1106
↓ 311 callersMethodrun
* @description Run plugin calls and basic commands. * @param {string} command Command string * @param {string} type Display type string (`command`
src/core/logic/shell/commandDispatcher.js:83
↓ 299 callersMethodopen
()
test/setup.js:25
↓ 262 callersMethodget
* @description Gets the file component and that plugin name * - return: {target, component, pluginName} | `null` * @param {Node} element Target el
src/core/logic/shell/component.js:236
↓ 209 callersFunctionwait
(ms = 50)
test/integration/eventOrchestrator.spec.js:8
↓ 201 callersMethodreplace
* @description Replace the current match (headless API). * @param {string} replaceText Replacement text
src/core/logic/panel/finder.js:233
↓ 187 callersMethodcall
* @description Call API * @param {ApiManagerParams} params * @example * // POST with FormData and callbacks * apiManager.call({ * method:
src/modules/manager/ApiManager.js:69
↓ 174 callersMethodaddEvent
* @description Register for an event. * - Only events registered with this method are unregistered or re-registered when methods such as 'setOptions
src/core/config/eventManager.js:68
↓ 164 callersFunctioncreateMockElement
(id = 'test')
test/unit/modules/Controller.spec.js:51
↓ 155 callersFunctioncreateTestEditor
(customOptions = {})
test/__mocks__/editorIntegration.js:142
↓ 152 callersFunctionwaitForEditorReady
(editor, timeout = 15000)
test/__mocks__/editorIntegration.js:210
↓ 145 callersFunctiondestroyTestEditor
(editor)
test/__mocks__/editorIntegration.js:251
↓ 135 callersMethodforEach
(callbackfn)
src/core/config/optionProvider.js:409
↓ 134 callersMethodaction
* @override * @type {PluginDropdown['action']}
src/plugins/dropdown/hr.js:98
↓ 132 callersMethodhas
* @template {keyof ConfigAllBaseOptions} K * @param {K} k * @returns {boolean}
src/core/config/optionProvider.js:380
↓ 120 callersMethodinit
* @hook Editor.Core * @type {SunEditor.Hook.Core.Init}
src/plugins/dropdown/align.js:128
↓ 120 callersMethodisLine
* @description It is judged whether it is the `line` element. * - (P, DIV, H[1-6], PRE, LI | class=`__se__format__line_xxx`) * - `line` element al
src/core/logic/dom/format.js:811
↓ 119 callersMethodsplit
* @template {HTMLElement} T * @description Split all tags based on `baseNode` * @param {Node} baseNode Element or text node on which to base * @
src/core/logic/dom/nodeTransform.js:38
↓ 118 callersMethodcodeView
* @description Changes to code view or wysiwyg view * @param {boolean} [value] `true`/`false`, If `undefined` toggle the `codeView` mode.
src/core/logic/panel/viewer.js:68
↓ 115 callersFunctionsafeRemove
* Helper: safely remove element from DOM
test/integration/offset.vmargin.spec.js:76
↓ 111 callersMethodclose
* @description Close a modal plugin * - The plugin's `init` and `modalOff` method is called.
src/modules/contract/Modal.js:189
↓ 109 callersMethodon
* @override * @type {PluginDropdown['on']}
src/plugins/dropdown/list.js:71
↓ 107 callersMethodfullScreen
* @description Changes to full screen or default screen * @param {boolean} [value] `true`/`false`, If `undefined` toggle the `fullScreen` mode.
src/core/logic/panel/viewer.js:276
↓ 95 callersMethodis
* @description It is judged whether it is the component[`img`, `iframe`, `video`, `audio`, `table`] cover(class=`"se-component"`) and `table`, `hr`
src/modules/contract/Figure.js:376
↓ 91 callersMethodcreate
* @description Creates or updates an `audio` component within the editor. * - If `isUpdate` is `true`, updates the existing element's `src`. * - O
src/plugins/modal/audio.js:393
↓ 91 callersMethodsetAbsPosition
* @description Sets the absolute position of an element * @param {HTMLElement} element Element to position * @param {HTMLElement} target Target el
src/core/logic/dom/offset.js:466
↓ 90 callersMethodset
* @description Sets the HTML string to the editor content * @param {string} html HTML string * @param {Object} [options] Options * @param {numbe
src/core/logic/dom/html.js:1175
↓ 88 callersMethodfocus
* @description Focus to wysiwyg area * @param {*} [rootKey] Root frame key.
src/core/logic/shell/focusManager.js:33
↓ 87 callersMethodactive
()
test/unit/core/logic/shell/pluginManager.spec.js:1659
↓ 86 callersMethodremove
* @description Delete the selected range. * @returns {{container: Node, offset: number, commonCon?: ?Node, prevContainer?: ?Node}} * - `container`
src/core/logic/dom/html.js:809
↓ 82 callersFunctioncreateDeps
* Creates a properly configured mock $ (deps bag) for ModalAnchorEditor.
test/unit/modules/ModalAnchorEditor.spec.js:45
↓ 82 callersFunctioncreateModalForm
* Creates a modal form element with .se-anchor-editor container.
test/unit/modules/ModalAnchorEditor.spec.js:87
↓ 81 callersMethodgetRange
* @description Get current editor's range object * @returns {Range}
src/core/logic/dom/selection.js:83
↓ 78 callersMethodreadOnly
* @description Switch to or off `ReadOnly` mode. * @param {boolean} value `readOnly` boolean value. * @param {string} [rootKey] Root key
src/core/logic/shell/ui.js:309
↓ 76 callersMethodcontrollerAction
* @abstract * Executes the method that is called when a button is clicked in the `controller`. * @param {HTMLButtonElement} target Action button e
types/interfaces/contracts.d.ts:61
↓ 75 callersMethodget
* @description Get the current color information. * @returns {HueSliderColor} color information
src/modules/contract/HueSlider.js:169
↓ 74 callersFunctioncreateKernelAndProduct
* Helper: create a minimal kernel + product pair for constructing PluginManager.
test/unit/core/logic/shell/pluginManager.spec.js:25
↓ 74 callersMethodfilter
* @description Filters an HTML string based on allowed and disallowed tags, with optional custom validation. * - Removes blacklisted tags and keeps
src/core/logic/dom/html.js:196
↓ 72 callersMethodcomponent
* @param {HTMLElement} node - The node to check. * @returns {HTMLElement|null} Returns a node if the node is a valid component.
src/plugins/dropdown/hr.js:27
↓ 72 callersFunctioncreateMockEditor
(customOptions = {})
test/__mocks__/editorMock.js:539
↓ 71 callersMethodis
* @description Determines if the specified node is a block component (e.g., img, iframe, video, audio, table) with the class `se-component` * - or a
src/core/logic/shell/component.js:415
↓ 70 callersMethodcomponentSelect
* @abstract * Executes the method that is called when a component of a plugin is selected. * @param {HTMLElement} target - Target component elemen
types/interfaces/contracts.d.ts:155
↓ 69 callersMethodgetLine
* @description If a parent node that contains an argument node finds a format node (`format.isLine`), it returns that node. * @param {Node} node Ref
src/core/logic/dom/format.js:101
↓ 67 callersFunctioncreateTarget
()
test/unit/modules/Controller.spec.js:63
↓ 65 callersMethodclean
* @description Cleans and compresses HTML code to suit the editor format. * @param {string} html HTML string to clean and compress * @param {Objec
src/core/logic/dom/html.js:246
↓ 65 callersFunctioncreateControllerElement
* Helper: create a positioned element with arrow child
test/integration/offset.vmargin.spec.js:43
↓ 62 callersMethodgetGlobal
* @description Returns the position of the argument relative to the global document. * This is a refactored version using getBoundingClientRect for
src/core/logic/dom/offset.js:167
↓ 62 callersMethodkeys
()
src/core/config/optionProvider.js:403
↓ 61 callersMethodsetDir
* @hook Editor.Core * @type {SunEditor.Hook.Core.SetDir}
src/plugins/dropdown/align.js:109
↓ 60 callersFunctioncreateElement
(tag, className = '', id = '')
test/unit/core/section/documentType.spec.js:13
↓ 60 callersMethodsetState
* @template {keyof import('./shared/table.constants').TableState} K * @param {K} key * @param {import('./shared/table.constants').TableState[K]} v
src/plugins/dropdown/table/index.js:152
↓ 58 callersFunctionmakeInst
Creates a minimal `inst` argument for the ApiManager constructor.
test/unit/modules/ApiManager.spec.js:45
↓ 54 callersMethodsubmitFile
* @description Create an `audio` component using the provided files. * @param {FileList|File[]} fileList File object list * @returns {Promise<bool
src/plugins/modal/audio.js:284
↓ 52 callersMethodapply
* @description Adds, updates, or deletes style nodes from selected text (a, span, strong, etc.). * - 1. If `styleNode` is provided, a node with the
src/core/logic/dom/inline.js:72
↓ 49 callersMethodisElement
* @param {*} obj * @returns {obj is Element}
src/core/config/instanceCheck.js:28
↓ 48 callersMethodisBlock
* @description It is judged whether it is the `block` element. * - (BLOCKQUOTE, OL, UL, FIGCAPTION, TABLE, THEAD, TBODY, TR, TH, TD | class=`__se__f
src/core/logic/dom/format.js:856
↓ 47 callersMethodremoveGlobalEvent
* @description Remove events from document. * - When created as an Iframe, the event of the document inside the Iframe is also removed. * @param {
src/core/config/eventManager.js:144
↓ 46 callersFunctionwaitForDebounce
* Helper to wait for the debounced onInput to execute.
test/integration/autocomplete.spec.js:38
↓ 44 callersMethodgetLength
* @description Get the [content]'s number of characters or binary data size. (frameOptions.get('charCounter_type')) * - If [content] is `undefined`,
src/core/logic/dom/char.js:54
↓ 43 callersMethodaddGlobalEvent
* @description Add an event to document. * - When created as an Iframe, the same event is added to the document in the Iframe. * @param {string} t
src/core/config/eventManager.js:124
↓ 43 callersMethodget
* @description Get window selection obejct * @returns {Selection}
src/core/logic/dom/selection.js:52
↓ 43 callersMethodgetNode
* @description Get current select node * @returns {HTMLElement|Text} * @example * const node = editor.$.selection.getNode(); * const line = ed
src/core/logic/dom/selection.js:259
↓ 42 callersMethoddropdownOff
* @description Closes the currently open dropdown menu.
src/core/logic/panel/menu.js:145
↓ 42 callersMethodget
* @template {keyof ConfigAllBaseOptions} K * @param {K} k * @returns {ConfigAllBaseOptions[K]}
src/core/config/optionProvider.js:364
↓ 42 callersMethodselect
* @description The component(media, file component, table, etc) is selected and the resizing module is called. * @param {Node} element Target elemen
src/core/logic/shell/component.js:297
↓ 41 callersFunctiongetGlobalEventHandlers
* Extract global event handlers bound via addGlobalEvent
test/unit/modules/Controller.spec.js:86
↓ 40 callersMethodalertOpen
* @description Open the alert panel * @param {string} text alert message * @param {""|"error"|"success"} type alert type
src/core/logic/shell/ui.js:420
↓ 39 callersMethoddisable
* @description Disables the editor. * @param {string} [rootKey] Root key
src/core/logic/shell/ui.js:341
↓ 38 callersMethodonInput
* @hook Editor.EventManager * @type {SunEditor.Hook.Event.OnInputAsync}
src/plugins/field/autocomplete.js:200
↓ 38 callersMethodsearch
* @description Search for a term in the editor content (headless API). * @param {string} term Search term * @param {Object} [options] Search optio
src/core/logic/panel/finder.js:218
↓ 37 callersMethodget
* @description Gets the position just outside the argument's internal editor (wysiwygFrame). * @param {Node} node Target node. * @returns {OffsetI
src/core/logic/dom/offset.js:107
↓ 37 callersFunctionsetCursorPosition
* Helper to set cursor position in the wysiwyg editor.
test/integration/autocomplete.spec.js:26
↓ 36 callersFunctioncreateDefaultParams
* Creates default params for ColorPicker
test/unit/modules/ColorPicker.spec.js:126
↓ 36 callersMethodmodalAction
* @abstract * This function is called when a form within a modal window is `submit`. * @returns {Promise<boolean>} * - `true`: modal and loading
types/interfaces/contracts.d.ts:21
↓ 35 callersMethodadd
* @description Add content to the end of content. * @param {string} html Content to Input * @param {Object} [options] Options * @param {number|A
src/core/logic/dom/html.js:1206
↓ 34 callersMethodgetBlock
* @description If a parent node that contains an argument node finds a format node (`format.isBlock`), it returns that node. * @param {Node} element
src/core/logic/dom/format.js:258
↓ 34 callersFunctiongetEventHandlers
* Helper: Gets event handlers registered via $.eventManager.addEvent.mock.calls. * Returns a map of [eventType] -> handler for easier access.
test/unit/modules/ModalAnchorEditor.spec.js:97
↓ 34 callersMethodshow
(delay)
src/core/logic/panel/menu.js:295
↓ 33 callersMethodclose
* @override * @type {PluginBrowser['close']}
src/plugins/browser/fileBrowser.js:95
↓ 33 callersFunctionhtmlToMd
(html)
test/unit/helper/markdown.spec.js:7
↓ 32 callersFunctionInitOptions
(options, editorTargets, plugins)
src/core/section/constructor.js:431
↓ 32 callersFunctioncreateController
({ w = 100, h = 50, arrowSize = 8 } = {})
test/unit/core/logic/dom/offset.numerical.spec.js:333
↓ 32 callersMethodmodalOn
* @optional * Executes the method that is called when a plugin's modal is opened. * @param {boolean} isUpdate - Whether the modal is for editing (
types/interfaces/contracts.d.ts:28
↓ 32 callersMethodretainFormat
* @hook Editor.Core * @type {SunEditor.Hook.Core.RetainFormat}
src/plugins/modal/math.js:151
↓ 32 callersMethodsetLine
* @description Replace the line tag of the current selection. * @param {Node} element Line element (P, DIV..) * @example * // Replace the format
src/core/logic/dom/format.js:55
↓ 32 callersMethodshowBlocks
* @description Add or remove the class name of `body` so that the code block is visible * @param {boolean} [value] `true`/`false`, If `undefined` to
src/core/logic/panel/viewer.js:455
↓ 31 callersMethodattach
* @description Attach the hue slider to the form element. * @param {?Node} [form] The element to attach the hue slider.
src/modules/contract/HueSlider.js:204
↓ 31 callersMethodgetSize
* @description Gets the Figure size * @param {?Node} [targetNode] Target element, default is the current element * @returns {{w: string, h: string
src/modules/contract/Figure.js:643
↓ 31 callersMethodisRange
* @description Check if the range object is valid * @param {*} range Range object * @returns {range is Range}
src/core/logic/dom/selection.js:74
↓ 30 callersMethodcomponentDestroy
* @optional * Method to delete a component of a plugin, called by the `FileManager`, `Controller` module. * @param {HTMLElement} target - Target e
types/interfaces/contracts.d.ts:176
↓ 30 callersMethodhide
* @description Hides the editor interface. * @param {string} [rootKey] Root key
src/core/logic/shell/ui.js:390
↓ 30 callersMethodinsert
* @description Inserts an (HTML element / HTML string / plain string) at the selection range. * - If `frameOptions.get('charCounter_max')` is exceed
src/core/logic/dom/html.js:347
↓ 29 callersMethodisNode
* @param {*} obj * @returns {obj is Node}
src/core/config/instanceCheck.js:19
↓ 29 callersFunctionreduceEnterDown
(actions, ports, ctx)
src/core/event/rules/keydown.rule.enter.js:19
↓ 29 callersFunctionsetup
(defaultRel = {})
test/unit/modules/ModalAnchorEditor.spec.js:560
↓ 28 callersFunctionreduceBackspaceDown
(actions, ports, ctx)
src/core/event/rules/keydown.rule.backspace.js:19
next →1–100 of 1,891, ranked by callers