File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed
Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1010 export let plugins = [];
1111 export let mode = ' split' ;
1212 export let editorConfig;
13+ export let toolbar = true ;
1314 export let toolbarItems = [];
1415 export let debounceMs = 300 ;
1516
7879 </style >
7980
8081<div class ="bytemd" style ={containerStyle }>
81- <Toolbar
82- {cm }
83- {fileHandler }
84- {toolbarItems }
85- {mode }
86- {activeTab }
87- on:tab ={setActiveTab } />
82+ {#if toolbar }
83+ <Toolbar
84+ {cm }
85+ {fileHandler }
86+ {toolbarItems }
87+ {mode }
88+ {activeTab }
89+ on:tab ={setActiveTab } />
90+ {/if }
8891 <div class =" bytemd-body" >
8992 <div class ="bytemd-editor" class:hidden ={mode === ' tab' && activeTab === 1 }>
9093 <textarea bind:this ={textarea } />
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export interface EditorProps {
2222 fileHandler ?: ( file : File ) => Promise < string > ;
2323 plugins ?: BytemdPlugin [ ] ;
2424 editorConfig ?: Omit < EditorConfiguration , 'value' > ;
25+ toolbar ?: boolean ;
2526 /**
2627 * Components which should be added to toolbar
2728 */
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export default {
1313 ' fileHandler' ,
1414 ' plugins' ,
1515 ' editorConfig' ,
16+ ' toolbar' ,
1617 ' toolbarItems' ,
1718 ' debounceMs' ,
1819 ],
You can’t perform that action at this time.
0 commit comments