codimd icon indicating copy to clipboard operation
codimd copied to clipboard

Diagramming mode / wide mode?

Open ghost opened this issue 6 years ago • 6 comments

I like to co-edit graphviz and plantuml diagrams regularly but the hackmd page width is too narrow to really make this comfortable.

Would be so awesome to have a diagram display mode similar to slide mode but retaining the editor.

Is this already a thing?

ghost avatar Aug 10 '18 03:08 ghost

I have a workaround in the meantime: If I need an exceptionally wide document (happens to me for some tables and diagrams) I put a <style>-tag into the document. This may break at some future point (i.e. this is not officially supported) but it works for now:

<style>.markdown-body { max-width: 1500px; }</style>

Of course, the 1500px could be any value you need. This can be anywhere in your markdown document!

ccoenen avatar Aug 10 '18 06:08 ccoenen

Awesome tip. Thanks @ccoenen !

josdotso avatar Aug 11 '18 04:08 josdotso

So is this workaround fine or should we make this a feature request? Otherwise I would like to close this :)

SISheogorath avatar Sep 29 '18 10:09 SISheogorath

I feel two needs remain open:

  • Resizing the display proportion of editing and preview panes
  • Operate preview pane in slide mode.

Should these eventually move into separate issues before closing here?

almereyda avatar Oct 09 '18 23:10 almereyda

regarding the first one: you can drag the middle bar between edit and view.

resizing

ccoenen avatar Oct 09 '18 23:10 ccoenen

Did this hack finally break?

Edit: yes.. but here's what I found that works now:

<style>
/* Overriding max-width for #doc within .ui-content.comment-panel */
.ui-content.comment-panel #doc, 
body.pretty-comment-panel #doc {
    max-width: 95%; /* Sets the maximum width to 100% of its parent */
}
</style>

jmdots avatar Apr 28 '24 09:04 jmdots