Form UI Element
Component for creating form interfaces.
import { UIForm, UIInput, UIBlock } from 'jodit/core/ui';
const form = new UIForm(jodit, [
new UIInput(editor, {
required: true,
label: 'URL',
name: 'url',
type: 'text',
placeholder: 'https://'
}),
new UIInput(editor, {
name: 'text',
label: 'Alternative text'
}),
new UIBlock(editor, [button])
]);
Classes
required
required(input
): boolean
Input is required
Parameters
Name | Type |
---|---|
input |
IUIInput |
Returns
boolean
Defined in
src/core/ui/form/validators/input.ts#18
url
url(input
): boolean
Input value should be valid URL
Parameters
Name | Type |
---|---|
input |
IUIInput |
Returns
boolean
Defined in
src/core/ui/form/validators/input.ts#30
required
required(input
): boolean
Select is required
Parameters
Name | Type |
---|---|
input |
IUIInput |
Returns
boolean
Defined in
jodit/src/core/ui/form/validators/select.ts:17