Package com.vaadin.componentfactory
Klasse EnhancedRichTextEditor
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<EnhancedRichTextEditor,String>
com.vaadin.flow.component.AbstractSinglePropertyField<EnhancedRichTextEditor,String>
com.vaadin.componentfactory.GeneratedEnhancedRichTextEditor<EnhancedRichTextEditor,String>
com.vaadin.componentfactory.EnhancedRichTextEditor
- Alle implementierten Schnittstellen:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.BlurNotifier<GeneratedEnhancedRichTextEditor<EnhancedRichTextEditor,,String>> com.vaadin.flow.component.CompositionNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.Focusable<GeneratedEnhancedRichTextEditor<EnhancedRichTextEditor,,String>> com.vaadin.flow.component.FocusNotifier<GeneratedEnhancedRichTextEditor<EnhancedRichTextEditor,,String>> com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasTheme,com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<EnhancedRichTextEditor,,String>, String> com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<EnhancedRichTextEditor,,String>, String> com.vaadin.flow.component.InputNotifier,com.vaadin.flow.component.KeyNotifier,com.vaadin.flow.data.value.HasValueChangeMode,Serializable
@Tag("vcf-enhanced-rich-text-editor")
@JsModule("./richTextEditorConnector-npm.js")
@JavaScript("./richTextEditorConnector.js")
@NpmPackage(value="@vaadin/vaadin-license-checker",
version="^2.1.2")
public class EnhancedRichTextEditor
extends GeneratedEnhancedRichTextEditor<EnhancedRichTextEditor,String>
implements com.vaadin.flow.component.HasSize, com.vaadin.flow.data.value.HasValueChangeMode, com.vaadin.flow.component.InputNotifier, com.vaadin.flow.component.KeyNotifier, com.vaadin.flow.component.CompositionNotifier
Server-side component for the
<vcf-enhanced-rich-text-editor>
component.- Autor:
- Vaadin Ltd
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic classThe internationalization properties forEnhancedRichTextEditor.static enumVon Klasse geerbte verschachtelte Klassen/Schnittstellen com.vaadin.componentfactory.GeneratedEnhancedRichTextEditor
GeneratedEnhancedRichTextEditor.AbstractMultiPlaceholderEvent<R extends GeneratedEnhancedRichTextEditor<R,?>>, GeneratedEnhancedRichTextEditor.AbstractPlaceholderEvent<R extends GeneratedEnhancedRichTextEditor<R, ?>>, GeneratedEnhancedRichTextEditor.ChangeEvent<R extends GeneratedEnhancedRichTextEditor<R, ?>>, GeneratedEnhancedRichTextEditor.PlaceholderAppearanceChangedEvent<R extends GeneratedEnhancedRichTextEditor<R, ?>>, GeneratedEnhancedRichTextEditor.PlaceholderBeforeInsertEvent<R extends GeneratedEnhancedRichTextEditor<R, ?>>, GeneratedEnhancedRichTextEditor.PlaceholderBeforeRemoveEvent<R extends GeneratedEnhancedRichTextEditor<R, ?>>, GeneratedEnhancedRichTextEditor.PlaceholderButtonClickedEvent<R extends GeneratedEnhancedRichTextEditor<R, ?>>, GeneratedEnhancedRichTextEditor.PlaceholderInsertedEvent<R extends GeneratedEnhancedRichTextEditor<R, ?>>, GeneratedEnhancedRichTextEditor.PlaceholderLeaveEvent<R extends GeneratedEnhancedRichTextEditor<R, ?>>, GeneratedEnhancedRichTextEditor.PlaceholderRemovedEvent<R extends GeneratedEnhancedRichTextEditor<R, ?>>, GeneratedEnhancedRichTextEditor.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<?>> -
Feldübersicht
Von Schnittstelle geerbte Felder com.vaadin.flow.data.value.HasValueChangeMode
DEFAULT_CHANGE_TIMEOUT -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungConstructs an emptyEnhancedRichTextEditor.EnhancedRichTextEditor(com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<EnhancedRichTextEditor, String>> listener) Constructs an emptyTextFieldwith a value change listener.EnhancedRichTextEditor(String initialValue) Constructs aEnhancedRichTextEditorwith the initial valueEnhancedRichTextEditor(String initialValue, com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<EnhancedRichTextEditor, String>> listener) Constructs an emptyEnhancedRichTextEditorwith a value change listener and an initial value. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaddCustomButton(com.vaadin.flow.component.button.Button button) Veraltet.voidaddCustomButtons(com.vaadin.flow.component.button.Button... buttons) Veraltet.useaddCustomToolbarComponents(Component...)insteadvoidaddCustomToolbarComponents(com.vaadin.flow.component.Component... components) A convenience method to add multiple custom components at one call.voidaddCustomToolbarComponentsAtIndex(int index, com.vaadin.flow.component.Component... components) A convenience method to add multiple custom components at one call.voidaddStandardToolbarButtonShortcut(EnhancedRichTextEditor.ToolbarButton toolbarButton, Number keyCode, Boolean shortKey, Boolean shiftKey, Boolean altKey) Adds a custom shortcut to a specific toolbar standard button.voidAdd text to the caret position, when the focus is in the text area.voidAdd a text to the position.voidaddToobarFocusShortcut(Number keyCode, Boolean shortKey, Boolean shiftKey, Boolean altKey) Adds a custom shortcut to focus the editor toolbar.voidaddToolbarComponents(ToolbarSlot toolbarSlot, com.vaadin.flow.component.Component... components) Adds the components to the toolbar slot.voidaddToolbarComponentsAtIndex(ToolbarSlot toolbarSlot, int index, com.vaadin.flow.component.Component... components) Adds the components to the toolbar slot.com.vaadin.flow.component.button.ButtonVeraltet.usegetToolbarComponent(ToolbarSlot, String)instead with theToolbarSlot.GROUP_CUSTOMValue of the editor presented as HTML string.getI18n()Gets the internationalization object previously set for this component.protected PlaceholdergetPlaceholder(Placeholder placeholder) For internal use only.intReturn the length of the content stripped as text.<T extends com.vaadin.flow.component.Component>
TgetToolbarComponent(ToolbarSlot toolbarSlot, String id) Returns a toolbar component with the given id from the toolbar slot.getValue()Returns the current value of the text editor in Delta format.com.vaadin.flow.data.value.ValueChangeModebooleanbooleanReturns whether whitespace indicators are currently shown.voidremoveCustomButton(com.vaadin.flow.component.button.Button button) Veraltet.useremoveToolbarComponent(ToolbarSlot, Component)instead with theToolbarSlot.GROUP_CUSTOMvoidVeraltet.useremoveToolbarComponent(ToolbarSlot, String)instead with theToolbarSlot.GROUP_CUSTOMvoidremoveToolbarComponent(ToolbarSlot toolbarSlot, com.vaadin.flow.component.Component component) Remove a custom component from the toolbar.voidremoveToolbarComponent(ToolbarSlot toolbarSlot, String id) Remove the given component from the toolbar.voidreplaceStandardToolbarButtonIcon(EnhancedRichTextEditor.ToolbarButton toolbarButton, com.vaadin.flow.component.icon.Icon icon) Allows to replace the icon of a standardtoolbar button.voidSets the internationalization properties for this component.voidsetPlacehoderAltAppearance(boolean altAppearance) voidsetPlaceholderAltAppearancePattern(String pattern) voidsetPlaceholders(Collection<Placeholder> placeholders) Set placeholders shown in the Placeholder drop down menu.voidsetShowWhitespace(boolean show) Sets whether whitespace indicators are shown in the editor.voidsetToolbarButtonsVisibility(Map<EnhancedRichTextEditor.ToolbarButton, Boolean> toolbarButtonsVisibility) Set which toolbar buttons are visible.voidSets the value of this editor.voidsetValueChangeMode(com.vaadin.flow.data.value.ValueChangeMode valueChangeMode) Von Klasse geerbte Methoden com.vaadin.componentfactory.GeneratedEnhancedRichTextEditor
addChangeListener, addPlaceholderAppearanceChangedListener, addPlaceholderBeforeInsertListener, addPlaceholderBeforeRemoveListener, addPlaceholderButtonClickedListener, addPlaceholderInsertedListener, addPlaceholderLeaveListener, addPlaceholderRemovedListener, addPlaceholderSelectedListener, addThemeVariants, focus, getHtmlValueString, getI18nJsonArray, getTabStops, isDisabledBoolean, isReadonlyBoolean, removeThemeVariants, setDisabled, setI18n, setNoRulers, setReadonly, setTabStopsVon Klasse geerbte Methoden com.vaadin.flow.component.AbstractSinglePropertyField
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEventVon Klasse geerbte Methoden com.vaadin.flow.component.AbstractField
addValueChangeListener, getEmptyValue, isEmpty, setModelValue, 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.CompositionNotifier
addCompositionEndListener, addCompositionStartListener, addCompositionUpdateListenerVon 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.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullVon 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, setRequiredIndicatorVisibleVon Schnittstelle geerbte Methoden com.vaadin.flow.data.value.HasValueChangeMode
getValueChangeTimeout, setValueChangeTimeoutVon Schnittstelle geerbte Methoden com.vaadin.flow.component.InputNotifier
addInputListenerVon Schnittstelle geerbte Methoden com.vaadin.flow.component.KeyNotifier
addKeyDownListener, addKeyDownListener, addKeyPressListener, addKeyPressListener, addKeyUpListener, addKeyUpListener
-
Konstruktordetails
-
EnhancedRichTextEditor
public EnhancedRichTextEditor()Constructs an emptyEnhancedRichTextEditor. -
EnhancedRichTextEditor
Constructs aEnhancedRichTextEditorwith the initial value- Parameter:
initialValue- the initial value- Siehe auch:
-
EnhancedRichTextEditor
public EnhancedRichTextEditor(com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<EnhancedRichTextEditor, String>> listener) Constructs an emptyTextFieldwith a value change listener.- Parameter:
listener- the value change listener- Siehe auch:
-
EnhancedRichTextEditor
public EnhancedRichTextEditor(String initialValue, com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<EnhancedRichTextEditor, String>> listener) Constructs an emptyEnhancedRichTextEditorwith a value change listener and an initial value.- Parameter:
initialValue- the initial valuelistener- the value change listener- Siehe auch:
-
-
Methodendetails
-
getI18n
Gets the internationalization object previously set for this component.Note: updating the object content that is gotten from this method will not update the lang on the component if not set back using
setI18n(RichTextEditorI18n)- Gibt zurück:
- the i18n object. It will be
null, If the i18n properties weren't set.
-
setI18n
Sets the internationalization properties for this component.- Parameter:
i18n- the internationalized properties, notnull
-
getToolbarButtonsVisibility
-
setToolbarButtonsVisibility
public void setToolbarButtonsVisibility(Map<EnhancedRichTextEditor.ToolbarButton, Boolean> toolbarButtonsVisibility) Set which toolbar buttons are visible.- Parameter:
toolbarButtonsVisibility- Map of button and boolean value. Boolean value false associated with the button means that button will be hidden.
-
getValueChangeMode
public com.vaadin.flow.data.value.ValueChangeMode getValueChangeMode()The default value is
ValueChangeMode.ON_CHANGE.- Angegeben von:
getValueChangeModein Schnittstellecom.vaadin.flow.data.value.HasValueChangeMode
-
setValueChangeMode
public void setValueChangeMode(com.vaadin.flow.data.value.ValueChangeMode valueChangeMode) - Angegeben von:
setValueChangeModein Schnittstellecom.vaadin.flow.data.value.HasValueChangeMode
-
setValue
Sets the value of this editor. Should be in Delta format. If the new value is not equal togetValue(), fires a value change event. ThrowsNullPointerException, if the value is null.Automatically detects and converts old-format deltas (containing tabs-cont, pre-tab, line-part blots) to the new embed-based tab format.
Note:
Binderwill take care of thenullconversion when integrates with the editor, as long as no new converter is defined.- Angegeben von:
setValuein Schnittstellecom.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<EnhancedRichTextEditor,String>, String> - Setzt außer Kraft:
setValuein Klassecom.vaadin.flow.component.AbstractField<EnhancedRichTextEditor,String> - Parameter:
value- the new value in Delta format, notnull
-
getValue
Returns the current value of the text editor in Delta format. By default, the empty editor will return an empty string.- Angegeben von:
getValuein Schnittstellecom.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<EnhancedRichTextEditor,String>, String> - Setzt außer Kraft:
getValuein Klassecom.vaadin.flow.component.AbstractField<EnhancedRichTextEditor,String> - Gibt zurück:
- the current value.
-
getHtmlValue
Value of the editor presented as HTML string.- Gibt zurück:
- the sanitized
htmlValueproperty from the webcomponent.
-
setShowWhitespace
public void setShowWhitespace(boolean show) Sets whether whitespace indicators are shown in the editor. When true, special characters are displayed: → (tab), ↵ (soft-break), ¶ (paragraph), ⮐ (auto-wrap).- Parameter:
show- true to show whitespace indicators
-
isShowWhitespace
public boolean isShowWhitespace()Returns whether whitespace indicators are currently shown.- Gibt zurück:
- true if whitespace indicators are visible
-
setPlaceholders
Set placeholders shown in the Placeholder drop down menu.- Parameter:
placeholders- Collection of Placeholder objects
-
getPlaceholders
@Synchronize(property="placeholders", value="placeholders-changed") public Collection<Placeholder> getPlaceholders() -
setPlaceholderAltAppearancePattern
-
getPlaceholderAltAppearancePattern
@Synchronize(property="placeholderAltAppearancePattern", value="placeholder-alt-appearance-pattern-changed") public String getPlaceholderAltAppearancePattern() -
setPlacehoderAltAppearance
public void setPlacehoderAltAppearance(boolean altAppearance) -
isPlacehoderAltAppearance
@Synchronize(property="placeholderAltAppearance", value="placeholder-alt-appearance-changed") public boolean isPlacehoderAltAppearance() -
getPlaceholder
For internal use only. Return Placeholder from the master list matching the given Placeholder by getText.- Parameter:
placeholder- The Placeholder to be searched.- Gibt zurück:
- A Placeholder
-
getTextLength
public int getTextLength()Return the length of the content stripped as text.- Gibt zurück:
- The length of the text content.
-
addText
Add a text to the position. Text will be added if position is within 0 .. length of the current value of the text area.- Parameter:
text- Text to be insertedposition- Position
-
addText
Add text to the caret position, when the focus is in the text area.- Parameter:
text- Text to be inserted
-
addCustomButton
Veraltet.useaddCustomToolbarComponents(Component...)insteadAdd a custom button to the toolbar.
This method does NOT apply any toolbar styling to the button, but will keep it "Vaadin native".- Parameter:
button- A custom button to be added, not null
-
addCustomButtons
Veraltet.useaddCustomToolbarComponents(Component...)insteadA convenience method to add multiple custom buttons at one call.
This method does NOT apply any toolbar styling to the button, but will keep it "Vaadin native".- Parameter:
buttons- Custom buttons to be added.
-
addCustomToolbarComponents
public void addCustomToolbarComponents(com.vaadin.flow.component.Component... components) A convenience method to add multiple custom components at one call. Uses theToolbarSlot.GROUP_CUSTOM.- Parameter:
components- Custom components to be added.
-
addCustomToolbarComponentsAtIndex
public void addCustomToolbarComponentsAtIndex(int index, com.vaadin.flow.component.Component... components) A convenience method to add multiple custom components at one call. Uses theToolbarSlot.GROUP_CUSTOM. The index allows to define the position of the newly added components relative to already existing ones.- Parameter:
index- indexcomponents- Custom components to be added.
-
addToolbarComponents
public void addToolbarComponents(ToolbarSlot toolbarSlot, com.vaadin.flow.component.Component... components) Adds the components to the toolbar slot. Appends the components to existing ones.- Parameter:
toolbarSlot- slot to add the components tocomponents- Components to be added
-
addToolbarComponentsAtIndex
public void addToolbarComponentsAtIndex(ToolbarSlot toolbarSlot, int index, com.vaadin.flow.component.Component... components) Adds the components to the toolbar slot. Appends the components to existing ones. The index allows to define the position of the newly added components relative to already existing ones.- Parameter:
toolbarSlot- slot to add the components tocomponents- Components to be added
-
getToolbarComponent
public <T extends com.vaadin.flow.component.Component> T getToolbarComponent(ToolbarSlot toolbarSlot, String id) Returns a toolbar component with the given id from the toolbar slot. The component must have been added using one of theaddToolbarComponentsmethods beforehand.- Typparameter:
T- return type- Parameter:
toolbarSlot- toolbar slotid- component id- Gibt zurück:
- component
-
removeToolbarComponent
Remove the given component from the toolbar. The component must have been added using one of theaddToolbarComponentsmethods beforehand.- Parameter:
id- component id
-
removeToolbarComponent
public void removeToolbarComponent(ToolbarSlot toolbarSlot, com.vaadin.flow.component.Component component) Remove a custom component from the toolbar. The component must have been added using one of theaddToolbarComponentsmethods beforehand.- Parameter:
component- The component to be removed.
-
getCustomButton
Veraltet.usegetToolbarComponent(ToolbarSlot, String)instead with theToolbarSlot.GROUP_CUSTOMGet the custom button using its id.- Parameter:
id- Id as a string- Gibt zurück:
- A button
-
removeCustomButton
Veraltet.useremoveToolbarComponent(ToolbarSlot, String)instead with theToolbarSlot.GROUP_CUSTOMRemove the given button from the toolbar.- Parameter:
id- Id as a string.
-
removeCustomButton
Veraltet.useremoveToolbarComponent(ToolbarSlot, Component)instead with theToolbarSlot.GROUP_CUSTOMRemove a custom button from the toolbar.- Parameter:
button- The button to be removed.
-
addStandardToolbarButtonShortcut
public void addStandardToolbarButtonShortcut(EnhancedRichTextEditor.ToolbarButton toolbarButton, Number keyCode, Boolean shortKey, Boolean shiftKey, Boolean altKey) Adds a custom shortcut to a specific toolbar standard button.- Parameter:
toolbarButton- The toolbar button to add the shortcut to.keyCode- The key code for the new shortcut.shortKey- True if modifier ctrl is part of the shortcut.shiftKey- True if modifier shift is part of the shortcut.altKey- True if modifier alt is part of the shortcut.
-
addToobarFocusShortcut
public void addToobarFocusShortcut(Number keyCode, Boolean shortKey, Boolean shiftKey, Boolean altKey) Adds a custom shortcut to focus the editor toolbar.- Parameter:
keyCode- The key code for the new shortcut.shortKey- True if modifier ctrl is part of the shortcut.shiftKey- True if modifier shift is part of the shortcut.altKey- True if modifier alt is part of the shortcut.
-
replaceStandardToolbarButtonIcon
public void replaceStandardToolbarButtonIcon(EnhancedRichTextEditor.ToolbarButton toolbarButton, com.vaadin.flow.component.icon.Icon icon) Allows to replace the icon of a standardtoolbar button.- Parameter:
toolbarButton- toolbar button to replace iconicon- replacement icon
-
addCustomToolbarComponents(Component...)instead