Class MarkdownEditor
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<C>
com.vaadin.flow.component.AbstractCompositeField<com.flowingcode.vaadin.addons.markdown.MarkdownEditorComponent,MarkdownEditor,String>
com.flowingcode.vaadin.addons.markdown.MarkdownEditor
- All Implemented Interfaces:
AttachNotifier,DetachNotifier,HasElement,HasEnabled,HasSize,HasStyle,HasValue<AbstractField.ComponentValueChangeEvent<MarkdownEditor,,String>, String> HasValueAndElement<AbstractField.ComponentValueChangeEvent<MarkdownEditor,,String>, String> Serializable
public class MarkdownEditor
extends AbstractCompositeField<com.flowingcode.vaadin.addons.markdown.MarkdownEditorComponent,MarkdownEditor,String>
implements HasSize
Markdown component that allows editing the contents.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue
HasValue.ValueChangeEvent<V extends Object>, HasValue.ValueChangeListener<E extends HasValue.ValueChangeEvent<?>> -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with empty content.MarkdownEditor(String initialValue) Constructor with initial value. -
Method Summary
Modifier and TypeMethodDescriptionprotected final com.flowingcode.vaadin.addons.markdown.MarkdownEditorComponentReturns the editor component.intReturns the configured maximum character count for the Markdown editor.Returns the placeholder text for the Markdown editor.protected com.flowingcode.vaadin.addons.markdown.MarkdownEditorComponentvoidsetMaxLength(int maxLength) Sets the maximum character count for the Markdown editor.voidsetPlaceholder(String placeholder) Sets the placeholder text for the Markdown editor.protected voidsetPresentationValue(String newPresentationValue) Methods inherited from class com.vaadin.flow.component.AbstractCompositeField
addValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsMethods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, 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, setVisibleMethods inherited from class java.lang.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.DetachNotifier
addDetachListenerMethods 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.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, 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.HasValue
clear, getOptionalValueMethods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible
-
Constructor Details
-
MarkdownEditor
public MarkdownEditor()Constructor with empty content. -
MarkdownEditor
Constructor with initial value.- Parameters:
initialValue- the initial content for the Markdown editor
-
-
Method Details
-
initContent
protected com.flowingcode.vaadin.addons.markdown.MarkdownEditorComponent initContent()- Overrides:
initContentin classComposite<com.flowingcode.vaadin.addons.markdown.MarkdownEditorComponent>
-
getEditor
protected final com.flowingcode.vaadin.addons.markdown.MarkdownEditorComponent getEditor()Returns the editor component.- Returns:
- the editor component
-
getPlaceholder
Returns the placeholder text for the Markdown editor.- Returns:
- the placeholder text
-
setPlaceholder
Sets the placeholder text for the Markdown editor.- Parameters:
placeholder- the placeholder text
-
getMaxLength
public int getMaxLength()Returns the configured maximum character count for the Markdown editor.- Returns:
- the configured maximum character count
-
setMaxLength
public void setMaxLength(int maxLength) Sets the maximum character count for the Markdown editor.- Parameters:
maxLength- the maximum character count
-
setPresentationValue
- Specified by:
setPresentationValuein classAbstractCompositeField<com.flowingcode.vaadin.addons.markdown.MarkdownEditorComponent,MarkdownEditor, String>
-