@serenity-is/corelib / HtmlContentEditor
Class: HtmlContentEditor<P>
Type parameters
Name | Type |
---|---|
P |
extends HtmlContentEditorOptions = HtmlContentEditorOptions |
Hierarchy
EditorWidget
<P
>↳
HtmlContentEditor
Implements
Table of contents
Constructors
Properties
Accessors
Methods
- addCssClass
- addValidationRule
- change
- changeSelect2
- destroy
- getConfig
- getCssClass
- getCustomAttribute
- getEditorInstance
- getFieldElement
- getGridField
- getLanguage
- get_readOnly
- get_value
- init
- instanceReady
- internalInit
- internalRenderContents
- render
- renderContents
- set_readOnly
- set_value
- syncOrAsyncThen
- useIdPrefix
- create
- createDefaultElement
- getCKEditorBasePath
- getWidgetName
- includeCKEditor
Constructors
constructor
• new HtmlContentEditor<P
>(props
): HtmlContentEditor
<P
>
Type parameters
Name | Type |
---|---|
P |
extends HtmlContentEditorOptions = HtmlContentEditorOptions |
Parameters
Name | Type |
---|---|
props |
EditorProps <P > |
Returns
Overrides
Defined in
src/ui/editors/htmlcontenteditor.ts:25
Properties
domNode
• Readonly
domNode: HTMLTextAreaElement
Overrides
Defined in
src/ui/editors/htmlcontenteditor.ts:21
idPrefix
• Readonly
idPrefix: string
Inherited from
Defined in
options
• Protected
Readonly
options: WidgetProps
<EditorProps
<P
>>
Inherited from
Defined in
uniqueName
• Protected
Readonly
uniqueName: string
Inherited from
Defined in
CKEditorBasePath
▪ Static
CKEditorBasePath: string
Defined in
src/ui/editors/htmlcontenteditor.ts:198
CKEditorVer
▪ Static
CKEditorVer: string
= "4.22.1"
Defined in
src/ui/editors/htmlcontenteditor.ts:197
typeInfo
▪ Static
typeInfo: ClassTypeInfo
<"Serenity.EditorWidget"
>
Inherited from
Defined in
Accessors
element
• get
element(): Fluent
<HTMLElement
>
Returns a Fluent(this.domNode) object
Returns
Fluent
<HTMLElement
>
Inherited from
EditorWidget.element
Defined in
props
• get
props(): WidgetProps
<P
>
Returns
WidgetProps
<P
>
Inherited from
EditorWidget.props
Defined in
value
• get
value(): string
Returns
string
Defined in
src/ui/editors/htmlcontenteditor.ts:162
• set
value(v
): void
Parameters
Name | Type |
---|---|
v |
string |
Returns
void
Defined in
src/ui/editors/htmlcontenteditor.ts:173
Methods
addCssClass
▸ addCssClass(): void
Returns
void
Inherited from
Defined in
addValidationRule
▸ addValidationRule(rule
, uniqueName?
): void
Parameters
Name | Type |
---|---|
rule |
(input : HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement ) => string |
uniqueName? |
string |
Returns
void
Inherited from
EditorWidget.addValidationRule
Defined in
▸ addValidationRule(uniqueName
, rule
): void
Parameters
Name | Type |
---|---|
uniqueName |
string |
rule |
(input : HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement ) => string |
Returns
void
Inherited from
EditorWidget.addValidationRule
Defined in
change
▸ change(handler
): void
Parameters
Name | Type |
---|---|
handler |
(e : Event ) => void |
Returns
void
Inherited from
Defined in
changeSelect2
▸ changeSelect2(handler
): void
Parameters
Name | Type |
---|---|
handler |
(e : Event ) => void |
Returns
void
Inherited from
Defined in
destroy
▸ destroy(): void
Returns
void
Overrides
Defined in
src/ui/editors/htmlcontenteditor.ts:146
getConfig
▸ getConfig(): CKEditorConfig
Returns
Defined in
src/ui/editors/htmlcontenteditor.ts:91
getCssClass
▸ getCssClass(): string
Returns
string
Inherited from
Defined in
getCustomAttribute
▸ getCustomAttribute<TAttr
>(attrType
, inherit?
): TAttr
Type parameters
Name |
---|
TAttr |
Parameters
Name | Type | Default value |
---|---|---|
attrType |
(...args : any []) => TAttr |
undefined |
inherit |
boolean |
true |
Returns
TAttr
Inherited from
EditorWidget.getCustomAttribute
Defined in
getEditorInstance
▸ getEditorInstance(): any
Returns
any
Defined in
src/ui/editors/htmlcontenteditor.ts:141
getFieldElement
▸ getFieldElement(): HTMLElement
Returns
HTMLElement
Inherited from
Defined in
getGridField
▸ getGridField(): Fluent
<HTMLElement
>
Returns
Fluent
<HTMLElement
>
Inherited from
Defined in
getLanguage
▸ getLanguage(): string
Returns
string
Defined in
src/ui/editors/htmlcontenteditor.ts:72
get_readOnly
▸ get_readOnly(): boolean
Returns
boolean
Implementation of
Defined in
src/ui/editors/htmlcontenteditor.ts:177
get_value
▸ get_value(): string
Returns
string
Implementation of
Defined in
src/ui/editors/htmlcontenteditor.ts:152
init
▸ init(): this
Returns
this
Inherited from
Defined in
instanceReady
▸ instanceReady(x
): void
Parameters
Name | Type |
---|---|
x |
any |
Returns
void
Defined in
src/ui/editors/htmlcontenteditor.ts:60
internalInit
▸ internalInit(): void
Returns
void
Inherited from
Defined in
internalRenderContents
▸ internalRenderContents(): void
Returns
void
Inherited from
EditorWidget.internalRenderContents
Defined in
render
▸ render(): any
Returns the main element for this widget or the document fragment. As widgets may get their elements from props unlike regular JSX widgets, this method should not be overridden. Override renderContents() instead.
Returns
any
Inherited from
Defined in
renderContents
▸ renderContents(): any
Returns
any
Inherited from
Defined in
set_readOnly
▸ set_readOnly(value
): void
Parameters
Name | Type |
---|---|
value |
boolean |
Returns
void
Implementation of
Defined in
src/ui/editors/htmlcontenteditor.ts:181
set_value
▸ set_value(value
): void
Parameters
Name | Type |
---|---|
value |
string |
Returns
void
Implementation of
Defined in
src/ui/editors/htmlcontenteditor.ts:166
syncOrAsyncThen
▸ syncOrAsyncThen<T
>(syncMethod
, asyncMethod
, then
): void
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
syncMethod |
() => T |
asyncMethod |
() => PromiseLike <T > |
then |
(v : T ) => void |
Returns
void
Inherited from
Defined in
useIdPrefix
▸ useIdPrefix(): IdPrefixType
Returns
Inherited from
Defined in
create
▸ create<TWidget
, P
>(params
): TWidget
Type parameters
Name | Type |
---|---|
TWidget |
extends Widget <P > |
P |
P |
Parameters
Name | Type |
---|---|
params |
CreateWidgetParams <TWidget , P > |
Returns
TWidget
Inherited from
Defined in
createDefaultElement
▸ createDefaultElement(): HTMLTextAreaElement
Returns
HTMLTextAreaElement
Overrides
EditorWidget.createDefaultElement
Defined in
src/ui/editors/htmlcontenteditor.ts:23
getCKEditorBasePath
▸ getCKEditorBasePath(): string
Returns
string
Defined in
src/ui/editors/htmlcontenteditor.ts:200
getWidgetName
▸ getWidgetName(type
): string
Parameters
Name | Type |
---|---|
type |
Function |
Returns
string
Inherited from
Defined in
includeCKEditor
▸ includeCKEditor(then
): void
Parameters
Name | Type |
---|---|
then |
() => void |
Returns
void