Klasse GeneratedEnhancedRichTextEditor<R extends GeneratedEnhancedRichTextEditor<R,T>,T>
- Alle implementierten Schnittstellen:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.BlurNotifier<GeneratedEnhancedRichTextEditor<R,,T>> com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.Focusable<GeneratedEnhancedRichTextEditor<R,,T>> com.vaadin.flow.component.FocusNotifier<GeneratedEnhancedRichTextEditor<R,,T>> com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasTheme,com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<R,,T>, T> com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<R,,T>, T> Serializable
- Bekannte direkte Unterklassen:
EnhancedRichTextEditor
Description copied from corresponding location in WebComponent:
<vcf-enhanced-rich-text-editor> is a Web Component for rich text
editing. It provides a set of toolbar controls to apply formatting on the
content, which is stored and can be accessed as HTML5 or JSON string.
<vcf-enhanced-rich-text-editor></vcf-enhanced-rich-text-editor>
Vaadin Rich Text Editor focuses on the structure, not the styling of content. Therefore, the semantic HTML5 tags and CSS usage is limited to most common cases, like horizontal text alignment.
StylingThe following state attributes are available for styling:
| Attribute | Description | Part name |
|---|---|---|
disabled |
Set to a disabled text editor | :host |
readonly |
Set to a readonly text editor | :host |
The following shadow DOM parts are available for styling:
| Part name | Description |
|---|---|
toolbar |
The toolbar wrapper |
content |
The content wrapper |
group |
The group for toolbar controls |
undo-button |
The "undo" button |
redo-button |
The "redo" button |
bold-button |
The "bold" button |
italic-button |
The "italic" button |
underline-button |
The "underline" button |
strike-button |
The "strike-through" button |
h1-button |
The "header 1" button |
h2-button |
The "header 2" button |
h3-button |
The "header 3" button |
subscript-button |
The "subscript" button |
superscript-button |
The "superscript" button |
list-ordered-button |
The "ordered list" button |
list-bullet-button |
The "bullet list" button |
align-left-button |
The "left align" button |
align-center-button |
The "center align" button |
align-right-button |
The "right align" button |
image-button |
The "image" button |
blockquote-button |
The "blockquote" button |
code-block-button |
The "code block" button |
readonly-button |
The "readonly" button |
clean-button |
The "clean formatting" button |
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic classGeneratedEnhancedRichTextEditor.AbstractMultiPlaceholderEvent<R extends GeneratedEnhancedRichTextEditor<R,?>> static classGeneratedEnhancedRichTextEditor.AbstractPlaceholderEvent<R extends GeneratedEnhancedRichTextEditor<R,?>> static classstatic classGeneratedEnhancedRichTextEditor.PlaceholderAppearanceChangedEvent<R extends GeneratedEnhancedRichTextEditor<R,?>> static classGeneratedEnhancedRichTextEditor.PlaceholderBeforeInsertEvent<R extends GeneratedEnhancedRichTextEditor<R,?>> static classGeneratedEnhancedRichTextEditor.PlaceholderBeforeRemoveEvent<R extends GeneratedEnhancedRichTextEditor<R,?>> static classGeneratedEnhancedRichTextEditor.PlaceholderButtonClickedEvent<R extends GeneratedEnhancedRichTextEditor<R,?>> static classGeneratedEnhancedRichTextEditor.PlaceholderInsertedEvent<R extends GeneratedEnhancedRichTextEditor<R,?>> static classGeneratedEnhancedRichTextEditor.PlaceholderLeaveEvent<R extends GeneratedEnhancedRichTextEditor<R,?>> static classGeneratedEnhancedRichTextEditor.PlaceholderRemovedEvent<R extends GeneratedEnhancedRichTextEditor<R,?>> static classGeneratedEnhancedRichTextEditor.PlaceholderSelectedEvent<R extends GeneratedEnhancedRichTextEditor<R,?>> Von Klasse geerbte verschachtelte Klassen/Schnittstellen com.vaadin.flow.component.AbstractField
com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V> Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen com.vaadin.flow.component.HasValue
com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>> -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDefault constructor.GeneratedEnhancedRichTextEditor(T initialValue, T defaultValue, boolean acceptNullValues) Constructs a new GeneratedEnhancedRichTextEditor component with the given arguments.GeneratedEnhancedRichTextEditor(T initialValue, T defaultValue, Class<P> elementPropertyType, com.vaadin.flow.function.SerializableBiFunction<R, P, T> presentationToModel, com.vaadin.flow.function.SerializableBiFunction<R, T, P> modelToPresentation) Constructs a new GeneratedEnhancedRichTextEditor component with the given arguments.GeneratedEnhancedRichTextEditor(T initialValue, T defaultValue, Class<P> elementPropertyType, com.vaadin.flow.function.SerializableFunction<P, T> presentationToModel, com.vaadin.flow.function.SerializableFunction<T, P> modelToPresentation) Constructs a new GeneratedEnhancedRichTextEditor component with the given arguments. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected com.vaadin.flow.shared.RegistrationaddChangeListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.ChangeEvent<R>> listener) Adds a listener forchangeevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddPlaceholderAppearanceChangedListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderAppearanceChangedEvent<R>> listener) Adds a listener forPlaceholderAppearanceChangedEventevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddPlaceholderBeforeInsertListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderBeforeInsertEvent<R>> listener) Adds a listener forPlaceholderBeforeInsertEventevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddPlaceholderBeforeRemoveListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderBeforeRemoveEvent<R>> listener) Adds a listener forPlaceholderBeforeRemoveEventevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddPlaceholderButtonClickedListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderButtonClickedEvent<R>> listener) Adds a listener forPlaceholderButtonClickedEventevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddPlaceholderInsertedListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderInsertedEvent<R>> listener) Adds a listener forPlaceholderInsertedEventevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddPlaceholderLeaveListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderLeaveEvent<R>> listener) Adds a listener forPlaceholderAppearanceChangedEventevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddPlaceholderRemovedListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderRemovedEvent<R>> listener) Adds a listener forPlaceholderRemovedEventevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddPlaceholderSelectedListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderSelectedEvent<R>> listener) Adds a listener forPlaceholderSelectedEventevents fired by the webcomponent.voidaddThemeVariants(EnhancedRichTextEditorVariant... variants) Adds theme variants to the component.voidfocus()protected StringDescription copied from corresponding location in WebComponent:protected elemental.json.JsonArrayDescription copied from corresponding location in WebComponent:protected booleanDescription copied from corresponding location in WebComponent:protected booleanDescription copied from corresponding location in WebComponent:voidremoveThemeVariants(EnhancedRichTextEditorVariant... variants) Removes theme variants from the component.protected voidsetDisabled(boolean disabled) Description copied from corresponding location in WebComponent:protected voidsetI18n(elemental.json.JsonArray i18n) Description copied from corresponding location in WebComponent:voidsetNoRulers(boolean noRulers) Description copied from corresponding location in WebComponent:protected voidsetReadonly(boolean readonly) Description copied from corresponding location in WebComponent:voidsetTabStops(List<TabStop> tabStops) Von Klasse geerbte Methoden com.vaadin.flow.component.AbstractSinglePropertyField
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEventVon Klasse geerbte Methoden com.vaadin.flow.component.AbstractField
addValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsVon Klasse geerbte Methoden com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden com.vaadin.flow.component.AttachNotifier
addAttachListenerVon Schnittstelle geerbte Methoden com.vaadin.flow.component.BlurNotifier
addBlurListenerVon Schnittstelle geerbte Methoden com.vaadin.flow.component.DetachNotifier
addDetachListenerVon Schnittstelle geerbte Methoden com.vaadin.flow.component.Focusable
addFocusShortcut, blur, getTabIndex, setTabIndexVon Schnittstelle geerbte Methoden com.vaadin.flow.component.FocusNotifier
addFocusListenerVon Schnittstelle geerbte Methoden com.vaadin.flow.component.HasElement
getElementVon Schnittstelle geerbte Methoden com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledVon Schnittstelle geerbte Methoden com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameVon Schnittstelle geerbte Methoden com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameVon Schnittstelle geerbte Methoden com.vaadin.flow.component.HasValue
clear, getOptionalValueVon Schnittstelle geerbte Methoden com.vaadin.flow.component.HasValueAndElement
isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible
-
Konstruktordetails
-
GeneratedEnhancedRichTextEditor
public GeneratedEnhancedRichTextEditor(T initialValue, T defaultValue, Class<P> elementPropertyType, com.vaadin.flow.function.SerializableFunction<P, T> presentationToModel, com.vaadin.flow.function.SerializableFunction<T, P> modelToPresentation) Constructs a new GeneratedEnhancedRichTextEditor component with the given arguments.- Typparameter:
P- the property type- Parameter:
initialValue- the initial value to set to the valuedefaultValue- the default value to use if the value isn't definedelementPropertyType- the type of the element propertypresentationToModel- a function that converts a string value to a model valuemodelToPresentation- a function that converts a model value to a string value
-
GeneratedEnhancedRichTextEditor
Constructs a new GeneratedEnhancedRichTextEditor component with the given arguments.- Parameter:
initialValue- the initial value to set to the valuedefaultValue- the default value to use if the value isn't definedacceptNullValues- whethernullis accepted as a model value
-
GeneratedEnhancedRichTextEditor
public GeneratedEnhancedRichTextEditor(T initialValue, T defaultValue, Class<P> elementPropertyType, com.vaadin.flow.function.SerializableBiFunction<R, P, T> presentationToModel, com.vaadin.flow.function.SerializableBiFunction<R, T, P> modelToPresentation) Constructs a new GeneratedEnhancedRichTextEditor component with the given arguments.- Typparameter:
P- the property type- Parameter:
initialValue- the initial value to set to the valuedefaultValue- the default value to use if the value isn't definedelementPropertyType- the type of the element propertypresentationToModel- a function that accepts this component and a property value and returns a model valuemodelToPresentation- a function that accepts this component and a model value and returns a property value
-
GeneratedEnhancedRichTextEditor
public GeneratedEnhancedRichTextEditor()Default constructor.
-
-
Methodendetails
-
addThemeVariants
Adds theme variants to the component.- Parameter:
variants- theme variants to add
-
removeThemeVariants
Removes theme variants from the component.- Parameter:
variants- theme variants to remove
-
setTabStops
-
getTabStops
-
getHtmlValueString
@Synchronize(property="htmlValue", value="html-value-changed") protected String getHtmlValueString()Description copied from corresponding location in WebComponent:
HTML representation of the rich text editor content.
This property is synchronized automatically from client side when a 'html-value-changed' event happens.
- Gibt zurück:
- the
htmlValueproperty from the webcomponent
-
isDisabledBoolean
protected boolean isDisabledBoolean()Description copied from corresponding location in WebComponent:
When true, the user can not modify, nor copy the editor content.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Gibt zurück:
- the
disabledproperty from the webcomponent
-
setDisabled
protected void setDisabled(boolean disabled) Description copied from corresponding location in WebComponent:
When true, the user can not modify, nor copy the editor content.
- Parameter:
disabled- the boolean value to set
-
setNoRulers
public void setNoRulers(boolean noRulers) Description copied from corresponding location in WebComponent:
When true, the horizontal and vertical rulers are not visible.
- Parameter:
noRulers- the boolean value to set
-
isReadonlyBoolean
protected boolean isReadonlyBoolean()Description copied from corresponding location in WebComponent:
When true, the user can not modify the editor content, but can copy it.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Gibt zurück:
- the
readonlyproperty from the webcomponent
-
setReadonly
protected void setReadonly(boolean readonly) Description copied from corresponding location in WebComponent:
When true, the user can not modify the editor content, but can copy it.
- Parameter:
readonly- the boolean value to set
-
getI18nJsonArray
protected elemental.json.JsonArray getI18nJsonArray()Description copied from corresponding location in WebComponent:
An object used to localize this component. The properties are used e.g. as the tooltips for the editor toolbar buttons.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Gibt zurück:
- the
i18nproperty from the webcomponent
-
setI18n
protected void setI18n(elemental.json.JsonArray i18n) Description copied from corresponding location in WebComponent:
An object used to localize this component. The properties are used e.g. as the tooltips for the editor toolbar buttons.
- Parameter:
i18n- the JsonArray value to set
-
addChangeListener
protected com.vaadin.flow.shared.Registration addChangeListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.ChangeEvent<R>> listener) Adds a listener forchangeevents fired by the webcomponent.- Parameter:
listener- the listener- Gibt zurück:
- a
Registrationfor removing the event listener
-
addPlaceholderBeforeRemoveListener
protected com.vaadin.flow.shared.Registration addPlaceholderBeforeRemoveListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderBeforeRemoveEvent<R>> listener) Adds a listener forPlaceholderBeforeRemoveEventevents fired by the webcomponent.- Parameter:
listener- the listener- Gibt zurück:
- a
Registrationfor removing the event listener
-
addPlaceholderBeforeInsertListener
protected com.vaadin.flow.shared.Registration addPlaceholderBeforeInsertListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderBeforeInsertEvent<R>> listener) Adds a listener forPlaceholderBeforeInsertEventevents fired by the webcomponent.- Parameter:
listener- the listener- Gibt zurück:
- a
Registrationfor removing the event listener
-
addPlaceholderRemovedListener
protected com.vaadin.flow.shared.Registration addPlaceholderRemovedListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderRemovedEvent<R>> listener) Adds a listener forPlaceholderRemovedEventevents fired by the webcomponent.- Parameter:
listener- the listener- Gibt zurück:
- a
Registrationfor removing the event listener
-
addPlaceholderButtonClickedListener
protected com.vaadin.flow.shared.Registration addPlaceholderButtonClickedListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderButtonClickedEvent<R>> listener) Adds a listener forPlaceholderButtonClickedEventevents fired by the webcomponent.- Parameter:
listener- the listener- Gibt zurück:
- a
Registrationfor removing the event listener
-
addPlaceholderInsertedListener
protected com.vaadin.flow.shared.Registration addPlaceholderInsertedListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderInsertedEvent<R>> listener) Adds a listener forPlaceholderInsertedEventevents fired by the webcomponent.- Parameter:
listener- the listener- Gibt zurück:
- a
Registrationfor removing the event listener
-
addPlaceholderSelectedListener
protected com.vaadin.flow.shared.Registration addPlaceholderSelectedListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderSelectedEvent<R>> listener) Adds a listener forPlaceholderSelectedEventevents fired by the webcomponent.- Parameter:
listener- the listener- Gibt zurück:
- a
Registrationfor removing the event listener
-
addPlaceholderLeaveListener
protected com.vaadin.flow.shared.Registration addPlaceholderLeaveListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderLeaveEvent<R>> listener) Adds a listener forPlaceholderAppearanceChangedEventevents fired by the webcomponent.- Parameter:
listener- the listener- Gibt zurück:
- a
Registrationfor removing the event listener
-
addPlaceholderAppearanceChangedListener
protected com.vaadin.flow.shared.Registration addPlaceholderAppearanceChangedListener(com.vaadin.flow.component.ComponentEventListener<GeneratedEnhancedRichTextEditor.PlaceholderAppearanceChangedEvent<R>> listener) Adds a listener forPlaceholderAppearanceChangedEventevents fired by the webcomponent.- Parameter:
listener- the listener- Gibt zurück:
- a
Registrationfor removing the event listener
-
focus
public void focus()- Angegeben von:
focusin Schnittstellecom.vaadin.flow.component.Focusable<R extends GeneratedEnhancedRichTextEditor<R,T>>
-