Class Editor.EditorTextBuilder

java.lang.Object
eu.maveniverse.domtrip.Editor.EditorTextBuilder
Enclosing class:
Editor

public static class Editor.EditorTextBuilder extends Object
Builder for creating text nodes within the Editor context.

This builder integrates with the Editor's configuration and automatically adds the created text node to the specified parent.

  • Method Details

    • to

      Sets the parent node for this text.
      Parameters:
      parent - the parent node
      Returns:
      this builder for method chaining
    • withContent

      public Editor.EditorTextBuilder withContent(String content)
      Sets the content of this text node.
      Parameters:
      content - the text content
      Returns:
      this builder for method chaining
    • asCData

      public Editor.EditorTextBuilder asCData()
      Makes this text node a CDATA section.
      Returns:
      this builder for method chaining
    • build

      public Text build() throws DomTripException
      Builds and adds the text node to the document.
      Returns:
      the created and added text node
      Throws:
      DomTripException