Class 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 Details

    • BaseMarkdownComponent

      public BaseMarkdownComponent(String content)
      Base constructor that receives the content of the markdown component.
      Parameters:
      content - content to be used in the Markdown component
  • Method Details

    • getContent

      public String getContent()
      Gets the content of the Markdown component.
      Returns:
      the content of the Markdown component
    • setContent

      public void setContent(String content)
      Sets the content of the Markdown component.
      Parameters:
      content - the content to be used in the Markdown component
    • addContentChangeListener

      public void addContentChangeListener(SerializableConsumer<String> listener)
      Adds the specified listener for the content change event.
      Parameters:
      listener - the listener callback for receiving content changes
    • onAttach

      protected void onAttach(AttachEvent attachEvent)
      Overrides:
      onAttach in class Component
    • onDetach

      protected void onDetach(DetachEvent detachEvent)
      Overrides:
      onDetach in class Component