File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848 ref =" menubar"
4949 :file-path =" relativePath"
5050 :file-id =" fileId"
51+ :is-read-only =" readOnly"
5152 :is-rich-editor =" isRichEditor"
5253 :is-public =" isPublic"
5354 :autohide =" autohide"
6869 </MenuBar >
6970 <div v-if =" !menubarLoaded" class =" menubar placeholder" />
7071 <div ref =" contentWrapper" class =" content-wrapper" >
71- <MenuBubble v-if =" renderMenus "
72+ <MenuBubble v-if =" renderRichEditorMenus "
7273 :content-wrapper =" contentWrapper"
7374 :file-path =" relativePath" />
7475 <EditorContent v-show =" contentLoaded"
@@ -291,12 +292,16 @@ export default {
291292 displayed () {
292293 return this .currentSession && this .active
293294 },
294- renderMenus () {
295+ renderRichEditorMenus () {
295296 return this .contentLoaded
296297 && this .isRichEditor
297298 && ! this .syncError
298299 && ! this .readOnly
299300 },
301+ renderMenus () {
302+ return this .contentLoaded
303+ && ! this .syncError
304+ },
300305 },
301306 watch: {
302307 lastSavedStatus () {
Original file line number Diff line number Diff line change 2929 class =" hidden-visually"
3030 :multiple =" true"
3131 @change =" onImageUploadFilePicked" >
32- <div v-if =" isRichEditor" ref =" menubar" class =" menubar-icons" >
32+ <div v-if =" isRichEditor && !isReadOnly " ref =" menubar" class =" menubar-icons" >
3333 <template v-for =" (icon ) in icons " >
3434 <EmojiPicker v-if =" icon.class === 'icon-emoji'"
3535 v-show =" icon.priority <= iconCount"
@@ -154,6 +154,10 @@ export default {
154154 useEditorMixin,
155155 ],
156156 props: {
157+ isReadOnly: {
158+ type: Boolean ,
159+ default: false ,
160+ },
157161 isRichEditor: {
158162 type: Boolean ,
159163 default: true ,
@@ -189,7 +193,7 @@ export default {
189193 submenuVisibility: {},
190194 lastImagePath: null ,
191195 icons: [... menuBarIcons],
192- editorHasFocus: false
196+ editorHasFocus: false ,
193197 }
194198 },
195199 computed: {
You can’t perform that action at this time.
0 commit comments