Class Editor.EditorTextBuilder
java.lang.Object
eu.maveniverse.domtrip.Editor.EditorTextBuilder
- Enclosing class:
Editor
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 Summary
Modifier and TypeMethodDescriptionasCData()Makes this text node a CDATA section.build()Builds and adds the text node to the document.to(ContainerNode parent) Sets the parent node for this text.withContent(String content) Sets the content of this text node.
-
Method Details
-
to
Sets the parent node for this text.- Parameters:
parent- the parent node- Returns:
- this builder for method chaining
-
withContent
Sets the content of this text node.- Parameters:
content- the text content- Returns:
- this builder for method chaining
-
asCData
Makes this text node a CDATA section.- Returns:
- this builder for method chaining
-
build
Builds and adds the text node to the document.- Returns:
- the created and added text node
- Throws:
DomTripException
-