Class BaseMarkdownComponent
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.react.ReactAdapterComponent
com.flowingcode.vaadin.addons.markdown.BaseMarkdownComponent
- All Implemented Interfaces:
AttachNotifier,DetachNotifier,HasElement,HasSize,HasStyle,Serializable
- Direct Known Subclasses:
MarkdownViewer
@CssImport("./styles/markdown-editor-styles.css")
@NpmPackage(value="mermaid",version="11.2.1") @NpmPackage(value="@uiw/react-md-editor",version="4.0.4") @NpmPackage(value="dompurify",version="3.1.6")
@JsModule("./fcMarkdownEditorConnector.js")
public class BaseMarkdownComponent
extends ReactAdapterComponent
implements HasSize
Base class for Markdown based Components.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBaseMarkdownComponent(String content) Base constructor that receives the content of the markdown component. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContentChangeListener(SerializableConsumer<String> listener) Adds the specified listener for the content change event.Gets the content of the Markdown component.protected voidonAttach(AttachEvent attachEvent) protected voidonDetach(DetachEvent detachEvent) voidsetContent(String content) Sets the content of the Markdown component.Methods 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, 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
-
BaseMarkdownComponent
Base constructor that receives the content of the markdown component.- Parameters:
content- content to be used in the Markdown component
-
-
Method Details
-
getContent
Gets the content of the Markdown component.- Returns:
- the content of the Markdown component
-
setContent
Sets the content of the Markdown component.- Parameters:
content- the content to be used in the Markdown component
-
addContentChangeListener
Adds the specified listener for the content change event.- Parameters:
listener- the listener callback for receiving content changes
-
onAttach
-
onDetach
-