Jodit
- Hierarchy
- Implements
- STATUSES
- async
- uid
- ownerWindow
- TOOLBAR
- toolbar
- registeredButtons
- isView
- parent
- mods
- id
- components
- ES
- version
- esNext
- esModern
- create
- events
- OPTIONS
- isJodit
- fatMode
- plugins
- modules
- ns
- decorators
- constants
- instances
- lang
- core
- editorIsActive
- selection
- currentPlace
- places
- componentName
- ownerDocument
- od
- ow
- isReady
- isDestructed
- isInDestruct
- componentStatus
- toolbarContainer
- basePath
- buffer
- storage
- c
- e
- progressbar
- o
- isLocked
- isFullSize
- ready
- text
- defaultTimeout
- defaultOptions
- createInside
- element
- editor
- container
- workplace
- message
- statusbar
- iframe
- history
- editorWindow
- ew
- editorDocument
- ed
- options
- s
- uploader
- filebrowser
- mode
- value
- isFocused
- getFullElName
- get
- bindDestruct
- setStatus
- hookStatus
- isInstanceOf
- dlg
- confirm
- prompt
- alert
- getElm
- getElms
- afterSetMod
- setMod
- getMod
- setPanel
- getRegisteredButtonGroups
- registerButton
- unregisterButton
- i18n
- toggleFullSize
- isLockedNotBy
- getVersion
- getVersion
- getInstance
- className
- waitForReady
- atom
- make
- isJoditAssigned
- setNativeEditorValue
- synchronizeValues
- getEditorValue
- setEditorValue
- getElementValue
- registerCommand
- registerHotkeyToCommand
- execCommand
- nativeExecCommand
- lock
- unlock
- getMode
- isEditorMode
- getRealMode
- setMode
- toggleMode
- setDisabled
- getDisabled
- setReadOnly
- getReadOnly
- focus
- addPlace
- setCurrentPlace
- fetch
- destruct
jodit.Jodit
The base class of all Jodit UI components. Provides work with a life cycle.
Hierarchy
-
↳
Jodit
Implements
STATUSES
Static
STATUSES: Object
= STATUSES
Type declaration
Name | Type |
---|---|
beforeInit |
"beforeInit" |
ready |
"ready" |
beforeDestruct |
"beforeDestruct" |
destructed |
"destructed" |
Inherited from
Defined in
src/core/component/component.ts#40
async
async: IAsync
Implementation of
Inherited from
Defined in
src/core/component/component.ts#44
uid
Readonly
uid: string
Implementation of
Inherited from
Defined in
src/core/component/component.ts#59
ownerWindow
ownerWindow: Window
= window
The window in which jodit was created
Implementation of
Inherited from
Defined in
src/core/component/component.ts#109
TOOLBAR
TOOLBAR: IToolbarCollection
Inherited from
Defined in
src/core/view/view-with-toolbar.ts#34
toolbar
toolbar: IToolbarCollection
Implementation of
Inherited from
Defined in
src/core/view/view-with-toolbar.ts#35
registeredButtons
registeredButtons: Set
<IPluginButton
>
Implementation of
Inherited from
ViewWithToolbar.registeredButtons
Defined in
src/core/view/view-with-toolbar.ts#87
isView
Readonly
isView: true
Implementation of
Inherited from
Defined in
parent
parent: Nullable
<IViewBased
<IViewOptions
>> = null
Implementation of
Inherited from
Defined in
mods
Readonly
mods: IDictionary
<null
| string
| boolean
> = {}
Implementation of
Inherited from
Defined in
id
id: string
ID attribute for a source element, id add {id}_editor
it's editor's id
Implementation of
Inherited from
Defined in
components
Readonly
components: Set
<IComponent
<IViewBased
<IViewOptions
>>>
All created ViewComponent inside this view
Implementation of
Inherited from
Defined in
ES
Static
Readonly
ES: "es5"
| "es2015"
| "es2018"
| "es2021"
= ES
Inherited from
Defined in
version
Static
Readonly
version: string
= APP_VERSION
Inherited from
Defined in
esNext
Static
Readonly
esNext: boolean
= IS_ES_NEXT
Inherited from
Defined in
esModern
Static
Readonly
esModern: boolean
= IS_ES_MODERN
Inherited from
Defined in
create
Readonly
create: ICreate
Implementation of
Inherited from
Defined in
events
events: IEventEmitter
Implementation of
Inherited from
Defined in
OPTIONS
OPTIONS: IViewOptions
= View.defaultOptions
Implementation of
Inherited from
Defined in
isJodit
Readonly
isJodit: true
Define if object is Jodit
Implementation of
Inherited from
Defined in
fatMode
Static
fatMode: boolean
= FAT_MODE
Defined in
plugins
Static
Readonly
plugins: IPluginSystem
= pluginSystem
Defined in
modules
Static
modules: modules
Defined in
ns
Static
ns: modules
Defined in
decorators
Static
Readonly
decorators: IDictionary
<Function
> = {}
Defined in
constants
Static
Readonly
constants: constants
= constants
Defined in
instances
Static
Readonly
instances: IDictionary
<IJodit
> = instances
Defined in
lang
Static
Readonly
lang: any
= lang
Defined in
core
Static
Readonly
core: Object
Type declaration
Name | Type |
---|---|
Plugin |
typeof Plugin |
Defined in
editorIsActive
editorIsActive: boolean
= false
Editor has focus in this time
Implementation of
Defined in
selection
Readonly
selection: Selection
Implementation of
Defined in
currentPlace
currentPlace: IWorkPlace
Implementation of
Defined in
places
places: IWorkPlace
[]
Implementation of
Defined in
componentName
get
componentName(): string
Returns
string
Implementation of
Defined in
src/core/component/component.ts#46
ownerDocument
get
ownerDocument(): Document
The document in which jodit was created
Returns
Implementation of
Defined in
src/core/component/component.ts#95
od
get
od(): Document
Shortcut for this.ownerDocument
Returns
Implementation of
Defined in
src/core/component/component.ts#102
ow
get
ow(): Window
Returns
Implementation of
Defined in
src/core/component/component.ts#110
isReady
get
isReady(): boolean
Component is ready for work
Returns
boolean
Implementation of
Defined in
src/core/component/component.ts#145
isDestructed
get
isDestructed(): boolean
Component was destructed
Returns
boolean
Implementation of
Defined in
src/core/component/component.ts#152
isInDestruct
get
isInDestruct(): boolean
The component is currently undergoing destructuring or has already been destroyed.
Those. you should not the app froze new events on him now or do anything else with him.
Returns
boolean
Implementation of
Defined in
src/core/component/component.ts#160
componentStatus
get
componentStatus(): ComponentStatus
Current component status
Returns
Implementation of
Defined in
src/core/component/component.ts#210
set
componentStatus(componentStatus
): void
Setter for current component status
Parameters
Name | Type |
---|---|
componentStatus |
ComponentStatus |
Returns
void
Implementation of
Defined in
src/core/component/component.ts#217
toolbarContainer
get
toolbarContainer(): HTMLElement
Container for toolbar
Returns
Implementation of
Defined in
src/core/view/view-with-toolbar.ts#43
basePath
get
basePath(): string
Get a path for loading extra staff
Returns
string
Implementation of
Defined in
buffer
get
buffer(): IStorage
<StorageValueType
>
Some extra data inside editor
Returns
See
copyformat plugin
Implementation of
Defined in
storage
get
storage(): IStorage
<StorageValueType
>
Container for persistent set/get value
Returns
Implementation of
Defined in
c
get
c(): this
["create"
]
Short alias for create
Returns
this
["create"
]
Implementation of
Defined in
e
get
e(): this
["events"
]
Short alias for events
Returns
this
["events"
]
Implementation of
Defined in
progressbar
get
progressbar(): IProgressBar
progress_bar Progress bar
Returns
Implementation of
Defined in
o
get
o(): this
["options"
]
Short alias for options
Returns
this
["options"
]
Implementation of
Defined in
isLocked
get
isLocked(): boolean
View is locked
Returns
boolean
Implementation of
Defined in
isFullSize
get
isFullSize(): boolean
View is in fullSize
Returns
boolean
Implementation of
Defined in
ready
Returns
Defined in
text
get
text(): string
Plain text editor's value
Returns
string
Implementation of
Defined in
defaultTimeout
get
defaultTimeout(): number
Return a default timeout period in milliseconds for some debounce or throttle functions.
By default, {history.timeout}
options
Returns
number
Implementation of
Defined in
defaultOptions
get
defaultOptions(): Config
Default settings
Returns
Defined in
createInside
get
createInside(): ICreate
Returns
Implementation of
Defined in
element
get
element(): HTMLElement
element It contains source element
Returns
Implementation of
Defined in
editor
get
editor(): HTMLDivElement
| HTMLBodyElement
editor It contains the root element editor
Returns
HTMLDivElement
| HTMLBodyElement
Implementation of
Defined in
set
editor(editor
): void
Parameters
Name | Type |
---|---|
editor |
HTMLDivElement | HTMLBodyElement |
Returns
void
Implementation of
Defined in
container
get
container(): HTMLDivElement
Container for all staff
Returns
Implementation of
Defined in
set
container(container
): void
Parameters
Name | Type |
---|---|
container |
HTMLDivElement |
Returns
void
Implementation of
Defined in
workplace
get
workplace(): HTMLDivElement
workplace It contains source and wysiwyg editors
Returns
Implementation of
Defined in
message
get
message(): IMessages
Returns
Implementation of
Defined in
statusbar
get
statusbar(): IStatusBar
Statusbar module
Returns
Implementation of
Defined in
iframe
get
iframe(): void
| HTMLIFrameElement
iframe Iframe for iframe mode
Returns
void
| HTMLIFrameElement
Implementation of
Defined in
set
iframe(iframe
): void
Parameters
Name | Type |
---|---|
iframe |
void | HTMLIFrameElement |
Returns
void
Implementation of
Defined in
history
get
history(): IHistory
Returns
Implementation of
Defined in
editorWindow
get
editorWindow(): Window
In iframe mode editor's window can be different by owner
Returns
Implementation of
Defined in
set
editorWindow(win
): void
Parameters
Name | Type |
---|---|
win |
Window |
Returns
void
Implementation of
Defined in
ew
get
ew(): this
["editorWindow"
]
Alias for this.ew
Returns
this
["editorWindow"
]
Implementation of
Defined in
editorDocument
get
editorDocument(): Document
In iframe mode editor's window can be different by owner
Returns
Implementation of
Defined in
ed
get
ed(): this
["editorDocument"
]
Alias for this.ew
Returns
this
["editorDocument"
]
Implementation of
Defined in
options
get
options(): Config
options All Jodit settings default + second arguments of constructor
Returns
Implementation of
Defined in
set
options(opt
): void
Parameters
Name | Type |
---|---|
opt |
Config |
Returns
void
Implementation of
Defined in
s
get
s(): this
["selection"
]
Alias for this.selection
Returns
this
["selection"
]
Implementation of
Defined in
uploader
get
uploader(): IUploader
Returns
Implementation of
Defined in
filebrowser
get
filebrowser(): IFileBrowser
<IFileBrowserOptions
>
Returns
IFileBrowser
<IFileBrowserOptions
>
Implementation of
Defined in
mode
get
mode(): Modes
Editor's mode
Returns
Implementation of
Defined in
set
mode(mode
): void
Parameters
Name | Type |
---|---|
mode |
Modes |
Returns
void
Implementation of
Defined in
value
get
value(): string
HTML value
Returns
string
Implementation of
Defined in
set
value(html
): void
Parameters
Name | Type |
---|---|
html |
string |
Returns
void
Implementation of
Defined in
isFocused
get
isFocused(): boolean
Returns
boolean
Implementation of
Defined in
getFullElName
getFullElName(elementName
): string
Calc BEM element class name
Parameters
Name | Type | Description |
---|---|---|
elementName |
string |
element name in the bem classification |
Returns
string
Inherited from
Defined in
src/core/component/component.ts#65
getFullElName(elementName
, mod
): string
Parameters
Name | Type |
---|---|
elementName |
string |
mod |
string |
Returns
string
Inherited from
Defined in
src/core/component/component.ts#66
getFullElName(elementName
, mod
, modValue
): string
Parameters
Name | Type |
---|---|
elementName |
string |
mod |
string |
modValue |
string | boolean |
Returns
string
Inherited from
Defined in
src/core/component/component.ts#67
get
get<T
>(chain
, obj?
): Nullable
<T
>
Safe get any field
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
chain |
string |
the path to be traversed in the obj object |
obj? |
IDictionary |
the object in which the value is searched |
Returns
Nullable
<T
>
Example
private a = {
b: {
c: {
e: {
g: {
color: 'red'
}
}
}
}
}
this.get('a.b.c.e.g.color'); // Safe access to color
// instead using optionsl chaining
this?.a?.b?.c?.e?.g?.color
Inherited from
Defined in
src/core/component/component.ts#138
bindDestruct
bindDestruct(component
): this
Bind destructor to some View
Parameters
Name | Type |
---|---|
component |
IComponent <IViewBased <IViewOptions >> |
Returns
this
Inherited from
Defined in
src/core/component/component.ts#170
setStatus
setStatus(componentStatus
): void
Set component status
Parameters
Name | Type | Description |
---|---|---|
componentStatus |
ComponentStatus |
component status |
Returns
void
See
ComponentStatus
Inherited from
Defined in
src/core/component/component.ts#226
hookStatus
hookStatus(status
, callback
): void
Adds a handler for changing the component's status
Parameters
Name | Type | Description |
---|---|---|
status |
ComponentStatus |
the status at which the callback is triggered |
callback |
(component : this ) => void |
a function that will be called when the status is status |
Returns
void
Inherited from
Defined in
src/core/component/component.ts#265
isInstanceOf
isInstanceOf<T
>(c
, constructorFunc
): c is T
Type parameters
Name | Type |
---|---|
T |
extends Component |
Parameters
Name | Type |
---|---|
c |
unknown |
constructorFunc |
Function |
Returns
c is T
Inherited from
Defined in
src/core/component/component.ts#283
dlg
dlg(this
, options?
): IDialog
Parameters
Name | Type |
---|---|
this |
IViewBased <IViewOptions > & IDlgs |
options? |
IDialogOptions |
Returns
Inherited from
Defined in
confirm
confirm(this
, msg
, title
, callback?
): IDialog
Parameters
Name | Type |
---|---|
this |
IViewBased <IViewOptions > & IDlgs |
msg |
string |
title |
undefined | string | (yes : boolean ) => void |
callback? |
(yes : boolean ) => false | void |
Returns
Inherited from
Defined in
prompt
prompt(this
, msg
, title
, callback
, placeholder?
, defaultValue?
): IDialog
Parameters
Name | Type |
---|---|
this |
IViewBased <IViewOptions > & IDlgs |
msg |
string |
title |
undefined | string | () => false | void |
callback |
(value : string ) => false | void |
placeholder? |
string |
defaultValue? |
string |
Returns
Inherited from
Defined in
alert
alert(this
, msg
, title?
, callback?
, className?
): IDialog
Parameters
Name | Type |
---|---|
this |
IViewBased <IViewOptions > & IDlgs |
msg |
string | HTMLElement |
title? |
string | () => false | void |
callback? |
string | (dialog : IDialog ) => false | void |
className? |
string |
Returns
Inherited from
Defined in
getElm
getElm<T
>(this
, elementName
): Nullable
<HTMLElement
>
Return element with BEM class name
Type parameters
Name | Type |
---|---|
T |
extends IComponent <IViewBased <IViewOptions >> & IContainer & IElms |
Parameters
Name | Type |
---|---|
this |
T |
elementName |
string |
Returns
Inherited from
Defined in
getElms
getElms<T
>(this
, elementName
): HTMLElement
[]
Return elements with BEM class name
Type parameters
Name | Type |
---|---|
T |
extends IComponent <IViewBased <IViewOptions >> & IContainer & IElms |
Parameters
Name | Type |
---|---|
this |
T |
elementName |
string |
Returns
Inherited from
Defined in
afterSetMod
afterSetMod(name
, value
): void
Parameters
Name | Type |
---|---|
name |
string |
value |
ModType |
Returns
void
Inherited from
Defined in
setMod
setMod<T
>(this
, name
, value
, container?
): T
Set/remove BEM class modification
Type parameters
Name | Type |
---|---|
T |
extends IComponent <IViewBased <IViewOptions >> & IContainer & IMods |
Parameters
Name | Type | Description |
---|---|---|
this |
T |
- |
name |
string |
- |
value |
ModType |
if null, mod will be removed |
container? |
HTMLElement |
- |
Returns
T
Inherited from
Defined in
getMod
getMod(this
, name
): ModType
Get BEM class modification value
Parameters
Name | Type |
---|---|
this |
IMods |
name |
string |
Returns
Inherited from
Defined in
setPanel
setPanel(element
): void
Change panel container
Parameters
Name | Type |
---|---|
element |
string | HTMLElement |
Returns
void
Inherited from
Defined in
src/core/view/view-with-toolbar.ts#63
getRegisteredButtonGroups
getRegisteredButtonGroups(): IDictionary
<string
[]>
Returns
IDictionary
<string
[]>
Inherited from
ViewWithToolbar.getRegisteredButtonGroups
Defined in
src/core/view/view-with-toolbar.ts#90
registerButton
registerButton(btn
): this
Register button for a group
Parameters
Name | Type |
---|---|
btn |
IPluginButton |
Returns
this
Inherited from
ViewWithToolbar.registerButton
Defined in
src/core/view/view-with-toolbar.ts#97
unregisterButton
unregisterButton(btn
): this
Remove button from a group
Parameters
Name | Type |
---|---|
btn |
IPluginButton |
Returns
this
Inherited from
ViewWithToolbar.unregisterButton
Defined in
src/core/view/view-with-toolbar.ts#117
i18n
i18n(text
, ...params
): string
Internationalization method. Uses Jodit.lang object
Parameters
Name | Type |
---|---|
text |
string |
...params |
(string | number )[] |
Returns
string
Inherited from
Defined in
toggleFullSize
toggleFullSize(isFullSize?
): void
Parameters
Name | Type |
---|---|
isFullSize? |
boolean |
Returns
void
Inherited from
ViewWithToolbar.toggleFullSize
Defined in
isLockedNotBy
isLockedNotBy(name
): boolean
Parameters
Name | Type |
---|---|
name |
string |
Returns
boolean
Inherited from
Defined in
getVersion
getVersion(): string
Return current version
Returns
string
Inherited from
Defined in
getVersion
getVersion(): string
Returns
string
Inherited from
Defined in
getInstance
getInstance<T
>(module
, options?
): T
Make one instance of one module
Type parameters
Name | Type |
---|---|
T |
extends IComponent <IViewBased <IViewOptions >> |
Parameters
Name | Type |
---|---|
module |
Function |
options? |
object |
Returns
T
Inherited from
Defined in
getInstance<T
>(moduleName
, options?
): T
Type parameters
Name | Type |
---|---|
T |
extends IComponent <IViewBased <IViewOptions >> |
Parameters
Name | Type |
---|---|
moduleName |
string |
options? |
object |
Returns
T
Inherited from
Defined in
className
className(): string
Returns
string
Inherited from
Defined in
waitForReady
waitForReady(): Promise
<IJodit
>
Return promise for ready actions
Returns
Example
const jodit = Jodit.make('#editor');
await jodit.waitForReady();
jodit.e.fire('someAsyncLoadedPluginEvent', (test) => {
alert(test);
});
Defined in
atom
atom<T
>(object
): T
Method wrap usual Has Object in Object helper for prevent deep object merging in options*
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
object |
T |
Returns
T
Defined in
make
make(element
, options?
): Jodit
Factory for creating Jodit instance
Parameters
Name | Type |
---|---|
element |
string | HTMLElement |
options? |
object |
Returns
Defined in
isJoditAssigned
isJoditAssigned(element
): element is HTMLElement & Object
Checks if the element has already been initialized when for Jodit
Parameters
Name | Type |
---|---|
element |
HTMLElement |
Returns
element is HTMLElement & Object
Defined in
setNativeEditorValue
setNativeEditorValue(value
): void
Set value to native editor
Parameters
Name | Type |
---|---|
value |
string |
Returns
void
Defined in
synchronizeValues
synchronizeValues(): void
Returns
void
Defined in
getEditorValue
getEditorValue(removeSelectionMarkers?
, consumer?
): string
Return editor value
Parameters
Name | Type | Default value |
---|---|---|
removeSelectionMarkers |
boolean |
true |
consumer? |
string |
undefined |
Returns
string
Defined in
setEditorValue
setEditorValue(value?
): void
Set editor html value and if set sync fill source element value
When method was called without arguments - it is a simple way to synchronize editor to element
Parameters
Name | Type |
---|---|
value? |
string |
Returns
void
Defined in
getElementValue
getElementValue(): string
Return source element value
Returns
string
Defined in
registerCommand
registerCommand<C
>(commandNameOriginal
, command
, options?
): IJodit
Register custom handler for command
Type parameters
Name | Type |
---|---|
C |
extends string |
Parameters
Name | Type |
---|---|
commandNameOriginal |
C |
command |
CustomCommand <IJodit , C > |
options? |
Object |
options.stopPropagation |
boolean |
Returns
Example
var jodit = Jodit.make('#editor);
jodit.setEditorValue('test test test');
jodit.registerCommand('replaceString', function (command, needle, replace) {
var value = this.getEditorValue();
this.setEditorValue(value.replace(needle, replace));
return false; // stop execute native command
});
jodit.execCommand('replaceString', 'test', 'stop');
console.log(jodit.value); // stop test
// and you can add hotkeys for command
jodit.registerCommand('replaceString', {
hotkeys: 'ctrl+r',
exec: function (command, needle, replace) {
var value = this.getEditorValue();
this.setEditorValue(value.replace(needle, replace));
}
});
Defined in
registerHotkeyToCommand
registerHotkeyToCommand(hotkeys
, commandName
, shouldStop?
): void
Register hotkey for command
Parameters
Name | Type | Default value |
---|---|---|
hotkeys |
string | string [] |
undefined |
commandName |
string |
undefined |
shouldStop |
boolean |
true |
Returns
void
Defined in
execCommand
execCommand(command
, showUI?
, value?
, ...args
): void
Execute command editor
Parameters
Name | Type | Description |
---|---|---|
command |
string |
command. It supports all the |
showUI? |
boolean |
- |
value? |
any |
- |
...args |
unknown [] |
- |
Returns
void
See
https://developer.mozilla.org/ru/docs/Web/API/Document/execCommand#commands and a number of its own
for example applyStyleProperty. Comand fontSize receives the second parameter px,
formatBlock and can take several options
Example
this.execCommand('fontSize', 12); // sets the size of 12 px
this.execCommand('underline');
this.execCommand('formatBlock', 'p'); // will be inserted paragraph
Defined in
nativeExecCommand
nativeExecCommand(command
, showUI?
, value?
): boolean
Exec native command
Parameters
Name | Type |
---|---|
command |
string |
showUI? |
boolean |
value? |
any |
Returns
boolean
Defined in
lock
lock(name?
): boolean
Disable selecting
Parameters
Name | Type | Default value |
---|---|---|
name |
string |
'any' |
Returns
boolean
Inherited from
Defined in
unlock
unlock(): boolean
Enable selecting
Returns
boolean
Inherited from
Defined in
getMode
getMode(): Modes
Return current editor mode: Jodit.MODE_WYSIWYG, Jodit.MODE_SOURCE or Jodit.MODE_SPLIT
Returns
Defined in
isEditorMode
isEditorMode(): boolean
Returns
boolean
Defined in
getRealMode
getRealMode(): Modes
Return current real work mode. When editor in MODE_SOURCE or MODE_WYSIWYG it will
return them, but then editor in MODE_SPLIT it will return MODE_SOURCE if
Textarea(CodeMirror) focused or MODE_WYSIWYG otherwise
Returns
Example
var editor = Jodit.make('#editor');
console.log(editor.getRealMode());
Defined in
setMode
setMode(mode
): void
Set current mode
Parameters
Name | Type |
---|---|
mode |
string | number |
Returns
void
Defined in
toggleMode
toggleMode(): void
Toggle editor mode WYSIWYG to TEXTAREA(CodeMirror) to SPLIT(WYSIWYG and TEXTAREA) to again WYSIWYG
Returns
void
Example
var editor = Jodit.make('#editor');
editor.toggleMode();
Defined in
setDisabled
setDisabled(isDisabled
): void
Switch on/off the editor into the disabled state.
When disabled, the user is not able to change the editor content
This function firing the disabled
event.
Parameters
Name | Type |
---|---|
isDisabled |
boolean |
Returns
void
Defined in
getDisabled
getDisabled(): boolean
Return true if editor in disabled mode
Returns
boolean
Defined in
setReadOnly
setReadOnly(isReadOnly
): void
Switch on/off the editor into the read-only state.
When in readonly, the user is not able to change the editor content, but can still
use some editor functions (show source code, print content, or seach).
This function firing the readonly
event.
Parameters
Name | Type |
---|---|
isReadOnly |
boolean |
Returns
void
Defined in
getReadOnly
getReadOnly(): boolean
Return true if editor in read-only mode
Returns
boolean
Defined in
focus
focus(): void
Returns
void
Defined in
addPlace
addPlace(source
, options?
): void
| Promise
<any
>
Create and init current editable place
Parameters
Name | Type |
---|---|
source |
string | HTMLElement |
options? |
object |
Returns
void
| Promise
<any
>
Defined in
setCurrentPlace
setCurrentPlace(place
): void
Set current place object
Parameters
Name | Type |
---|---|
place |
IWorkPlace |
Returns
void
Defined in
fetch
fetch<Response
>(url
, options?
): Promise
<IResponse
<Response
>>
Type parameters
Name | Type |
---|---|
Response |
extends object = any |
Parameters
Name | Type |
---|---|
url |
string |
options? |
Partial <AjaxOptions > |
Returns
Defined in
destruct
destruct(): void
Jodit's Destructor. Remove editor, and return source input
Returns
void
Inherited from
Defined in
jodit/src/jodit.ts:1631