Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

excalidraw: newlines in text elements are not working #1499

Closed
Lazzaretti opened this issue Mar 29, 2023 · 4 comments · Fixed by #1527
Closed

excalidraw: newlines in text elements are not working #1499

Lazzaretti opened this issue Mar 29, 2023 · 4 comments · Fixed by #1527
Labels
👶 good first issue Good for newcomers 🐞 bug Something isn't working 📜 javascript Related to Javascript code

Comments

@Lazzaretti
Copy link
Contributor

I try to use kroki 0.20.0 with excalidraw.
Unfortunately, newlines in text elements are not working.

excalidraw:

{
  "type": "excalidraw",
  "version": 2,
  "source": "https://excalidraw.com",
  "elements": [
    {
      "id": "74iZwH3hDND5dcIYMRShJ",
      "type": "text",
      "x": 727.5497278144244,
      "y": 233.29373351334598,
      "width": 62.37994384765625,
      "height": 50,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "#e64980",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 1819588545,
      "version": 5,
      "versionNonce": 84916495,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1680096038483,
      "link": null,
      "locked": false,
      "text": "test\nnewline",
      "fontSize": 20,
      "fontFamily": 1,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "originalText": "test\nnewline",
      "lineHeight": 1.25
    }
  ],
  "appState": {
    "gridSize": null,
    "viewBackgroundColor": "#ffffff"
  },
  "files": {}
}

Output of https://excalidraw.com/

image

Output of https://kroki.io/#try

image

@ggrossetie ggrossetie added 🐞 bug Something isn't working 👶 good first issue Good for newcomers 📜 javascript Related to Javascript code labels Mar 29, 2023
@ggrossetie
Copy link
Member

Thanks for your report, I can reproduce it 🤔

@mariotoffia
Copy link

I have the same issue, they have done something with their format, it seems to work on files that I've created and saved earlier.

Cheers,
Mario :)

@Lazzaretti
Copy link
Contributor Author

I think the problem lies in excalidraw exportToSvg().
I created a bug there: excalidraw/excalidraw#6468

@ad1992
Copy link

ad1992 commented Apr 16, 2023

Hey @Lazzaretti this fix is not yet shipped to the npm package, will be releasing the fix very soon, till then you can try by installingnext version - yarn add @excalidraw/excalidraw@next and that should work.

Lazzaretti added a commit to Lazzaretti/kroki that referenced this issue Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👶 good first issue Good for newcomers 🐞 bug Something isn't working 📜 javascript Related to Javascript code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants