render?: not important... markdown block quote never wraps
Markdown should probably have some limit on maximum size
what do you mean by size here?
I really should learn how to express myself... the width grows indefinetly and the text never wraps.
i'm actually not sure about this. we got another report of it, but i feel like it's a better experience to have labels and text overrule the set width/height. I feel like I'd rather let the user control linebreaks explicitly (e.g. with newlines \n in labels, or empty lines in markdown), rather than setting width. i'm going to close for now unless someone makes a compelling argument otherwise
If I change one line in a long markdown text, I don't like having to redo all the line breaks.
container: {
description: |md
Lorem ipsum dolor sit, amet consectetur adipisicing elit.\
Deleniti animi voluptatibus molestiae rerum doloribus fugit\
aperiam sapiente distinctio amet. Tenetur, ab? Debitis, minus\
sapiente quas totam culpa iure tenetur corporis.
|
}
If I remove "Deleniti animi voluptatibus", I have to reflow all line breaks. If the text is even longer, it is a lot of work.
container: {
description: |md
Lorem ipsum dolor sit, amet consectetur adipisicing elit.\
molestiae rerum doloribus fugit aperiam sapiente distinctio\
amet. Tenetur, ab? Debitis, minus sapiente quas totam culpa\
iure tenetur corporis.
|
}
I'd rather do something like this:
container: {
description: |md
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatibus, ullam. Aperiam tempora, cumque nesciunt, veritatis iste accusamus nulla itaque temporibus ullam rem quisquam quam expedita? Similique quasi nulla quo quibusdam.
| {width: 200}
}
This is desirable but extremely difficult. Since we measure markdown dimensions manually without the aid of an HTML renderer, we don't know what the height will be if we set the width to X, given the line breaks.
One way to do this is to measure chunks until width is exceeded, manually break line, and repeat. But you have to consider padding/margins of h1's, bolds, etc.
Won't do for now.
are these useful? (draw internally and measure size)
https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetwidth HTMLElement.offsetWidth HTMLElement.offsetHeight
@bo-ku-ra Unfortunately not, these are HTML/CSS web things, and D2 avoids that dependency to measure texts. Thanks anyway