Class MarkdownEditor
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.react.ReactAdapterComponent
com.flowingcode.vaadin.addons.markdown.BaseMarkdownComponent
com.flowingcode.vaadin.addons.markdown.MarkdownEditor
- All Implemented Interfaces:
AttachNotifier,DetachNotifier,HasElement,HasSize,HasStyle,Serializable
@NpmPackage(value="rehype-sanitize",
version="6.0.0")
@JsModule("./markdown-editor.tsx")
@Tag("markdown-editor")
public class MarkdownEditor
extends BaseMarkdownComponent
Markdown component that allows editing the contents.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.flowingcode.vaadin.addons.markdown.BaseMarkdownComponent
BaseMarkdownComponent.DataColorMode -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with empty content.MarkdownEditor(String content) Constructor with default content. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the configured maximum character count for the Markdown editor.Returns the placeholder text for the Markdown editor.voidsetMaxLength(int maxlength) Sets the maximum character count for the Markdown editor.voidsetPlaceholder(String placeholder) Sets the placeholder text for the Markdown editor.Methods inherited from class com.flowingcode.vaadin.addons.markdown.BaseMarkdownComponent
addContentChangeListener, getContent, setContent, setDataColorModeMethods inherited from class com.vaadin.flow.component.react.ReactAdapterComponent
addStateChangeListener, addStateChangeListener, getState, getState, readFromJson, readFromJson, setState, writeAsJsonMethods inherited from class 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, 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.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, setClassName
-
Constructor Details
-
MarkdownEditor
public MarkdownEditor()Constructor with empty content. -
MarkdownEditor
Constructor with default content.- Parameters:
content- default content for the Markdown editor
-
-
Method Details
-
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
-