Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/JiHong88/suneditor
/ functions
Functions
1,891 in github.com/JiHong88/suneditor
⨍
Functions
1,891
◇
Types & classes
460
↓ 13 callers
Method
changeFrameContext
* @description Change the current root index. * @example * // Switch to the 'body' frame in a multi-root editor * editor.changeFrameContext('bod
src/core/editor.js:82
↓ 13 callers
Function
childrenToInline
* @description Process children of a JSON node into inline markdown * @param {Array<Object>} children * @returns {string}
src/helper/markdown.js:52
↓ 13 callers
Method
componentDeselect
* @optional * Called when a container is deselected. * @param {HTMLElement} target - Target element * @returns {void}
types/interfaces/contracts.d.ts:162
↓ 13 callers
Function
createIframe
(src)
test/unit/plugins/modal/embed.spec.js:305
↓ 13 callers
Method
deleteTransform
* @description Initialize the transform style (rotation) of the element. * @param {?Node} [node] Target element, default is the current element
src/modules/contract/Figure.js:962
↓ 13 callers
Method
dropdownOn
* @description Opens the dropdown menu for the specified button. * @param {Node} button Dropdown's button element to call
src/core/logic/panel/menu.js:101
↓ 13 callers
Method
editColumn
* @description Edits a table cell(column), either adding, removing, or modifying the cell based on the provided option. * @param {?string} option Th
src/plugins/dropdown/table/services/table.grid.js:181
↓ 13 callers
Method
emitEvent
* @description Dispatches an event to all registered plugin handlers synchronously. * @param {string} name The event name (e.g., 'onMouseMove', 'onF
src/core/logic/shell/pluginManager.js:168
↓ 13 callers
Function
setMockPixelData
* Set the mock getImageData to return specific pixel data. * Since ensureCanvasMocks() creates a factory function, each getContext() call * retu
test/unit/modules/HueSlider.spec.js:936
↓ 13 callers
Method
setTableInfo
* @description Sets the table and figure elements based on the provided cell element, and stores references to them for later use. * @param {Node} e
src/plugins/dropdown/table/index.js:714
↓ 13 callers
Method
submit
* @description Add a `hr` element * @param {string} className HR class name
src/plugins/dropdown/hr.js:109
↓ 12 callers
Function
CreateHTML_modal
({ lang, icons, plugins }, pluginOptions)
src/plugins/modal/image/render/image.html.js:28
↓ 12 callers
Method
_callPluginEventAsync
* @internal * @description Calls a registered plugin event asynchronously. * @param {string} name The name of the plugin event * @param {SunEdit
src/core/event/eventOrchestrator.js:647
↓ 12 callers
Function
buildKernel
(dom, overrides = {})
test/unit/core/logic/dom/offset.numerical.spec.js:216
↓ 12 callers
Method
colorPickerAction
* @optional * Executes the method called when a button of `ColorPicker` module is clicked. * - When applying the `ColorPicker` module globally to
types/interfaces/contracts.d.ts:104
↓ 12 callers
Function
createViewerKernel
* Creates a fully-wired mock kernel for the Viewer constructor. * Each call produces independent DOM elements and Maps so tests are isolated.
test/unit/core/logic/panel/viewer.spec.js:35
↓ 12 callers
Method
getGlobalScroll
* @deprecated * @description Gets the current editor-relative scroll offset. * @param {?Node} [node] Target element. * @returns {OffsetGlobalScr
src/core/logic/dom/offset.js:210
↓ 12 callers
Method
init
()
src/core/logic/shell/ui.js:903
↓ 12 callers
Method
mergeSameTags
* @description Use with `npdePath` (dom-query-GetNodePath) to merge the same attributes and tags if they are present and modify the nodepath. * - If
src/core/logic/dom/nodeTransform.js:162
↓ 12 callers
Function
mockRect
(el, rect)
test/unit/core/logic/dom/selection.scrollTo.spec.js:34
↓ 12 callers
Function
mockSize
(el, w, h)
test/unit/core/logic/dom/selection.scrollTo.spec.js:43
↓ 12 callers
Method
onFilePasteAndDrop
* @hook Editor.EventManager * @type {SunEditor.Hook.Event.OnFilePasteAndDrop}
src/plugins/modal/audio.js:167
↓ 12 callers
Method
readyResizeFromEdge
* @description Prepares for resizing from the edge of a cell or row. * @param {MouseEvent} event - Mouse event * @param {HTMLTableCellElement} tar
src/plugins/dropdown/table/services/table.resize.js:95
↓ 12 callers
Method
registerTargets
* @description Sets command target elements. * @param {string} cmd - The command identifier. * @param {HTMLButtonElement} target - The associated
src/core/logic/shell/commandDispatcher.js:174
↓ 12 callers
Method
removeEmptyNode
* @description Delete a empty child node of argument element * @param {Node} element Element node * @param {?Node} notRemoveNode Do not remove nod
src/core/logic/dom/nodeTransform.js:386
↓ 12 callers
Method
runFromTarget
* @description Execute `editor.run` with command button. * @param {Node} target Command target
src/core/logic/shell/commandDispatcher.js:142
↓ 12 callers
Method
setMultiCells
* @internal * @description Selects multiple table cells and applies selection styles. * @param {Node} startCell The first cell in the selection.
src/plugins/dropdown/table/services/table.selection.js:84
↓ 11 callers
Function
CreateSliderCtx
* @returns {{slider: HTMLElement, offscreenCanvas: HTMLCanvasElement, offscreenCtx: CanvasRenderingContext2D, wheel: HTMLCanvasElement, wheelCtx: Canv
src/modules/contract/HueSlider.js:29
↓ 11 callers
Method
GetRatio
* @description Ratio calculation * @param {string|number} w Width size * @param {string|number} h Height size * @param {?string} [defaultSizeUni
src/modules/contract/Figure.js:319
↓ 11 callers
Method
_codeMirrorEditor
* @internal * @description Run `CodeMirror` Editor * @param {"set"|"get"|"readonly"|"refresh"} key Method key * @param {*} value `CodeMirror` pa
src/core/logic/panel/viewer.js:686
↓ 11 callers
Method
_initToggleButtons
* @internal * @description Set the disabled button list
src/core/logic/shell/ui.js:758
↓ 11 callers
Method
applyBlock
* @description Appended all selected `line` element to the argument element(`block`) and insert * @param {Node} blockElement Element of wrap the arg
src/core/logic/dom/format.js:280
↓ 11 callers
Method
getWordCount
* @description Get the number of words in the content. * - If [content] is `undefined`, get the current editor's word count. * @param {string} [co
src/core/logic/dom/char.js:102
↓ 11 callers
Method
hueSliderAction
* @abstract * This method is called when the color is selected in the hue slider. * @returns {void}
types/interfaces/contracts.d.ts:129
↓ 11 callers
Method
isNormalLine
* @description It is judged whether it is the only `line` element. * @param {Node|string} element The node to check * @returns {element is HTMLEle
src/core/logic/dom/format.js:822
↓ 11 callers
Function
isUneditableNode
* @description Determines if the `range` is within an uneditable node. * @param {EventPorts} ports - Reducer ports * @param {Range} range The range
src/core/event/effects/ruleHelpers.js:99
↓ 11 callers
Method
offCurrentModal
* @description Closes the currently open modal dialog.
src/core/logic/shell/ui.js:545
↓ 11 callers
Method
preventToolbarHide
(allow)
src/core/logic/shell/ui.js:565
↓ 11 callers
Method
preview
* @description Open the preview window.
src/core/logic/panel/viewer.js:610
↓ 11 callers
Method
print
* @description Prints the current content of the editor. * @throws {Error} Throws error if print operation fails.
src/core/logic/panel/viewer.js:519
↓ 11 callers
Method
setFigureSize
* @description Set the element's container size * @param {string|number} w Width size * @param {string|number} h Height size
src/modules/contract/Figure.js:615
↓ 11 callers
Method
submitProps
* @description Applies properties to table cells. * @param {HTMLButtonElement} target The target element.
src/plugins/dropdown/table/services/table.style.js:399
↓ 11 callers
Function
wait
(ms = 50)
test/integration/keyboard.spec.js:23
↓ 10 callers
Method
#doSearch
@description Core search — clear previous, find matches, highlight, update count.
src/core/logic/panel/finder.js:440
↓ 10 callers
Method
CalcRatio
* @description Ratio calculation * @param {string|number} w Width size * @param {string|number} h Height size * @param {string} defaultSizeUnit
src/modules/contract/Figure.js:352
↓ 10 callers
Function
GetAttr
* @param {Element} element - Element * @param {string} name - Attribute name * @returns {string|null}
src/modules/manager/FileManager.js:332
↓ 10 callers
Method
_toggleCodeViewButtons
* @internal * @description Toggle the disabled state of buttons reserved for Code View. * @param {boolean} isCodeView
src/core/logic/shell/ui.js:775
↓ 10 callers
Method
_visibleControllers
* @internal * @description Visible controllers * @param {boolean} value hidden/show * @param {?boolean} [lineBreakShow] Line break hidden/show (
src/core/logic/shell/ui.js:692
↓ 10 callers
Method
applySize
* @description Applies the specified width and height to the image. * @param {string} w - Image width. * @param {string} h - Image height.
src/plugins/modal/image/services/image.size.js:93
↓ 10 callers
Method
cancel
* @description Cancel API (xhr.abort())
src/modules/manager/ApiManager.js:168
↓ 10 callers
Method
containerOff
* @description Closes the currently open menu container.
src/core/logic/panel/menu.js:224
↓ 10 callers
Method
isEmpty
* @description Checks if the content of the editor is empty. * - Display criteria for "placeholder". * @param {?SunEditor.FrameContext} [fc] Frame
src/core/editor.js:45
↓ 10 callers
Method
pasteTableCellMatrix
* @description Updates the target table's cells with the data from the copied table. * @param {HTMLTableElement} copyTable The table containing the
src/plugins/dropdown/table/services/table.clipboard.js:116
↓ 10 callers
Method
resetOptions
* @description Add or reset option property (Editor is reloaded) * @example * // Change toolbar buttons and height * editor.resetOptions({ *
src/core/editor.js:60
↓ 10 callers
Method
setFileData
* @description Set the file information to the element. * @param {Node} element File information element * @param {Object} params * @param {stri
src/modules/manager/FileManager.js:123
↓ 10 callers
Method
setInputSize
* @description Sets the width and height input values. * @param {string} w - Width value * @param {string} h - Height value
src/plugins/modal/image/services/image.size.js:60
↓ 10 callers
Method
setItem
* @description Set the index of the selected item * @param {number} index Item index
src/modules/ui/SelectMenu.js:196
↓ 10 callers
Function
triggerServerUpload
(info = {})
test/unit/plugins/modal/video/services/video.upload.spec.js:111
↓ 9 callers
Method
#removeGlobalEvents
* @description Removes global event listeners and resets resize-related properties.
src/plugins/dropdown/table/services/table.resize.js:425
↓ 9 callers
Function
CreateFrameContext
(editorTarget, top, wwFrame, codeWrapper, codeFrame, markdownWrapper, markdownFrame, statusbar, documentTypeIn
src/core/schema/frameContext.js:99
↓ 9 callers
Function
InvalidateTableCache
(table)
src/plugins/dropdown/table/shared/table.utils.js:215
↓ 9 callers
Method
__deselect
* @internal * @description Deselects the currently selected component, removing any selection effects and associated event listeners. * - This met
src/core/logic/shell/component.js:505
↓ 9 callers
Method
__setCoverPaddingBottom
* @internal * @description Sets padding-bottom for cover elements based on width and height. * @param {string} w Width value. * @param {string}
src/modules/contract/Figure.js:1189
↓ 9 callers
Method
_closeController
* @description Closes table-related controllers.
src/plugins/dropdown/table/index.js:792
↓ 9 callers
Method
_is
* @internal * @description Checks if an element is a header. * @param {Node} element - The element to check. * @returns {boolean} `true` if the
src/core/section/documentType.js:597
↓ 9 callers
Method
_setAutoSize
* @internal * @description Sets the figure element to its auto size.
src/modules/contract/Figure.js:1208
↓ 9 callers
Method
_setButtonsActive
* @internal * @description Set the `active` class to the button of the toolbar
src/core/logic/panel/viewer.js:475
↓ 9 callers
Method
_setDefaultLine
* @internal * @description If there is no default format, add a `line` and move `selection`. * @param {?string} formatName Format tag name (defaul
src/core/event/eventOrchestrator.js:199
↓ 9 callers
Method
_syncFrameState
* @internal * @description Synchronizes frame UI state after content changes. * Coordinates `iframe` height adjustment, `placeholder` visibility,
src/core/logic/shell/ui.js:829
↓ 9 callers
Function
createRangeForNode
(textNode)
test/unit/core/logic/dom/selection.scrollTo.spec.js:135
↓ 9 callers
Method
editRow
* @description Edits a table row, either adding, removing, the row * @param {?string} option The action to perform on the row (`up`|`down`|`null`)
src/plugins/dropdown/table/services/table.grid.js:368
↓ 9 callers
Method
getAll
()
src/core/config/optionProvider.js:383
↓ 9 callers
Function
getEventHandlers
* Helper: Extract captured event handlers from eventManager.addEvent calls. * The constructor binds all private methods via eventManager.addEvent.
test/unit/modules/Browser.spec.js:79
↓ 9 callers
Function
setModulePixelData
* Override the module-level wheelCtx and offscreenCtx getImageData * to return specific pixel data, enabling non-achromatic code paths.
test/unit/modules/HueSlider.spec.js:1427
↓ 8 callers
Function
CreateContext
(toolbar, toolbarContainer, menuTray, subbar, statusbarContainer)
src/core/schema/context.js:41
↓ 8 callers
Function
CreateStatusbar
(targetOptions, statusbar)
src/core/section/constructor.js:796
↓ 8 callers
Method
_hideToolbar
* @internal * @description Hide the toolbar.
src/core/event/eventOrchestrator.js:178
↓ 8 callers
Method
_isIgnoreNodeChange
* @internal * @description Nodes that need to be added without modification when changing text nodes * @param {Node} element Element to check *
src/core/logic/dom/inline.js:440
↓ 8 callers
Method
_showInline
* @internal * @description Show the `inline` toolbar mode.
src/core/logic/panel/toolbar.js:429
↓ 8 callers
Method
alertClose
* @description Close the alert panel
src/core/logic/shell/ui.js:438
↓ 8 callers
Method
applyTagEffect
* @description Activates the corresponding button with the tags information of the current cursor position, * - such as `bold`, `underline`, etc., a
src/core/event/eventOrchestrator.js:120
↓ 8 callers
Method
checkFileInfo
* @description Check the components such as image and video and modify them according to the format. * @param {boolean} loaded If `true`, the compon
src/core/logic/shell/pluginManager.js:194
↓ 8 callers
Method
convertAsFormat
* @description As style[block, inline] the component * @param {?Node} targetNode Target element * @param {"block"|"inline"} formatStyle Format sty
src/modules/contract/Figure.js:739
↓ 8 callers
Method
enableBackWrapper
* @description Activate the transparent background `div` so that other elements are not affected during resizing. * @param {string} cursor cursor cs
src/core/logic/shell/ui.js:518
↓ 8 callers
Method
findNext
* @description Navigate to next match (public for shortcut binding).
src/core/logic/panel/finder.js:194
↓ 8 callers
Function
hold
(html)
src/helper/markdown.js:516
↓ 8 callers
Method
isEdgeLine
* @description Check if the container and offset values are the edges of the `line` * @param {Node} node The node of the selection object. (range.st
src/core/logic/dom/format.js:768
↓ 8 callers
Function
makePorts
(inst, { _styleNodes })
src/core/event/ports.js:84
↓ 8 callers
Method
setHexColor
* @description Store color values * @param {string} hexColorStr Hax color value
src/modules/contract/ColorPicker.js:179
↓ 8 callers
Method
setTableLayout
* @description Updates table layout styles. * @param {string} styles - Styles to update. * @param {boolean} isMaxWidth - Whether the table is set
src/plugins/dropdown/table/services/table.style.js:362
↓ 8 callers
Method
size
()
src/core/config/optionProvider.js:394
↓ 7 callers
Method
#selfPathBookmark
* @description Checks if the given path is an internal bookmark. * @param {string} path - The URL or anchor link. * @returns {boolean} - `true` if
src/modules/ui/ModalAnchorEditor.js:297
↓ 7 callers
Function
GetLogicalCellIndex
(table, rowIndex, cellIndex)
src/plugins/dropdown/table/shared/table.utils.js:172
↓ 7 callers
Method
__removeDragEvent
* @internal * @description Removes drag-related events and resets drag-related states.
src/core/logic/shell/component.js:631
↓ 7 callers
Method
_callPluginEvent
* @internal * @description Calls a registered plugin event synchronously. * @param {string} name The name of the plugin event * @param {SunEdito
src/core/event/eventOrchestrator.js:636
↓ 7 callers
Method
_moreLayerOff
* @internal * @description Hide the currently active more options layer.
src/core/logic/panel/toolbar.js:470
↓ 7 callers
Method
_toggleControllerButtons
* @internal * @description Toggle the disabled state of buttons when a controller is active. * @param {boolean} isOpen
src/core/logic/shell/ui.js:783
↓ 7 callers
Method
applyHeaderByShortcut
* @description Create a header tag, call by `shortcut` class * - (e.g. shortcuts._h1: ['c+s+49+$~blockStyle.applyHeaderByShortcut', '']) * @param
src/plugins/dropdown/blockStyle.js:129
↓ 7 callers
Method
applyRetainFormat
* @description Apply retain format rules from plugins to the parsed DOM * @param {DocumentFragment|Document} domParser
src/core/logic/shell/pluginManager.js:150
↓ 7 callers
Method
close
* @description Select menu close
src/modules/ui/SelectMenu.js:173
← previous
next →
201–300 of 1,891, ranked by callers