IEventEmitter
plugin.IEventEmitter
on
on(event
, callback
): this
Emitted every time after the plugins have been initialized
or a deferred plugin has been loaded and also initialized
Parameters
Name | Type |
---|---|
event |
"updatePlugins" |
callback |
() => void |
Returns
this
Defined in
jodit/src/core/plugin/interface.ts:17
on(event
, callback
): this
Fired on processing Enter
key. If return some value, plugin enter
will do nothing.
if return false - prevent default Enter behavior
Parameters
Name | Type |
---|---|
event |
"beforeEnter" |
callback |
(e : KeyboardEvent ) => false | void |
Returns
this
Defined in
jodit/src/plugins/enter/interface.ts:17
on(event
, callback
): this
Fired after processing Enter
key.
Parameters
Name | Type |
---|---|
event |
"afterEnter" |
callback |
(e : KeyboardEvent ) => void |
Returns
this
Defined in
jodit/src/plugins/enter/interface.ts:25
on(event
, callback
): this
When inside the list there is a click on an empty element of the list, then it is deleted if empty.
This event can handle this situation.
Parameters
Name | Type |
---|---|
event |
"enterIsEmptyListLeaf" |
callback |
(li : HTMLElement ) => void |
Returns
this
Example
Jodit.make('#editor', {
events: {
enterIsEmptyListLeaf(li){
return Jodit.ns.Dom.isEmpty(li);
}
}
});
Defined in
jodit/src/plugins/enter/interface.ts:41
on(event
, callback
): this
Search plugin: Emitted when the user presses the button - find the next element ins search form
Parameters
Name | Type |
---|---|
event |
"searchNext" |
callback |
() => void |
Returns
this
Defined in
jodit/src/plugins/search/interface.ts:17
on(event
, callback
): this
Search plugin: Emitted when the user presses the button - find the previous element in search form
Parameters
Name | Type |
---|---|
event |
"searchPrevious" |
callback |
() => void |
Returns
this
Defined in
jodit/src/plugins/search/interface.ts:23
on(event
, callback
): this
Search plugin: Emitted search and select process is finished
Parameters
Name | Type |
---|---|
event |
"afterFindAndSelect" |
callback |
() => void |
Returns
this
Defined in
jodit/src/plugins/search/interface.ts:28
on(event
, callback
): this
Search plugin: Emitted search and replace process is finished
Parameters
Name | Type |
---|---|
event |
"afterFindAndReplace" |
callback |
() => void |
Returns
this
Defined in
jodit/src/plugins/search/interface.ts:33
on(event
, callback
): this
The cursorInTheEdge method checks whether the cursor is at the beginning or at the end of the element,
this event allows you to override the logic
determining whether the element before/after the cursor is significant for its position
true - element is not significant
Parameters
Name | Type |
---|---|
event |
"isInvisibleForCursor" |
callback |
(elm : HTMLElement ) => true | void |
Returns
this
Defined in
jodit/src/core/selection/interface.ts:21
on(event
, style
): this
Triggered after the style is applied to the element
Parameters
Name | Type |
---|---|
event |
"afterCommitStyle" |
style |
ICommitStyle |
Returns
this
Defined in
jodit/src/core/selection/interface.ts:29
on(event
, callback
): this
Enables content preparation prior to deletion, or allows for a complete
override of the deletion logic if true is returned.
Parameters
Name | Type |
---|---|
event |
"backSpaceBeforeCases" |
callback |
(backspace : boolean , fakeNode : Node ) => true | void |
Returns
this
Defined in
jodit/src/plugins/backspace/interface.ts:19
on(event
, callback
): this
Triggers after the Backspace or Delete key has been pressed and processed.
Parameters
Name | Type |
---|---|
event |
"backSpaceAfterDelete" |
callback |
(backspace : boolean , fakeNode : Node ) => void |
Returns
this
Defined in
jodit/src/plugins/backspace/interface.ts:27
on(event
, callback
): this
Emitted before a clipboard paste is processed
Parameters
Name | Type |
---|---|
event |
"beforePaste" |
callback |
(e : PasteEvent ) => false | void |
Returns
this
Defined in
jodit/src/plugins/paste/interface.ts:32
on(event
, callback
): this
Emitted after a clipboard paste is processed
Parameters
Name | Type |
---|---|
event |
"afterPaste" |
callback |
(e : PasteEvent ) => false |
Returns
this
Defined in
jodit/src/plugins/paste/interface.ts:41
on(event
, callback
): this
Emitted before a clipboard paste if buffer content is like HTML
Parameters
Name | Type |
---|---|
event |
"processHTML" |
callback |
(e : PasteEvent , value : string , texts : PastedData ) => true | void |
Returns
this
Defined in
jodit/src/plugins/paste/interface.ts:47