tone-row / flowchart-fun

Easily generate flowcharts and diagrams from text ⿻

Home Page:https://flowchart.fun/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi-line labels

mristin opened this issue · comments

Thank you a lot for this tool! It's super practical!

Is there a way to insert line breaks in the text? Say, if I have a long edge label which I'd like to split in two lines?

@mristin At the moment that isn't possible on the production site, but I appreciate you opening this issue because it's definitely something we should support.

Here's a deploy preview that you can use temporarily which runs decodeURIComponent on each line, so you can use %0A to add new lines in edge/node labels. Here's an example.

I would merge it straight to the live branch except that it breaks the url escaping mentioned in #72 so I need to give it a little more thought next week.

Thanks again for the suggestion!

@rob-gordon thanks! I'll wait for the live branch, there's no hurry from my side.

This is merged into production now 👍

In the future I may give people a small built-in interface to encode what they type, but for now you'll need to encode your multi-line text using on an online applet like this one or by using encodeURIComponent in your browser's javascript console.

Cheers!

Maybe this is somehow related to the feature you'd implement for #34?

For example, when you click on a node, you can use a rich-text editor, have multi-lines, insert images etc. Then the text would be appear as-is on the left. When you want to edit the line, the rich text editor pops up. Personally, I'd imagine this to be a great feature -- start simple, but allow for further refinements where you are not tied to typing everything in text.

Perhaps you also want to keep it simple and not go there at all :-).

And thanks again for this feature!

Maybe this is somehow related to the feature you'd implement for #34?

For example, when you click on a node, you can use a rich-text editor, have multi-lines, insert images etc. Then the text would be appear as-is on the left. When you want to edit the line, the rich text editor pops up. Personally, I'd imagine this to be a great feature -- start simple, but allow for further refinements where you are not tied to typing everything in text.

Perhaps you also want to keep it simple and not go there at all :-).

Yep, I was imaging something very similar. Thanks!