Class VaadinCKEditor
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.customfield.CustomField<String>>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<com.vaadin.flow.component.customfield.CustomField<String>>, com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.customfield.CustomField<String>>, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasHelper, com.vaadin.flow.component.HasLabel, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.HasValidation, com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<String>, String>, String>, com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<String>, String>, String>, com.vaadin.flow.component.shared.HasTooltip, com.vaadin.flow.component.shared.HasValidationProperties, com.vaadin.flow.component.shared.InputField<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<String>, String>, String>, HasConfig, Serializable
@Tag("vaadin-ckeditor")
@JsModule("./vaadin-ckeditor-utils.min.js") @JsModule("./vaadin-ckeditor.min.js") @JsModule("./translations/af.js") @JsModule("./translations/ar.js") @JsModule("./translations/ast.js") @JsModule("./translations/az.js") @JsModule("./translations/bg.js") @JsModule("./translations/bn.js") @JsModule("./translations/bs.js") @JsModule("./translations/ca.js") @JsModule("./translations/cs.js") @JsModule("./translations/da.js") @JsModule("./translations/de.js") @JsModule("./translations/de-ch.js") @JsModule("./translations/el.js") @JsModule("./translations/en-au.js") @JsModule("./translations/en-gb.js") @JsModule("./translations/eo.js") @JsModule("./translations/es.js") @JsModule("./translations/es-co.js") @JsModule("./translations/et.js") @JsModule("./translations/eu.js") @JsModule("./translations/fa.js") @JsModule("./translations/fi.js") @JsModule("./translations/fr.js") @JsModule("./translations/gl.js") @JsModule("./translations/gu.js") @JsModule("./translations/hi.js") @JsModule("./translations/he.js") @JsModule("./translations/hr.js") @JsModule("./translations/hu.js") @JsModule("./translations/id.js") @JsModule("./translations/it.js") @JsModule("./translations/ja.js") @JsModule("./translations/jv.js") @JsModule("./translations/km.js") @JsModule("./translations/kn.js") @JsModule("./translations/ko.js") @JsModule("./translations/ku.js") @JsModule("./translations/lt.js") @JsModule("./translations/lv.js") @JsModule("./translations/ms.js") @JsModule("./translations/nb.js") @JsModule("./translations/ne.js") @JsModule("./translations/nl.js") @JsModule("./translations/no.js") @JsModule("./translations/oc.js") @JsModule("./translations/pl.js") @JsModule("./translations/pt.js") @JsModule("./translations/pt-br.js") @JsModule("./translations/ro.js") @JsModule("./translations/ru.js") @JsModule("./translations/si.js") @JsModule("./translations/sk.js") @JsModule("./translations/sl.js") @JsModule("./translations/sq.js") @JsModule("./translations/sr.js") @JsModule("./translations/sr-latn.js") @JsModule("./translations/sv.js") @JsModule("./translations/th.js") @JsModule("./translations/tk.js") @JsModule("./translations/tr.js") @JsModule("./translations/tt.js") @JsModule("./translations/ug.js") @JsModule("./translations/uz.js") @JsModule("./translations/uk.js") @JsModule("./translations/ur.js") @JsModule("./translations/vi.js") @JsModule("./translations/zh.js") @JsModule("./translations/zh-cn.js")
@CssImport("./styles.css") @CssImport("./ckeditor.css")
@NpmPackage(value="lit",
version="^3.2.1")
public class VaadinCKEditor
extends com.vaadin.flow.component.customfield.CustomField<String>
implements HasConfig
Used in @VaadinCKEditorBuilder.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField
com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C,V> Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C>Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C>Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue
com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E> -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidenableGHS(boolean enabled) protected StringgetId()getValue()Get content of editor.voidinsertText(String text) booleanvoidisSynchronizd(boolean sync) voidsanitizeHtml(String editorData, Constants.SanitizeType type) voidvoidvoidsetHideToolbar(boolean hideToolbar) voidprotected voidsetModelValue(String value, boolean fromClient) voidsetOverrideCssUrl(String overrideCssUrl) protected voidsetPresentationValue(String newPresentationValue) voidsetReadOnly(boolean readOnly) voidsetReadOnlyWithToolbarAction(boolean readOnly) voidSet value of editor.voidMethods inherited from class com.vaadin.flow.component.customfield.CustomField
add, addThemeVariants, getLabel, remove, removeThemeVariants, setLabel, updateValueMethods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getEmptyValue, isEmpty, valueEqualsMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setVisibleMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, focus, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasHelper
getHelperComponent, getHelperText, setHelperComponent, setHelperTextMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipMarkdown, setTooltipTextMethods inherited from interface com.vaadin.flow.component.HasValidation
setManualValidationMethods inherited from interface com.vaadin.flow.component.shared.HasValidationProperties
getErrorMessage, isInvalid, setErrorMessage, setInvalidMethods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, getEmptyValue, getOptionalValue, isEmptyMethods inherited from interface com.vaadin.flow.component.HasValueAndElement
isRequiredIndicatorVisible, setRequiredIndicatorVisible
-
Method Details
-
generateModelValue
-
setPresentationValue
-
setId
- Overrides:
setIdin classcom.vaadin.flow.component.Component
-
getId
-
getValue
Get content of editor.- Specified by:
getValuein interfacecom.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<String>, String>, String>- Overrides:
getValuein classcom.vaadin.flow.component.AbstractField<com.vaadin.flow.component.customfield.CustomField<String>, String>- Returns:
- Data in editor text area.
-
setValue
Set value of editor. Together with calling updateValue method to refresh editor content- Specified by:
setValuein interfacecom.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<String>, String>, String>- Overrides:
setValuein classcom.vaadin.flow.component.AbstractField<com.vaadin.flow.component.customfield.CustomField<String>, String>- Parameters:
value- Data in editor text area.
-
setModelValue
-
minimap
- Parameters:
enabled- if minimap is enabled. This only works for decoupled editor.
-
setWidth
- Specified by:
setWidthin interfacecom.vaadin.flow.component.HasSize- Parameters:
editorWidth- Width of editor, default value is 'auto'.
-
setHeight
- Specified by:
setHeightin interfacecom.vaadin.flow.component.HasSize- Parameters:
editorHeight- Height of editor, default value is 'auto'.
-
setReadOnly
public void setReadOnly(boolean readOnly) - Specified by:
setReadOnlyin interfacecom.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<String>, String>, String>- Specified by:
setReadOnlyin interfacecom.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<String>, String>, String>- Parameters:
readOnly- Make editor readonly
-
enableGHS
public void enableGHS(boolean enabled) -
isSynchronizd
public void isSynchronizd(boolean sync) -
setReadOnlyWithToolbarAction
public void setReadOnlyWithToolbarAction(boolean readOnly) -
setHideToolbar
public void setHideToolbar(boolean hideToolbar) -
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnlyin interfacecom.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<String>, String>, String>- Specified by:
isReadOnlyin interfacecom.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<String>, String>, String>
-
clear
-
setConfig
-
sanitizeHtml
-
insertText
-
getContentText
- Returns:
- content without html tags
-
setOverrideCssUrl
-