Skip to main content
Answer

Lucid Import Document API - HTML Line Breaks and bullets being ignored.

  • February 19, 2024
  • 7 replies
  • 114 views

Forum|alt.badge.img+1

I’ve been experimenting with the Import document API using the standard lucid format, and it’s been great for the most part. One thing I’m running into though, is it seems like when I supply line breaks or bulleted lists via HTML, the breaks/bullets get ignored. I’ve tried even uploading the sample I found in Github, https://github.com/lucidsoftware/sample-lucid-rest-applications/blob/44f7c102b8dec5fd2495aaba17c6797aff668ca8/standard-import/demo-files/filesystem/unzipped-contents/document.json#L11 and I don’t think the line break for that is working either. Has anyone had success with this? Curious if it’s end user error on my end. I’m hoping to get to where we can have code produce our diagrams, and being able to create line breaks/bullets programmatically will be key for our diagrams.

Here is some example JSON I’ve tried to upload.

{

    "version":1,

    "pages":[

      {

        "id":"page1",

        "title":"New Page",

        "shapes":[

          {"id":"block0","type":"stickyNote","customData":[{"key":"Num","value":"0"},{"key":"Prev","value":"=upstream.Num"}],"boundingBox":{"x":100,"y":100,"w":100,"h":100},"text":"Placeholder,Line should break <br> Block {{=@Num}}"},

          {"id":"block1","type":"stickyNote","customData":[{"key":"Num","value":"1"},{"key":"Prev","value":"=upstream.Num"}],"boundingBox":{"x":300,"y":100,"w":100,"h":100},"text":"Pre Line Break<br> post line break Block {{=@Num}}"},

          {"id":"block2","type":"stickyNote","customData":[{"key":"Num","value":"2"},{"key":"Prev","value":"=upstream.Num"}],"boundingBox":{"x":500,"y":100,"w":100,"h":100},"text":"Block {{=@Num}}"},

          {"id":"block3","type":"stickyNote","customData":[{"key":"Num","value":"3"},{"key":"Prev","value":"=upstream.Num"}],"boundingBox":{"x":700,"y":100,"w":100,"h":100},"text":"Block {{=@Num}}"},

          {"id":"block4","type":"stickyNote","customData":[{"key":"Num","value":"4"},{"key":"Prev","value":"=upstream.Num"}],"boundingBox":{"x":900,"y":100,"w":100,"h":100},"text":"Block {{=@Num}}"},

          {"id":"block5","type":"stickyNote","customData":[{"key":"Num","value":"5"},{"key":"Prev","value":"=upstream.Num"}],"boundingBox":{"x":100,"y":300,"w":100,"h":100},"text":"Block {{=@Num}}"},

          {"id":"block6","type":"stickyNote","customData":[{"key":"Num","value":"6"},{"key":"Prev","value":"=upstream.Num"}],"boundingBox":{"x":300,"y":300,"w":100,"h":100},"text":"Block {{=@Num}}"},

          {"id":"block7","type":"stickyNote","customData":[{"key":"Num","value":"7"},{"key":"Prev","value":"=upstream.Num"}],"boundingBox":{"x":500,"y":300,"w":100,"h":100},"text":"Block {{=@Num}}"},

          {"id":"block8","type":"stickyNote","customData":[{"key":"Num","value":"8"},{"key":"Prev","value":"=upstream.Num"}],"boundingBox":{"x":700,"y":300,"w":100,"h":100},"text":"Block {{=@Num}}"},

          {"id":"block9","type":"stickyNote","customData":[{"key":"Num","value":"9"},{"key":"Prev","value":"=upstream.Num"}],"boundingBox":{"x":900,"y":300,"w":100,"h":100},"text":"Block {{=@Num}}"}

        ],

        "lines":[

          {"id":"line0","lineType":"elbow","text":[{"text":"{{=upstream.Num}} to {{=downstream.Num}}","position":0.5,"side":"middle"}],"endpoint1":{"type":"shapeEndpoint","style":"none","shapeId":"block0","position":{"x":1,"y":0.5}},"endpoint2":{"type":"shapeEndpoint","style":"arrow","shapeId":"block1","position":{"x":0,"y":0.5}}},

          {"id":"line1","lineType":"elbow","text":[{"text":"{{=upstream.Num}} to {{=downstream.Num}}","position":0.5,"side":"middle"}],"endpoint1":{"type":"shapeEndpoint","style":"none","shapeId":"block1","position":{"x":1,"y":0.5}},"endpoint2":{"type":"shapeEndpoint","style":"arrow","shapeId":"block2","position":{"x":0,"y":0.5}}},

          {"id":"line2","lineType":"elbow","text":[{"text":"{{=upstream.Num}} to {{=downstream.Num}}","position":0.5,"side":"middle"}],"endpoint1":{"type":"shapeEndpoint","style":"none","shapeId":"block2","position":{"x":1,"y":0.5}},"endpoint2":{"type":"shapeEndpoint","style":"arrow","shapeId":"block3","position":{"x":0,"y":0.5}}},

          {"id":"line3","lineType":"elbow","text":[{"text":"{{=upstream.Num}} to {{=downstream.Num}}","position":0.5,"side":"middle"}],"endpoint1":{"type":"shapeEndpoint","style":"none","shapeId":"block3","position":{"x":1,"y":0.5}},"endpoint2":{"type":"shapeEndpoint","style":"arrow","shapeId":"block4","position":{"x":0,"y":0.5}}},

          {"id":"line4","lineType":"elbow","text":[{"text":"{{=upstream.Num}} to {{=downstream.Num}}","position":0.5,"side":"middle"}],"endpoint1":{"type":"shapeEndpoint","style":"none","shapeId":"block4","position":{"x":1,"y":0.5}},"endpoint2":{"type":"shapeEndpoint","style":"arrow","shapeId":"block5","position":{"x":0,"y":0.5}}},

          {"id":"line5","lineType":"elbow","text":[{"text":"{{=upstream.Num}} to {{=downstream.Num}}","position":0.5,"side":"middle"}],"endpoint1":{"type":"shapeEndpoint","style":"none","shapeId":"block5","position":{"x":1,"y":0.5}},"endpoint2":{"type":"shapeEndpoint","style":"arrow","shapeId":"block6","position":{"x":0,"y":0.5}}},

          {"id":"line6","lineType":"elbow","text":[{"text":"{{=upstream.Num}} to {{=downstream.Num}}","position":0.5,"side":"middle"}],"endpoint1":{"type":"shapeEndpoint","style":"none","shapeId":"block6","position":{"x":1,"y":0.5}},"endpoint2":{"type":"shapeEndpoint","style":"arrow","shapeId":"block7","position":{"x":0,"y":0.5}}},

          {"id":"line7","lineType":"elbow","text":[{"text":"{{=upstream.Num}} to {{=downstream.Num}}","position":0.5,"side":"middle"}],"endpoint1":{"type":"shapeEndpoint","style":"none","shapeId":"block7","position":{"x":1,"y":0.5}},"endpoint2":{"type":"shapeEndpoint","style":"arrow","shapeId":"block8","position":{"x":0,"y":0.5}}},

          {"id":"line8","lineType":"elbow","text":[{"text":"{{=upstream.Num}} to {{=downstream.Num}}","position":0.5,"side":"middle"}],"endpoint1":{"type":"shapeEndpoint","style":"none","shapeId":"block8","position":{"x":1,"y":0.5}},"endpoint2":{"type":"shapeEndpoint","style":"arrow","shapeId":"block9","position":{"x":0,"y":0.5}}}

        ]

      }

    ]

  }

Best answer by chasefreeman

The fix has been pushed and should be available now.

 

Please let us know if you run into any other issues!

Comments

Ian Baenziger
Forum|alt.badge.img+5
  • Lucid product team
  • February 19, 2024

Hi DaltonC!

 

First, glad to hear you’re having a generally positive experience with the API! We worked hard on it and we’re proud of it 😀. And thanks for reaching out; we’re always looking to fix/improve the stuff that isn’t working or is confusing. 

Today the Lucid USA office is on vacation for Presidents Day, and the team most familiar with the API is US-based. However, I’ll ask them to respond early tomorrow.

 

Thanks!

Ian


Forum|alt.badge.img+3
  • Lucid product team
  • February 20, 2024

Hello! I’m one of the developers working with Ian.

I tested out the JSON you included, our GitHub sample code, and some other imports with bulleted lists, and I found the same behavior that you described of line breaks and bullets being ignored. So I think it’s safe to say the problem isn’t user error. Currently digging into why this might be happening and how to fix it. Thank you for your patience in working with us!


Forum|alt.badge.img+1
  • Author
  • February 20, 2024

No problem, appreciate you taking a look.

 


Forum|alt.badge.img+2
  • Lucid product team
  • February 21, 2024

Hey DaltonC!


Just to give you a quick update. We have identified the underlying issue, are working on a fix, and expect that fix to be coming relatively soon.

Thanks for reporting it and your patience while we investigated!


Forum|alt.badge.img+1
  • Author
  • February 22, 2024

Awesome, appreciate the update. Mind posting here once you’ve pushed the fix? 
 


Forum|alt.badge.img+2
  • Lucid product team
  • February 22, 2024

No problem and not at all! I’ll update this thread as soon as the fix is out. 


Forum|alt.badge.img+2
  • Lucid product team
  • Answer
  • February 22, 2024

The fix has been pushed and should be available now.

 

Please let us know if you run into any other issues!