hackmdio / codimd

CodiMD - Realtime collaborative markdown notes on all platforms.
https://hackmd.io/c/codimd-documentation
GNU Affero General Public License v3.0
9.1k stars 1.05k forks source link

Diagramming mode / wide mode? #915

Open josdotso opened 5 years ago

josdotso commented 5 years ago

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?

ccoenen commented 5 years ago

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!

josdotso commented 5 years ago

Awesome tip. Thanks @ccoenen !

SISheogorath commented 5 years ago

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

almereyda commented 5 years ago

I feel two needs remain open:

Should these eventually move into separate issues before closing here?

ccoenen commented 5 years ago

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

resizing

jmdots commented 2 months ago

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>