Skip to main content
Version: 1.468.0

From 1.309.4 to 1.339.0

Text Tool Deprecated​

The Text tool has been deprecated in favor of the new Paragraph tool. Existing text blocks created with the Text tool will continue to work as expected.

Key Differences​

Text Tool (deprecated)Paragraph Tool (new)
Tool nametextparagraph
Text propertytext (HTML string)textJson (JSON string)

Default Value Format Change​

The Text tool used an HTML string for its text property:

// Text tool (deprecated)
unlayer.init({
tools: {
text: {
properties: {
text: {
value:
'<p style="line-height: 140%;">This is a new Text block. Change the text.</p>',
},
},
},
},
});

The Paragraph tool uses a JSON string for its textJson property:

// Paragraph tool (new)
unlayer.init({
tools: {
paragraph: {
properties: {
textJson: {
value:
'{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","text":"This is a new Paragraph block. Change the text.","type":"extended-text","version":1}],"format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"format":"","indent":0,"type":"root","version":1}}',
},
},
},
},
});

Migration Options​

If you're currently using the Text tool, you have two options:

  1. Migrate to Paragraph: Update your configuration to use the paragraph tool with the textJson property format.
  2. Lock your builder version: Pin your builder to a version where the Text tool is still fully supported. See the version locking documentation for details.