mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
Experimental Mermaid integration document section type
WIP and not hopeful
This commit is contained in:
parent
0997655e0a
commit
bd9b7e120e
11 changed files with 279 additions and 1 deletions
30
gui/app/templates/components/section/mermaid/type-editor.hbs
Normal file
30
gui/app/templates/components/section/mermaid/type-editor.hbs
Normal file
|
@ -0,0 +1,30 @@
|
|||
{{#section/base-editor document=document folder=folder page=page tip="Concise name that describes the diagram" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||
<div class="section-mermaid-diagram">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label>Diagram Text </label> <a href="https://mermaidjs.github.io/" target="_blank">(Mermaid User Guide)</a>
|
||||
<textarea rows=20 id={{editorId}} class="diagram-editor form-control mousetrap">{{diagramText}}</textarea>
|
||||
<div class="mt-3">
|
||||
<p>Insert sample diagrams:</p>
|
||||
<p>
|
||||
<button type="button" class="btn btn-light btn-sm" {{action 'onInsertFlowchart'}}>Flowchart</button>
|
||||
<button type="button" class="btn btn-light btn-sm" {{action 'onInsertSequence'}}>Sequence</button>
|
||||
<button type="button" class="btn btn-light btn-sm" {{action 'onInsertGantt'}}>Gantt</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label>Diagram Preview</label>
|
||||
<div id={{previewId}}>
|
||||
{{{diagramPreview}}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/section/base-editor}}
|
|
@ -0,0 +1,3 @@
|
|||
<div class="text-center">
|
||||
{{{page.body}}}
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue