Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax <max@nextcloud.com>2022-04-13 15:37:01 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2022-04-19 19:52:15 +0300
commitb48886fc9eaa41745ea2a20757e1d4917297bf7a (patch)
tree61bc66d27a891e080feec020f080f25e4b371fdc
parenta10cc4ac299a0dc6bfa95a7e0db5e868a53528a9 (diff)
fix: prioritize emoji and callout
They cannot be shown in the menu with the remaining tools. Signed-off-by: Max <max@nextcloud.com>
-rw-r--r--js/editor-rich.js4
-rw-r--r--js/editor-rich.js.map2
-rw-r--r--src/mixins/menubar.js8
3 files changed, 7 insertions, 7 deletions
diff --git a/js/editor-rich.js b/js/editor-rich.js
index e5ded2946..af3c99fe5 100644
--- a/js/editor-rich.js
+++ b/js/editor-rich.js
@@ -1,3 +1,3 @@
/*! For license information please see editor-rich.js.LICENSE.txt */
-"use strict";(self.webpackChunktext=self.webpackChunktext||[]).push([["editor-rich"],{14695:(n,e,i)=>{i.d(e,{h0:()=>U,Lz:()=>P,YZ:()=>S,tH:()=>j});var o=i(74411),r=i(27594);function a(n,t,e,i,o,r,a){try{var c=n[r](a),l=c.value}catch(n){return void e(n)}c.done?t(l):Promise.resolve(l).then(i,o)}const c={name:"RichWorkspace",components:{EditorWrapper:function(){return Promise.all([i.e("vendors"),i.e("editor")]).then(i.bind(i,96479))}},props:{file:{type:Object,default:null},folder:{type:Object,default:null}},data:function(){return{focus:!1,loaded:!1,ready:!1,autofocus:!1,darkTheme:OCA.Accessibility&&"dark"===OCA.Accessibility.theme,enabled:OCA.Text.RichWorkspaceEnabled}},computed:{shareToken:function(){var n;return null===(n=document.getElementById("sharingToken"))||void 0===n?void 0:n.value},canCreate:function(){return!!(this.folder&&this.folder.permissions&OC.PERMISSION_CREATE)},showEmptyWorkspace:function(){return(!this.file||this.autofocus&&!this.ready)&&this.canCreate},filepath:function(){var n=this.file,t=n.path,e=n.name;return t+(t.endsWith("/")?"":"/")+e}},watch:{focus:function(n){n||document.querySelector("#editor").scrollTo(0,0)}},mounted:function(){var n,t=this;return(n=regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:(0,r.subscribe)("Text::showRichWorkspace",(function(){t.enabled=!0})),(0,r.subscribe)("Text::hideRichWorkspace",(function(){t.enabled=!1}));case 2:case"end":return n.stop()}}),n)})),function(){var t=this,e=arguments;return new Promise((function(i,o){var r=n.apply(t,e);function c(n){a(r,i,o,c,l,"next",n)}function l(n){a(r,i,o,c,l,"throw",n)}c(void 0)}))})()},methods:{unfocus:function(){},reset:function(){var n=this;this.focus=!1,this.$nextTick((function(){n.creating=!1}))},createNew:function(){this.creating||(this.creating=!0,this.autofocus=!0,this.file||window.FileList.createFile("Readme.md",{scrollTo:!1,animate:!1}))}}};var l=i(93379),s=i.n(l),u=i(7795),A=i.n(u),d=i(90569),p=i.n(d),f=i(3565),h=i.n(f),b=i(19216),m=i.n(b),C=i(44589),v=i.n(C),g=i(56735),k={};k.styleTagTransform=v(),k.setAttributes=h(),k.insert=p().bind(null,"head"),k.domAPI=A(),k.insertStyleElement=m();s()(g.Z,k);g.Z&&g.Z.locals&&g.Z.locals;const y=(0,i(51900).Z)(c,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return n.enabled?e("div",{class:{"icon-loading":!n.loaded||!n.ready,focus:n.focus,dark:n.darkTheme,creatable:n.canCreate},attrs:{id:"rich-workspace"}},[n.showEmptyWorkspace?e("div",{staticClass:"empty-workspace",on:{click:n.createNew}},[e("p",{staticClass:"placeholder"},[n._v("\n\t\t\t"+n._s(n.t("text","Add notes, lists or links …"))+"\n\t\t")])]):n._e(),n._v(" "),n.file?e("EditorWrapper",{directives:[{name:"show",rawName:"v-show",value:n.ready,expression:"ready"}],key:n.file.path,attrs:{"file-id":n.file.id,"relative-path":n.filepath,"share-token":n.shareToken,active:!0,autohide:!0,mime:n.file.mimetype,autofocus:n.autofocus},on:{ready:function(t){n.ready=!0,n.loaded=!0},focus:function(t){n.focus=!0},blur:n.unfocus,error:n.reset}}):n._e()],1):n._e()}),[],!1,null,"6af3308d",null).exports;var x=i(79753),w=i(23895),_=i(25108);function I(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,i)}return e}function B(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?I(Object(e),!0).forEach((function(t){D(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):I(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function D(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function E(n){return function(n){if(Array.isArray(n))return M(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,t){if(!n)return;if("string"==typeof n)return M(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return M(n,t)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e<t;e++)i[e]=n[e];return i}var O="Edit with text app",P=function(n,t){var e=n.split("/"),i=t.split("/");for(e.pop();e[0]===i[0];)e.shift(),i.shift();var o=e.fill("..").concat(i),r=t.split("/");return o.length<r.length?o.join("/"):t},j=function(){var n={attach:function(n){var e=n.fileList;"files"!==e.id&&"files.public"!==e.id||n.addMenuEntry({id:"file",displayName:t("text","New text document"),templateName:t("text","New text document")+".md",iconClass:"icon-filetype-text",fileType:"file",actionHandler:function(n){e.createFile(n).then((function(n,t){var i=new OCA.Files.FileInfoModel(t);void 0!==OCA.Viewer?OCA.Files.fileActions.triggerAction("view",i,e):void 0===OCA.Viewer&&OCA.Files.fileActions.triggerAction(O,i,e)}))}})}};OC.Plugins.register("OCA.Files.NewFileMenu",n)},S=function(){var n=document.getElementById("sharingToken")?document.getElementById("sharingToken").value:null,e=document.getElementById("dir").value;if(!n||""!==e){var r=document.createElement("div");r.id="text-viewer-fallback",document.body.appendChild(r);for(var a=function(e){return OCA.Files.fileActions.register(e,O,OC.PERMISSION_UPDATE|OC.PERMISSION_READ,(0,x.imagePath)("core","actions/rename"),(function(t){var e=window.FileList.findFile(t);Promise.all([Promise.resolve().then(i.bind(i,20144)),Promise.all([i.e("vendors"),i.e("files-modal")]).then(i.bind(i,19886))]).then((function(i){var o=window.FileList.getCurrentDirectory()+"/"+t,a=i[0].default;a.prototype.t=window.t,a.prototype.n=window.n,a.prototype.OCA=window.OCA;var c=i[1].default;new a({render:function(t){var i=this;return t(c,{props:{fileId:e?e.id:null,active:!0,shareToken:n,relativePath:o,mimeType:e.mimetype},on:{close:function(){i.$destroy()}}})}}).$mount(r)}))}),t("text","Edit"))},c=0;c<o.SP.length;c++)a(o.SP[c]),OCA.Files.fileActions.setDefault(o.SP[c],O)}},U={el:null,vm:null,attach:function(n){var t=this;if("files"===n.id||"files.public"===n.id){this.el=document.createElement("div"),n.registerHeader({id:"workspace",el:this.el,render:this.render.bind(this),priority:10});var e="{".concat(OC.Files.Client.NS_NEXTCLOUD,"}rich-workspace-file"),i=n._getWebdavProperties;n._getWebdavProperties=function(){return[].concat(E(i.apply(this,arguments)),[e])};var o=null;n.filesClient.addFileInfoParser((function(i,r){if("httpd/unix-directory"===r.mimetype){var a=i.propStat[0].properties;r.path+(r.path.endsWith("/")?"":"/")+r.name===n.getCurrentDirectory()&&(o=a[e],t.vm.folder={permissions:r.permissions},t.vm.loaded=!0,t.vm.ready=!0)}if(o&&r.id===o)return"text/markdown"!==r.mimetype&&_.warn("Expected workspace file to be markdown:",r),void t.open(r);"Readme.md"===r.name&&"text/markdown"===r.mimetype&&r.path===n.getCurrentDirectory()&&t.open(r)}))}},render:function(n){var t=this;"files"!==n.id&&"files.public"!==n.id||Promise.resolve().then(i.bind(i,20144)).then((function(e){var i=e.default;t.el.id="files-workspace-wrapper",i.prototype.t=window.t,i.prototype.n=window.n,i.prototype.OCA=window.OCA;var o=i.extend(y);t.vm=new o({propsData:{file:null,folder:null},store:w.Z}).$mount(t.el),n.$el.on("urlChanged",(function(n){t.vm.file=null,t.vm.folder=null})),n.$el.on("changeDirectory",(function(n){t.vm.file=null,t.vm.folder=null}))}))},open:function(n){var t=this.vm.file,e=parseInt(n.id);this.vm.file=B(B({},n),{},{id:e}),(null==t?void 0:t.id)!==e&&(this.vm.ready=!1)}}},74411:(n,t,e)=>{e.d(t,{SP:()=>r,lF:()=>i,w_:()=>o});var i=["text/markdown"],o=["text/plain","application/cmd","application/x-empty","application/x-msdos-program","application/javascript","application/json","application/x-perl","application/x-php","application/x-tex","application/xml","application/yaml","text/css","text/csv","text/html","text/org","text/x-c","text/x-c++src","text/x-h","text/x-java-source","text/x-ldif","text/x-python","text/x-shellscript"],r=[].concat(i,o)},96379:(n,t,e)=>{e.d(t,{Z:()=>c});var i=e(87537),o=e.n(i),r=e(23645),a=e.n(r)()(o());a.push([n.id,'.menubar[data-v-2bc7f97a]{--background-blur: blur(10px);position:fixed;position:-webkit-sticky;position:sticky;top:0;display:flex;justify-content:flex-end;z-index:10021;background-color:var(--color-main-background-translucent);-webkit-backdrop-filter:var(--background-blur);backdrop-filter:var(--background-blur);max-height:44px;padding-top:3px;padding-bottom:3px}.menubar.autohide[data-v-2bc7f97a]{visibility:hidden;opacity:0;transition:visibility .2s .4s,opacity .2s .4s}.menubar.autohide.show[data-v-2bc7f97a]{visibility:visible;opacity:1}.menubar .menubar-icons[data-v-2bc7f97a]{flex-grow:1;margin-left:calc((100% - 660px)/2)}@media(max-width: 660px){.menubar .menubar-icons[data-v-2bc7f97a]{margin-left:0}}.menubar[data-v-2bc7f97a] .action-item__menu ul{max-height:calc(100vh - 88px);overflow:scroll}.menubar button[data-v-2bc7f97a]{position:relative;width:44px;height:44px;margin:0;background-size:16px;border:0;background-color:transparent;opacity:.5;color:var(--color-main-text);background-position:center center;vertical-align:top}.menubar button[data-v-2bc7f97a]:hover,.menubar button[data-v-2bc7f97a]:focus,.menubar button[data-v-2bc7f97a]:active{background-color:var(--color-background-dark)}.menubar button.is-active[data-v-2bc7f97a]::before{transform:translateX(-50%);border-radius:100%;position:absolute;background:var(--color-primary-element);bottom:3px;height:6px;width:6px;content:"";left:50%}.menubar button.is-active[data-v-2bc7f97a],.menubar button[data-v-2bc7f97a]:hover,.menubar button[data-v-2bc7f97a]:focus{opacity:1}.menubar button.icon-undo[data-v-2bc7f97a],.menubar button.icon-redo[data-v-2bc7f97a]{opacity:.8}.menubar button.icon-undo[data-v-2bc7f97a]:disabled,.menubar button.icon-redo[data-v-2bc7f97a]:disabled{opacity:.4}.menubar .submenu[data-v-2bc7f97a],.menubar .menuitem-emoji[data-v-2bc7f97a]{display:inline-block;width:44px;height:44px;position:relative;vertical-align:top}',"",{version:3,sources:["webpack://./src/components/MenuBar.vue"],names:[],mappings:"AAiYA,0BACC,6BAAA,CACA,cAAA,CACA,uBAAA,CACA,eAAA,CACA,KAAA,CACA,YAAA,CACA,wBAAA,CACA,aAAA,CACA,yDAAA,CACA,8CAAA,CACA,sCAAA,CACA,eAAA,CACA,eAAA,CACA,kBAAA,CAEA,mCACC,iBAAA,CACA,SAAA,CACA,6CAAA,CACA,wCACC,kBAAA,CACA,SAAA,CAGF,yCACC,WAAA,CACA,kCAAA,CAED,yBACC,yCACC,aAAA,CAAA,CAGF,gDACC,6BAAA,CACA,eAAA,C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n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.menubar {\n\t--background-blur: blur(10px);\n\tposition: fixed;\n\tposition: -webkit-sticky;\n\tposition: sticky;\n\ttop: 0;\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tz-index: 10021; // above modal-header and menububble so menubar is always on top\n\tbackground-color: var(--color-main-background-translucent);\n\t-webkit-backdrop-filter: var(--background-blur);\n\tbackdrop-filter: var(--background-blur);\n\tmax-height: 44px; // important for mobile so that the buttons are always inside the container\n\tpadding-top:3px;\n\tpadding-bottom: 3px;\n\n\t&.autohide {\n\t\tvisibility: hidden;\n\t\topacity: 0;\n\t\ttransition: visibility 0.2s 0.4s, opacity 0.2s 0.4s;\n\t\t&.show {\n\t\t\tvisibility: visible;\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t.menubar-icons {\n\t\tflex-grow: 1;\n\t\tmargin-left: calc((100% - 660px) / 2);\n\t}\n\t@media (max-width: 660px) {\n\t\t.menubar-icons {\n\t\t\tmargin-left: 0;\n\t\t}\n\t}\n\t&::v-deep .action-item__menu ul {\n\t\tmax-height: calc(100vh - 88px);\n\t\toverflow: scroll;\n\t}\n}\n\n.menubar button {\n\tposition: relative;\n\twidth: 44px;\n\theight: 44px;\n\tmargin: 0;\n\tbackground-size: 16px;\n\tborder: 0;\n\tbackground-color: transparent;\n\topacity: .5;\n\tcolor: var(--color-main-text);\n\tbackground-position: center center;\n\tvertical-align: top;\n\t&:hover, &:focus, &:active {\n\t\tbackground-color: var(--color-background-dark);\n\t}\n\n\t&.is-active::before {\n\t\ttransform: translateX(-50%);\n\t\tborder-radius: 100%;\n\t\tposition: absolute;\n\t\tbackground: var(--color-primary-element);\n\t\tbottom: 3px;\n\t\theight: 6px;\n\t\twidth: 6px;\n\t\tcontent: '';\n\t\tleft: 50%;\n\n\t}\n\t&.is-active,\n\t&:hover,\n\t&:focus {\n\t\topacity: 1;\n\t}\n\n\t&.icon-undo,\n\t&.icon-redo {\n\t\topacity: .8;\n\n\t\t&:disabled {\n\t\t\topacity: .4;\n\t\t}\n\t}\n}\n\n.menubar .submenu, .menubar .menuitem-emoji {\n\tdisplay: inline-block;\n\twidth: 44px;\n\theight: 44px;\n\tposition: relative;\n\tvertical-align: top;\n}\n"],sourceRoot:""}]);const c=a},48375:(n,t,e)=>{e.d(t,{Z:()=>c});var i=e(87537),o=e.n(i),r=e(23645),a=e.n(r)()(o());a.push([n.id,".menububble[data-v-23aa9303]{display:flex;z-index:10020;background:var(--color-main-background-translucent);box-shadow:0 1px 5px var(--color-box-shadow);border-radius:var(--border-radius-large);overflow:hidden;padding:0;margin-left:10px;height:44px}.menububble__button[data-v-23aa9303]{display:block;flex-grow:1;border:0;padding:.9rem .7rem;margin:0;border-radius:0;cursor:pointer;background-color:var(--color-main-background);border-right:1px solid var(--color-border)}.menububble__button[data-v-23aa9303]:focus,.menububble__button[data-v-23aa9303]:hover{background-color:var(--color-background-hover);border:0;border-right:1px solid var(--color-border) !important}.menububble__button[data-v-23aa9303]:last-child{border:0 !important}.menububble__buttontext[data-v-23aa9303]{padding:.4rem;padding-right:0}.menububble__form[data-v-23aa9303]{display:flex;align-items:center}.menububble__input[data-v-23aa9303]{font:inherit;border:none;background:transparent;min-width:250px}","",{version:3,sources:["webpack://./src/components/MenuBubble.vue"],names:[],mappings:"AAyKA,6BACC,YAAA,CACA,aAAA,CACA,mDAAA,CACA,4CAAA,CACA,wCAAA,CACA,eAAA,CACA,SAAA,CACA,gBAAA,CACA,WAAA,CAEA,qCACC,aAAA,CACA,WAAA,CACA,QAAA,CACA,mBAAA,CACA,QAAA,CACA,eAAA,CACA,cAAA,CACA,6CAAA,CACA,0CAAA,CAEA,sFAEC,8CAAA,CACA,QAAA,CACA,qDAAA,CAGD,gDACC,mBAAA,CAIF,yCACC,aAAA,CACA,eAAA,CAGD,mCACC,YAAA,CACA,kBAAA,CAGD,oCACC,YAAA,CACA,WAAA,CACA,sBAAA,CACA,eAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.menububble {\n\tdisplay: flex;\n\tz-index: 10020;\n\tbackground: var(--color-main-background-translucent);\n\tbox-shadow: 0 1px 5px var(--color-box-shadow);\n\tborder-radius: var(--border-radius-large);\n\toverflow: hidden;\n\tpadding: 0;\n\tmargin-left: 10px;\n\theight: 44px;\n\n\t&__button {\n\t\tdisplay: block;\n\t\tflex-grow: 1;\n\t\tborder: 0;\n\t\tpadding: 0.9rem 0.7rem;\n\t\tmargin: 0;\n\t\tborder-radius: 0;\n\t\tcursor: pointer;\n\t\tbackground-color: var(--color-main-background);\n\t\tborder-right: 1px solid var(--color-border);\n\n\t\t&:focus,\n\t\t&:hover {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t\tborder: 0;\n\t\t\tborder-right: 1px solid var(--color-border) !important;\n\t\t}\n\n\t\t&:last-child {\n\t\t\tborder: 0 !important;\n\t\t}\n\t}\n\n\t&__buttontext {\n\t\tpadding: 0.4rem;\n\t\tpadding-right: 0;\n\t}\n\n\t&__form {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t&__input {\n\t\tfont: inherit;\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\tmin-width: 250px;\n\t}\n}\n"],sourceRoot:""}]);const c=a},56735:(n,t,e)=>{e.d(t,{Z:()=>c});var i=e(87537),o=e.n(i),r=e(23645),a=e.n(r)()(o());a.push([n.id,'#rich-workspace[data-v-6af3308d]{padding:0 50px;margin-bottom:-24px;text-align:left;max-height:0;transition:max-height .5s cubic-bezier(0, 1, 0, 1);z-index:61;position:relative}#rich-workspace.creatable[data-v-6af3308d]{min-height:90px}#rich-workspace[data-v-6af3308d]:only-child{margin-bottom:0}.empty-workspace[data-v-6af3308d]{padding-top:43px;color:var(--color-text-maxcontrast);height:0}#rich-workspace[data-v-6af3308d] div[contenteditable=false]{width:100%;padding:0px;background-color:var(--color-main-background);opacity:1;border:none}#rich-workspace[data-v-6af3308d] #editor-container{height:100%;position:unset !important;top:auto !important}#rich-workspace[data-v-6af3308d] #editor-wrapper{position:unset !important;overflow:visible}#rich-workspace[data-v-6af3308d] #editor{overflow:visible !important}#rich-workspace[data-v-6af3308d] .content-wrapper{overflow:scroll !important;max-height:calc(40vh - 50px);padding-left:10px;padding-bottom:60px}#rich-workspace[data-v-6af3308d] #editor-wrapper .ProseMirror{padding:0px;margin:0}#rich-workspace[data-v-6af3308d] .menubar{z-index:61;margin-bottom:-10px}#rich-workspace[data-v-6af3308d] .menubar .menubar-icons{margin-left:0}#rich-workspace[data-v-6af3308d] .editor__content{margin:0}#rich-workspace.focus[data-v-6af3308d]{max-height:50vh}#rich-workspace[data-v-6af3308d]:not(.focus){max-height:30vh;position:relative;overflow:hidden}#rich-workspace[data-v-6af3308d]:not(.focus):not(.icon-loading):after{content:"";position:absolute;z-index:1;bottom:0;left:0;pointer-events:none;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));width:100%;height:4em}#rich-workspace.dark[data-v-6af3308d]:not(.focus):not(.icon-loading):after{background-image:linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background))}@media only screen and (max-width: 1024px){#rich-workspace[data-v-6af3308d]:not(.focus){max-height:30vh}}html.ie #rich-workspace[data-v-6af3308d] #editor-container{position:initial}html.ie #rich-workspace[data-v-6af3308d] #editor-wrapper{position:relative !important;top:auto !important}html.ie #rich-workspace[data-v-6af3308d] #editor{display:flex;flex-direction:column;overflow:hidden !important}html.ie #rich-workspace[data-v-6af3308d] .menubar{position:relative;overflow:hidden;flex-shrink:0;height:44px;top:auto}html.ie #rich-workspace[data-v-6af3308d] #editor>div:nth-child(2){min-height:44px;overflow-x:hidden;overflow-y:auto;flex-shrink:1}',"",{version:3,sources:["webpack://./src/views/RichWorkspace.vue"],names:[],mappings:"AAkIA,iCACC,cAAA,CAEA,mBAAA,CACA,eAAA,CACA,YAAA,CACA,kDAAA,CACA,UAAA,CACA,iBAAA,CACA,2CACC,eAAA,CAKF,4CACC,eAAA,CAGD,kCACC,gBAAA,CACA,mCAAA,CACA,QAAA,CAGD,4DACC,UAAA,CACA,WAAA,CACA,6CAAA,CACA,SAAA,CACA,WAAA,CAGD,mDACC,WAAA,CACA,yBAAA,CACA,mBAAA,CAGD,iDACC,yBAAA,CACA,gBAAA,CAGD,yCACC,2BAAA,CAGD,kDACC,0BAAA,CACA,4BAAA,CACA,iBAAA,CACA,mBAAA,CAGD,8DACC,WAAA,CACA,QAAA,CAGD,0CACC,UAAA,CAEA,mBAAA,CAGD,yDACC,aAAA,CAGD,kDACC,QAAA,CAGD,uCACC,eAAA,CAGD,6CACC,eAAA,CACA,iBAAA,CACA,eAAA,CAGD,sEACC,UAAA,CACA,iBAAA,CACA,SAAA,CACA,QAAA,CACA,MAAA,CACA,mBAAA,CACA,iGAAA,CACA,UAAA,CACA,UAAA,CAGD,2EACC,2FAAA,CAGD,2CACC,6CACC,eAAA,CAAA,CAMA,2DACC,gBAAA,CAGD,yDACC,4BAAA,CACA,mBAAA,CAGD,iDACC,YAAA,CACA,qBAAA,CACA,0BAAA,CAGD,kDACC,iBAAA,CACA,eAAA,CACA,aAAA,CACA,WAAA,CACA,QAAA,CAGD,kEACC,eAAA,CACA,iBAAA,CACA,eAAA,CACA,aAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#rich-workspace {\n\tpadding: 0 50px;\n\t/* Slightly reduce vertical space */\n\tmargin-bottom: -24px;\n\ttext-align: left;\n\tmax-height: 0;\n\ttransition: max-height 0.5s cubic-bezier(0, 1, 0, 1);\n\tz-index: 61;\n\tposition: relative;\n\t&.creatable {\n\t\tmin-height: 90px;\n\t}\n}\n\n/* For subfolders, where there are no Recommendations */\n#rich-workspace:only-child {\n\tmargin-bottom: 0;\n}\n\n.empty-workspace {\n\tpadding-top: 43px;\n\tcolor: var(--color-text-maxcontrast);\n\theight: 0;\n}\n\n#rich-workspace::v-deep div[contenteditable=false] {\n\twidth: 100%;\n\tpadding: 0px;\n\tbackground-color: var(--color-main-background);\n\topacity: 1;\n\tborder: none;\n}\n\n#rich-workspace::v-deep #editor-container {\n\theight: 100%;\n\tposition: unset !important;\n\ttop: auto !important;\n}\n\n#rich-workspace::v-deep #editor-wrapper {\n\tposition: unset !important;\n\toverflow: visible;\n}\n\n#rich-workspace::v-deep #editor {\n\toverflow: visible !important;\n}\n\n#rich-workspace::v-deep .content-wrapper {\n\toverflow: scroll !important;\n\tmax-height: calc(40vh - 50px);\n\tpadding-left: 10px;\n\tpadding-bottom: 60px; /* ensure menububble fits below */\n}\n\n#rich-workspace::v-deep #editor-wrapper .ProseMirror {\n\tpadding: 0px;\n\tmargin: 0;\n}\n\n#rich-workspace::v-deep .menubar {\n\tz-index: 61;\n\t/* Slightly reduce vertical space */\n\tmargin-bottom: -10px;\n}\n\n#rich-workspace::v-deep .menubar .menubar-icons {\n\tmargin-left: 0;\n}\n\n#rich-workspace::v-deep .editor__content {\n\tmargin: 0;\n}\n\n#rich-workspace.focus {\n\tmax-height: 50vh;\n}\n\n#rich-workspace:not(.focus) {\n\tmax-height: 30vh;\n\tposition: relative;\n\toverflow: hidden;\n}\n\n#rich-workspace:not(.focus):not(.icon-loading):after {\n\tcontent: '';\n\tposition: absolute;\n\tz-index: 1;\n\tbottom: 0;\n\tleft: 0;\n\tpointer-events: none;\n\tbackground-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\n\twidth: 100%;\n\theight: 4em;\n}\n\n#rich-workspace.dark:not(.focus):not(.icon-loading):after {\n\tbackground-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background));\n}\n\n@media only screen and (max-width: 1024px) {\n\t#rich-workspace:not(.focus) {\n\t\tmax-height: 30vh;\n\t}\n}\n\nhtml.ie {\n\t#rich-workspace::v-deep {\n\t\t#editor-container {\n\t\t\tposition: initial;\n\t\t}\n\n\t\t#editor-wrapper {\n\t\t\tposition: relative !important;\n\t\t\ttop: auto !important;\n\t\t}\n\n\t\t#editor {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\toverflow: hidden !important;\n\t\t}\n\n\t\t.menubar {\n\t\t\tposition: relative;\n\t\t\toverflow: hidden;\n\t\t\tflex-shrink: 0;\n\t\t\theight: 44px;\n\t\t\ttop: auto;\n\t\t}\n\n\t\t#editor > div:nth-child(2) {\n\t\t\tmin-height: 44px;\n\t\t\toverflow-x: hidden;\n\t\t\toverflow-y: auto;\n\t\t\tflex-shrink: 1;\n\t\t}\n\t}\n}\n\n"],sourceRoot:""}]);const c=a},37276:(n,e,i)=>{i.r(e),i.d(e,{default:()=>T});var o=i(15168),r=i.n(o);const a=[{label:t("text","Undo"),keyChar:"z",keyModifiers:["ctrl"],class:"icon-undo",action:function(n){return n.undo()},priority:3},{label:t("text","Redo"),keyChar:"y",keyModifiers:["ctrl"],class:"icon-redo",action:function(n){return n.redo()},priority:11},{label:t("text","Bold"),keyChar:"b",keyModifiers:["ctrl"],class:"icon-bold",isActive:"strong",action:function(n){return n.toggleBold()},priority:4},{label:t("text","Italic"),keyChar:"i",keyModifiers:["ctrl"],class:"icon-italic",isActive:"em",action:function(n){return n.toggleItalic()},priority:7},{label:t("text","Underline"),keyChar:"u",keyModifiers:["ctrl"],class:"icon-underline",isActive:"underline",action:function(n){return n.toggleUnderline()},priority:14},{label:t("text","Strikethrough"),keyChar:"d",keyModifiers:["ctrl"],class:"icon-strike",isActive:"strike",action:function(n){return n.toggleStrike()},priority:15},{label:t("text","Headings"),keyChar:"1…6",keyModifiers:["ctrl","shift"],visible:!1,children:[{label:t("text","Heading 1"),class:"icon-h1",isActive:["heading",{level:1}],action:function(n){return n.toggleHeading({level:1})}},{label:t("text","Heading 2"),class:"icon-h2",isActive:["heading",{level:2}],action:function(n){return n.toggleHeading({level:2})}},{label:t("text","Heading 3"),class:"icon-h3",isActive:["heading",{level:3}],action:function(n){return n.toggleHeading({level:3})}},{label:t("text","Heading 4"),class:"icon-h4",isActive:["heading",{level:4}],action:function(n){return n.toggleHeading({level:4})}},{label:t("text","Heading 5"),class:"icon-h5",isActive:["heading",{level:5}],action:function(n){return n.toggleHeading({level:5})}},{label:t("text","Heading 6"),class:"icon-h6",isActive:["heading",{level:6}],action:function(n){return n.toggleHeading({level:6})}}],priority:1},{label:t("text","Unordered list"),keyChar:"8",keyModifiers:["ctrl","shift"],class:"icon-ul",isActive:"bulletList",action:function(n){return n.toggleBulletList()},priority:8},{label:t("text","Ordered list"),keyChar:"9",keyModifiers:["ctrl","shift"],class:"icon-ol",isActive:"orderedList",action:function(n){return n.toggleOrderedList()},priority:9},{label:t("text","ToDo list"),class:"icon-tasklist",isActive:"taskList",action:function(n){return n.toggleTaskList()},priority:10},{label:t("text","Blockquote"),keyChar:">",keyModifiers:["ctrl"],class:"icon-quote",isActive:"blockquote",action:function(n){return n.toggleBlockquote()},priority:12},{label:t("text","Callouts"),visible:!1,children:[{label:t("text","Info"),class:"icon-info",isActive:["callout",{type:"info"}],action:function(n){return n.toggleCallout({type:"info"})}},{label:t("text","Success"),class:"icon-success",isActive:["callout",{type:"success"}],action:function(n){return n.toggleCallout({type:"success"})}},{label:t("text","Warning"),class:"icon-warn",isActive:["callout",{type:"warn"}],action:function(n){return n.toggleCallout({type:"warn"})}},{label:t("text","Danger"),class:"icon-error",isActive:["callout",{type:"error"}],action:function(n){return n.toggleCallout({type:"error"})}}],priority:5},{label:t("text","Code block"),class:"icon-code",isActive:"codeBlock",action:function(n){return n.toggleCodeBlock()},priority:13},{label:t("text","Table"),class:"icon-table",isActive:"table",action:function(n){return n.insertTable()},priority:16},{label:t("text","Emoji picker"),class:"icon-emoji",action:function(n,t){return n.emoji(t)},priority:6},{label:t("text","Insert image"),class:"icon-image",priority:2},{label:t("text","Formatting help"),class:"icon-help",click:function(n){return n.$emit("show-help")},priority:17}];var c=i(88052),l=i(79440),s=i.n(l),u=i(56286),A=i.n(u),d=i(26533),p=i.n(d),f=i(64056),h=i.n(f),b=i(2649),m=i.n(b),C=i(22200);function v(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null==e)return;var i,o,r=[],a=!0,c=!1;try{for(e=e.call(n);!(a=(i=e.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(n){c=!0,o=n}finally{try{a||null==e.return||e.return()}finally{if(c)throw o}}return r}(n,t)||k(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(n){return function(n){if(Array.isArray(n))return y(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||k(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(n,t){if(n){if("string"==typeof n)return y(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?y(n,t):void 0}}function y(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e<t;e++)i[e]=n[e];return i}const x={name:"MenuBar",components:{ActionButton:A(),PopoverMenu:p(),Actions:s(),EmojiPicker:h()},directives:{Tooltip:r(),ClickOutside:m()},mixins:[c.Z],props:{editor:{type:Object,required:!0},syncService:{type:Object,required:!1,default:null},isRichEditor:{type:Boolean,default:!0},autohide:{type:Boolean,default:!1},isPublic:{type:Boolean,default:!1},filePath:{type:String,required:!1,default:""},fileId:{type:Number,required:!1,default:0},uploadingImages:{type:Boolean,default:!1}},data:function(){return{windowWidth:0,windowHeight:0,forceRecompute:0,submenuVisibility:{},lastImagePath:null,icons:g(a)}},computed:{isHiddenInMenu:function(){var n=this;return function(t){return t.priority>n.iconCount}},getIconClasses:function(){var n=this;return function(t){var e={};return e[t.class]=!0,e["is-active"]=n.isActive(t),e}},isActive:function(){var n=this;return function(t){var e,i=t.isActive;if(!i)return!1;var o=Array.isArray(i)?i:[i];return(e=n.editor).isActive.apply(e,g(o))}},isVisible:function(){return this.editor.isFocused||Object.values(this.submenuVisibility).find((function(n){return n}))},disabled:function(){var n=this;return function(t){return t.action&&!t.action(n.editor.can())}},isChildMenuVisible:function(){var n=this;return function(t){return!!Object.prototype.hasOwnProperty.call(n.submenuVisibility,t.label)&&n.submenuVisibility[t.label]}},childPopoverMenu:function(){var n=this;return function(t,e){return t.map((function(t){return{text:t.label,icon:t.class,active:n.isActive(t),action:function(){n.clickIcon(t),n.hideChildMenu(e)}}}))}},childIconClasses:function(){var n=this;return function(t){var e=n.childIcon(t);return n.getIconClasses(e)}},childIcon:function(){var n=this;return function(t){return t.find((function(t){return n.isActive(t)}))||t[0]}},iconCount:function(){this.forceRecompute,this.windowWidth;var n=this.$refs.menubar&&this.$refs.menubar.clientWidth>200?this.$refs.menubar.clientWidth:200;return Math.max(Math.floor(n/44)-1,0)},imagePath:function(){return this.lastImagePath||this.filePath.split("/").slice(0,-1).join("/")}},mounted:function(){var n=this;window.addEventListener("resize",this.getWindowWidth),this.checkInterval=setInterval((function(){var t=n.$refs.menubar&&n.$refs.menubar.clientWidth>0;n.isRichEditor&&t&&n.redrawMenuBar(),n.isRichEditor&&!t||clearInterval(n.checkInterval)}),100),this.$emit("update:loaded",!0)},beforeDestroy:function(){window.removeEventListener("resize",this.getWindowWidth)},methods:{redrawMenuBar:function(){var n=this;this.$nextTick((function(){n.getWindowWidth(),n.forceRecompute++}))},refocus:function(){this.editor.chain().focus().run()},clickIcon:function(n){if(n.click)return n.click(this);var t=n.action(this.editor.chain().focus());t&&t.run()},getWindowWidth:function(n){this.windowWidth=document.documentElement.clientWidth},getWindowHeight:function(n){this.windowHeight=document.documentElement.clientHeight},hideChildMenu:function(n){var t=n.label;this.$set(this.submenuVisibility,t,!1)},hasSubmenu:function(n){return"icon-emoji"===n.class||n.children},toggleChildMenu:function(n){var t=n.label,e=!!Object.prototype.hasOwnProperty.call(this.submenuVisibility,t)&&this.submenuVisibility[t];this.$set(this.submenuVisibility,t,!e),e&&this.refocus()},onUploadImage:function(){this.$refs.imageFileInput.click()},onImageUploadFilePicked:function(n){this.$emit("image-upload",n.target.files),n.target.value=""},showImagePrompt:function(){var n=this;(0,C.getCurrentUser)()&&OC.dialogs.filepicker(t("text","Insert an image"),(function(t){n.$emit("image-insert",t)}),!1,[],!0,void 0,this.imagePath)},optimalPathTo:function(n){var t=n.split("/"),e=this.relativePathTo(n).split("/");return e.length<t.length?e.join("/"):n},relativePathTo:function(n){var t=this.filePath.split("/"),e=n.split("/");for(t.pop();t[0]===e[0];)t.shift(),e.shift();return t.fill("..").concat(e).join("/")},addEmoji:function(n,t){return n.action(this.editor.chain(),{id:t.id,native:t.native}).focus().run()},keysString:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i={ctrl:t("text","Ctrl"),alt:t("text","Alt"),shift:t("text","Shift")};return Object.entries(i).filter((function(n){var t=v(n,2),i=t[0];t[1];return e.includes(i)})).map((function(n){var t=v(n,2);t[0];return t[1]})).concat(n.toUpperCase()).join("+")},getKeys:function(n){return n.keyChar&&!this.isMobile?"(".concat(this.keysString(n.keyChar,n.keyModifiers),")"):""},getLabelAndKeys:function(n){return[n.label,this.getKeys(n)].join(" ")}}};var w=i(93379),_=i.n(w),I=i(7795),B=i.n(I),D=i(90569),E=i.n(D),M=i(3565),O=i.n(M),P=i(19216),j=i.n(P),S=i(44589),U=i.n(S),W=i(96379),L={};L.styleTagTransform=U(),L.setAttributes=O(),L.insert=E().bind(null,"head"),L.domAPI=B(),L.insertStyleElement=j();_()(W.Z,L);W.Z&&W.Z.locals&&W.Z.locals;const T=(0,i(51900).Z)(x,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"menubar",class:{show:n.isVisible,autohide:n.autohide}},[e("input",{ref:"imageFileInput",staticClass:"hidden-visually",attrs:{type:"file",accept:"image/*","aria-hidden":"true",multiple:!0},on:{change:n.onImageUploadFilePicked}}),n._v(" "),n.isRichEditor?e("div",{ref:"menubar",staticClass:"menubar-icons"},[n._l(n.icons,(function(t){return["icon-emoji"===t.class?e("EmojiPicker",{directives:[{name:"show",rawName:"v-show",value:t.priority<=n.iconCount,expression:"icon.priority <= iconCount"}],key:t.label,staticClass:"menuitem-emoji",on:{selectData:function(e){return n.addEmoji(t,e)}}},[e("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:n.t("text","Insert emoji"),expression:"t('text', 'Insert emoji')"}],staticClass:"icon-emoji",attrs:{"aria-label":n.t("text","Insert emoji"),"aria-haspopup":!0},on:{click:function(e){return n.toggleChildMenu(t)}}})]):"icon-image"===t.class?e("Actions",{key:t.label,ref:"imageActions",refInFor:!0,staticClass:"submenu",attrs:{"default-icon":"icon-image"},on:{open:function(e){return n.toggleChildMenu(t)},close:function(e){return n.toggleChildMenu(t)}}},[e("button",{class:{"icon-image":!0,"loading-small":n.uploadingImages},attrs:{slot:"icon",title:t.label,"aria-label":t.label,"aria-haspopup":!0},slot:"icon"}),n._v(" "),e("ActionButton",{attrs:{icon:"icon-upload","close-after-click":!0,disabled:n.uploadingImages},on:{click:function(t){return n.onUploadImage()}}},[n._v("\n\t\t\t\t\t"+n._s(n.t("text","Upload from computer"))+"\n\t\t\t\t")]),n._v(" "),n.isPublic?n._e():e("ActionButton",{attrs:{icon:"icon-folder","close-after-click":!0,disabled:n.uploadingImages},on:{click:function(t){return n.showImagePrompt()}}},[n._v("\n\t\t\t\t\t"+n._s(n.t("text","Insert from Files"))+"\n\t\t\t\t")])],1):t.class?e("button",{directives:[{name:"show",rawName:"v-show",value:t.priority<=n.iconCount,expression:"icon.priority <= iconCount"},{name:"tooltip",rawName:"v-tooltip",value:n.getLabelAndKeys(t),expression:"getLabelAndKeys(icon)"}],key:t.label,class:n.getIconClasses(t),attrs:{disabled:n.disabled(t)},on:{click:function(e){return n.clickIcon(t)}}}):[e("div",{directives:[{name:"show",rawName:"v-show",value:t.priority<=n.iconCount,expression:"icon.priority <= iconCount"},{name:"click-outside",rawName:"v-click-outside",value:function(){return n.hideChildMenu(t)},expression:"() => hideChildMenu(icon)"}],key:t.label,staticClass:"submenu"},[e("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:n.getLabelAndKeys(t),expression:"getLabelAndKeys(icon)"}],class:n.childIconClasses(t.children),on:{click:function(e){return e.preventDefault(),n.toggleChildMenu(t)}}}),n._v(" "),e("div",{staticClass:"popovermenu menu-center",class:{open:n.isChildMenuVisible(t)}},[e("PopoverMenu",{attrs:{menu:n.childPopoverMenu(t.children,t)}})],1)])]]})),n._v(" "),e("Actions",{on:{open:function(t){return n.toggleChildMenu({label:"Remaining Actions"})},close:function(t){return n.toggleChildMenu({label:"Remaining Actions"})}}},[n._l(n.icons,(function(t){return[t.class&&n.isHiddenInMenu(t)&&!n.hasSubmenu(t)?e("ActionButton",{directives:[{name:"tooltip",rawName:"v-tooltip",value:n.getKeys(t),expression:"getKeys(icon)"}],key:t.class,attrs:{icon:t.class,"close-after-click":!0},on:{click:function(e){return n.clickIcon(t)}}},[n._v("\n\t\t\t\t\t"+n._s(t.label)+"\n\t\t\t\t")]):n._e()]}))],2)],2):n._e(),n._v(" "),n._t("default",(function(){return[n._v("\n\t\tLeft side\n\t")]}))],2)}),[],!1,null,"2bc7f97a",null).exports},19078:(n,e,i)=>{i.r(e),i.d(e,{default:()=>I});var o=i(7049),r=i(26798),a=i(15168),c=i.n(a),l=i(22200),s=i(14695),u=i(16453);const A={name:"MenuBubble",components:{BubbleMenu:o.NM},directives:{tooltip:c()},props:{editor:{type:Object,required:!0},contentWrapper:{type:HTMLDivElement,required:!1,default:null},filePath:{type:String,required:!1,default:""}},data:function(){return{linkUrl:null,linkMenuIsActive:!1,isUsingDirectEditing:null!==(0,u.loadState)("text","directEditingToken",null)}},methods:{showLinkMenu:function(){var n=this,t=(0,r.Jo)(this.editor.state,"link");this.linkUrl=t.href,this.linkMenuIsActive=!0,this.$nextTick((function(){n.$refs.linkInput.focus()}))},hideLinkMenu:function(){this.linkUrl=null,this.linkMenuIsActive=!1},selectFile:function(){var n=this;if((0,l.getCurrentUser)()){var e=this.filePath.split("/").slice(0,-1).join("/");OC.dialogs.filepicker(t("text","Select file to link to"),(function(t){OC.Files.getClient().getFileInfo(t).then((function(t,e){var i=(0,s.Lz)(n.filePath,"".concat(e.path,"/").concat(e.name)).split("/").map(encodeURIComponent).join("/"),o="".concat(i,"?fileId=").concat(e.id);n.editor.chain().setLink({href:o}).focus().run(),n.hideLinkMenu()}))}),!1,[],!0,void 0,e)}},setLinkUrl:function(){var n=this.linkUrl;n&&![/^[a-zA-Z]+:/,/^\//,/\?fileId=/,/^\.\.?\//,/^[^.]*[/$]/,/^#/].find((function(t){return n.match(t)}))&&(n="https://"+n);var t=n.replaceAll(" ","%20");this.editor.chain().setLink({href:t}).focus().run(),this.hideLinkMenu()},removeLinkUrl:function(){this.editor.chain().unsetLink().focus().run()},isActive:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.editor.isActive(n,t)}}};var d=i(93379),p=i.n(d),f=i(7795),h=i.n(f),b=i(90569),m=i.n(b),C=i(3565),v=i.n(C),g=i(19216),k=i.n(g),y=i(44589),x=i.n(y),w=i(48375),_={};_.styleTagTransform=x(),_.setAttributes=v(),_.insert=m().bind(null,"head"),_.domAPI=h(),_.insertStyleElement=k();p()(w.Z,_);w.Z&&w.Z.locals&&w.Z.locals;const I=(0,i(51900).Z)(A,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("BubbleMenu",{staticClass:"menububble",attrs:{editor:n.editor,"tippy-options":{onHide:n.hideLinkMenu,duration:200,placement:"bottom"}}},[n.linkMenuIsActive?e("form",{staticClass:"menububble__form",on:{submit:function(t){return t.preventDefault(),n.setLinkUrl()}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:n.linkUrl,expression:"linkUrl"}],ref:"linkInput",staticClass:"menububble__input",attrs:{type:"text",placeholder:"https://"},domProps:{value:n.linkUrl},on:{keydown:function(t){return!t.type.indexOf("key")&&n._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:n.hideLinkMenu.apply(null,arguments)},input:function(t){t.target.composing||(n.linkUrl=t.target.value)}}}),n._v(" "),e("button",{staticClass:"menububble__button icon-confirm",attrs:{type:"button",tabindex:"0"},on:{click:function(t){return n.setLinkUrl()}}})]):[e("button",{staticClass:"menububble__button",class:{"is-active":n.isActive("link")},on:{click:function(t){return n.showLinkMenu()}}},[e("span",{staticClass:"icon-link"}),n._v(" "),e("span",{staticClass:"menububble__buttontext"},[n._v("\n\t\t\t\t"+n._s(n.isActive("link")?n.t("text","Update Link"):n.t("text","Add Link"))+"\n\t\t\t")])]),n._v(" "),n.isUsingDirectEditing?n._e():e("button",{staticClass:"menububble__button",class:{"is-active":n.isActive("link")},on:{click:function(t){return n.selectFile()}}},[e("span",{staticClass:"icon-file"}),n._v(" "),e("span",{staticClass:"menububble__buttontext"},[n._v(n._s(n.t("text","Link file")))])]),n._v(" "),n.isActive("link")?e("button",{staticClass:"menububble__button",class:{"is-active":n.isActive("link")},on:{click:function(t){return n.removeLinkUrl()}}},[e("span",{staticClass:"icon-delete"}),n._v(" "),e("span",{staticClass:"menububble__buttontext"},[n._v("\n\t\t\t\t"+n._s(n.t("text","Remove Link"))+"\n\t\t\t")])]):n._e()]],2)}),[],!1,null,"23aa9303",null).exports}}]);
-//# sourceMappingURL=editor-rich.js.map?v=b0e49e9135d38107f421 \ No newline at end of file
+"use strict";(self.webpackChunktext=self.webpackChunktext||[]).push([["editor-rich"],{14695:(n,e,i)=>{i.d(e,{h0:()=>U,Lz:()=>P,YZ:()=>S,tH:()=>j});var o=i(74411),r=i(27594);function a(n,t,e,i,o,r,a){try{var c=n[r](a),l=c.value}catch(n){return void e(n)}c.done?t(l):Promise.resolve(l).then(i,o)}const c={name:"RichWorkspace",components:{EditorWrapper:function(){return Promise.all([i.e("vendors"),i.e("editor")]).then(i.bind(i,96479))}},props:{file:{type:Object,default:null},folder:{type:Object,default:null}},data:function(){return{focus:!1,loaded:!1,ready:!1,autofocus:!1,darkTheme:OCA.Accessibility&&"dark"===OCA.Accessibility.theme,enabled:OCA.Text.RichWorkspaceEnabled}},computed:{shareToken:function(){var n;return null===(n=document.getElementById("sharingToken"))||void 0===n?void 0:n.value},canCreate:function(){return!!(this.folder&&this.folder.permissions&OC.PERMISSION_CREATE)},showEmptyWorkspace:function(){return(!this.file||this.autofocus&&!this.ready)&&this.canCreate},filepath:function(){var n=this.file,t=n.path,e=n.name;return t+(t.endsWith("/")?"":"/")+e}},watch:{focus:function(n){n||document.querySelector("#editor").scrollTo(0,0)}},mounted:function(){var n,t=this;return(n=regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:(0,r.subscribe)("Text::showRichWorkspace",(function(){t.enabled=!0})),(0,r.subscribe)("Text::hideRichWorkspace",(function(){t.enabled=!1}));case 2:case"end":return n.stop()}}),n)})),function(){var t=this,e=arguments;return new Promise((function(i,o){var r=n.apply(t,e);function c(n){a(r,i,o,c,l,"next",n)}function l(n){a(r,i,o,c,l,"throw",n)}c(void 0)}))})()},methods:{unfocus:function(){},reset:function(){var n=this;this.focus=!1,this.$nextTick((function(){n.creating=!1}))},createNew:function(){this.creating||(this.creating=!0,this.autofocus=!0,this.file||window.FileList.createFile("Readme.md",{scrollTo:!1,animate:!1}))}}};var l=i(93379),s=i.n(l),u=i(7795),A=i.n(u),d=i(90569),p=i.n(d),f=i(3565),h=i.n(f),b=i(19216),m=i.n(b),C=i(44589),v=i.n(C),g=i(56735),k={};k.styleTagTransform=v(),k.setAttributes=h(),k.insert=p().bind(null,"head"),k.domAPI=A(),k.insertStyleElement=m();s()(g.Z,k);g.Z&&g.Z.locals&&g.Z.locals;const y=(0,i(51900).Z)(c,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return n.enabled?e("div",{class:{"icon-loading":!n.loaded||!n.ready,focus:n.focus,dark:n.darkTheme,creatable:n.canCreate},attrs:{id:"rich-workspace"}},[n.showEmptyWorkspace?e("div",{staticClass:"empty-workspace",on:{click:n.createNew}},[e("p",{staticClass:"placeholder"},[n._v("\n\t\t\t"+n._s(n.t("text","Add notes, lists or links …"))+"\n\t\t")])]):n._e(),n._v(" "),n.file?e("EditorWrapper",{directives:[{name:"show",rawName:"v-show",value:n.ready,expression:"ready"}],key:n.file.path,attrs:{"file-id":n.file.id,"relative-path":n.filepath,"share-token":n.shareToken,active:!0,autohide:!0,mime:n.file.mimetype,autofocus:n.autofocus},on:{ready:function(t){n.ready=!0,n.loaded=!0},focus:function(t){n.focus=!0},blur:n.unfocus,error:n.reset}}):n._e()],1):n._e()}),[],!1,null,"6af3308d",null).exports;var x=i(79753),w=i(23895),_=i(25108);function I(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,i)}return e}function B(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?I(Object(e),!0).forEach((function(t){D(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):I(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function D(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function E(n){return function(n){if(Array.isArray(n))return M(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,t){if(!n)return;if("string"==typeof n)return M(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return M(n,t)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e<t;e++)i[e]=n[e];return i}var O="Edit with text app",P=function(n,t){var e=n.split("/"),i=t.split("/");for(e.pop();e[0]===i[0];)e.shift(),i.shift();var o=e.fill("..").concat(i),r=t.split("/");return o.length<r.length?o.join("/"):t},j=function(){var n={attach:function(n){var e=n.fileList;"files"!==e.id&&"files.public"!==e.id||n.addMenuEntry({id:"file",displayName:t("text","New text document"),templateName:t("text","New text document")+".md",iconClass:"icon-filetype-text",fileType:"file",actionHandler:function(n){e.createFile(n).then((function(n,t){var i=new OCA.Files.FileInfoModel(t);void 0!==OCA.Viewer?OCA.Files.fileActions.triggerAction("view",i,e):void 0===OCA.Viewer&&OCA.Files.fileActions.triggerAction(O,i,e)}))}})}};OC.Plugins.register("OCA.Files.NewFileMenu",n)},S=function(){var n=document.getElementById("sharingToken")?document.getElementById("sharingToken").value:null,e=document.getElementById("dir").value;if(!n||""!==e){var r=document.createElement("div");r.id="text-viewer-fallback",document.body.appendChild(r);for(var a=function(e){return OCA.Files.fileActions.register(e,O,OC.PERMISSION_UPDATE|OC.PERMISSION_READ,(0,x.imagePath)("core","actions/rename"),(function(t){var e=window.FileList.findFile(t);Promise.all([Promise.resolve().then(i.bind(i,20144)),Promise.all([i.e("vendors"),i.e("files-modal")]).then(i.bind(i,19886))]).then((function(i){var o=window.FileList.getCurrentDirectory()+"/"+t,a=i[0].default;a.prototype.t=window.t,a.prototype.n=window.n,a.prototype.OCA=window.OCA;var c=i[1].default;new a({render:function(t){var i=this;return t(c,{props:{fileId:e?e.id:null,active:!0,shareToken:n,relativePath:o,mimeType:e.mimetype},on:{close:function(){i.$destroy()}}})}}).$mount(r)}))}),t("text","Edit"))},c=0;c<o.SP.length;c++)a(o.SP[c]),OCA.Files.fileActions.setDefault(o.SP[c],O)}},U={el:null,vm:null,attach:function(n){var t=this;if("files"===n.id||"files.public"===n.id){this.el=document.createElement("div"),n.registerHeader({id:"workspace",el:this.el,render:this.render.bind(this),priority:10});var e="{".concat(OC.Files.Client.NS_NEXTCLOUD,"}rich-workspace-file"),i=n._getWebdavProperties;n._getWebdavProperties=function(){return[].concat(E(i.apply(this,arguments)),[e])};var o=null;n.filesClient.addFileInfoParser((function(i,r){if("httpd/unix-directory"===r.mimetype){var a=i.propStat[0].properties;r.path+(r.path.endsWith("/")?"":"/")+r.name===n.getCurrentDirectory()&&(o=a[e],t.vm.folder={permissions:r.permissions},t.vm.loaded=!0,t.vm.ready=!0)}if(o&&r.id===o)return"text/markdown"!==r.mimetype&&_.warn("Expected workspace file to be markdown:",r),void t.open(r);"Readme.md"===r.name&&"text/markdown"===r.mimetype&&r.path===n.getCurrentDirectory()&&t.open(r)}))}},render:function(n){var t=this;"files"!==n.id&&"files.public"!==n.id||Promise.resolve().then(i.bind(i,20144)).then((function(e){var i=e.default;t.el.id="files-workspace-wrapper",i.prototype.t=window.t,i.prototype.n=window.n,i.prototype.OCA=window.OCA;var o=i.extend(y);t.vm=new o({propsData:{file:null,folder:null},store:w.Z}).$mount(t.el),n.$el.on("urlChanged",(function(n){t.vm.file=null,t.vm.folder=null})),n.$el.on("changeDirectory",(function(n){t.vm.file=null,t.vm.folder=null}))}))},open:function(n){var t=this.vm.file,e=parseInt(n.id);this.vm.file=B(B({},n),{},{id:e}),(null==t?void 0:t.id)!==e&&(this.vm.ready=!1)}}},74411:(n,t,e)=>{e.d(t,{SP:()=>r,lF:()=>i,w_:()=>o});var i=["text/markdown"],o=["text/plain","application/cmd","application/x-empty","application/x-msdos-program","application/javascript","application/json","application/x-perl","application/x-php","application/x-tex","application/xml","application/yaml","text/css","text/csv","text/html","text/org","text/x-c","text/x-c++src","text/x-h","text/x-java-source","text/x-ldif","text/x-python","text/x-shellscript"],r=[].concat(i,o)},96379:(n,t,e)=>{e.d(t,{Z:()=>c});var i=e(87537),o=e.n(i),r=e(23645),a=e.n(r)()(o());a.push([n.id,'.menubar[data-v-2bc7f97a]{--background-blur: blur(10px);position:fixed;position:-webkit-sticky;position:sticky;top:0;display:flex;justify-content:flex-end;z-index:10021;background-color:var(--color-main-background-translucent);-webkit-backdrop-filter:var(--background-blur);backdrop-filter:var(--background-blur);max-height:44px;padding-top:3px;padding-bottom:3px}.menubar.autohide[data-v-2bc7f97a]{visibility:hidden;opacity:0;transition:visibility .2s .4s,opacity .2s .4s}.menubar.autohide.show[data-v-2bc7f97a]{visibility:visible;opacity:1}.menubar .menubar-icons[data-v-2bc7f97a]{flex-grow:1;margin-left:calc((100% - 660px)/2)}@media(max-width: 660px){.menubar .menubar-icons[data-v-2bc7f97a]{margin-left:0}}.menubar[data-v-2bc7f97a] .action-item__menu ul{max-height:calc(100vh - 88px);overflow:scroll}.menubar button[data-v-2bc7f97a]{position:relative;width:44px;height:44px;margin:0;background-size:16px;border:0;background-color:transparent;opacity:.5;color:var(--color-main-text);background-position:center center;vertical-align:top}.menubar button[data-v-2bc7f97a]:hover,.menubar button[data-v-2bc7f97a]:focus,.menubar button[data-v-2bc7f97a]:active{background-color:var(--color-background-dark)}.menubar button.is-active[data-v-2bc7f97a]::before{transform:translateX(-50%);border-radius:100%;position:absolute;background:var(--color-primary-element);bottom:3px;height:6px;width:6px;content:"";left:50%}.menubar button.is-active[data-v-2bc7f97a],.menubar button[data-v-2bc7f97a]:hover,.menubar button[data-v-2bc7f97a]:focus{opacity:1}.menubar button.icon-undo[data-v-2bc7f97a],.menubar button.icon-redo[data-v-2bc7f97a]{opacity:.8}.menubar button.icon-undo[data-v-2bc7f97a]:disabled,.menubar button.icon-redo[data-v-2bc7f97a]:disabled{opacity:.4}.menubar .submenu[data-v-2bc7f97a],.menubar .menuitem-emoji[data-v-2bc7f97a]{display:inline-block;width:44px;height:44px;position:relative;vertical-align:top}',"",{version:3,sources:["webpack://./src/components/MenuBar.vue"],names:[],mappings:"AAiYA,0BACC,6BAAA,CACA,cAAA,CACA,uBAAA,CACA,eAAA,CACA,KAAA,CACA,YAAA,CACA,wBAAA,CACA,aAAA,CACA,yDAAA,CACA,8CAAA,CACA,sCAAA,CACA,eAAA,CACA,eAAA,CACA,kBAAA,CAEA,mCACC,iBAAA,CACA,SAAA,CACA,6CAAA,CACA,wCACC,kBAAA,CACA,SAAA,CAGF,yCACC,WAAA,CACA,kCAAA,CAED,yBACC,yCACC,aAAA,CAAA,CAGF,gDACC,6BAAA,CACA,eAAA,CAIF,iCACC,iBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,oBAAA,CACA,QAAA,CACA,4BAAA,CACA,UAAA,CACA,4BAAA,CACA,iCAAA,CACA,kBAAA,CACA,sHACC,6CAAA,CAGD,mDACC,0BAAA,CACA,kBAAA,CACA,iBAAA,CACA,uCAAA,CACA,UAAA,CACA,UAAA,CACA,SAAA,CACA,UAAA,CACA,QAAA,CAGD,yHAGC,SAAA,CAGD,sFAEC,UAAA,CAEA,wGACC,UAAA,CAKH,6EACC,oBAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,kBAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.menubar {\n\t--background-blur: blur(10px);\n\tposition: fixed;\n\tposition: -webkit-sticky;\n\tposition: sticky;\n\ttop: 0;\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tz-index: 10021; // above modal-header and menububble so menubar is always on top\n\tbackground-color: var(--color-main-background-translucent);\n\t-webkit-backdrop-filter: var(--background-blur);\n\tbackdrop-filter: var(--background-blur);\n\tmax-height: 44px; // important for mobile so that the buttons are always inside the container\n\tpadding-top:3px;\n\tpadding-bottom: 3px;\n\n\t&.autohide {\n\t\tvisibility: hidden;\n\t\topacity: 0;\n\t\ttransition: visibility 0.2s 0.4s, opacity 0.2s 0.4s;\n\t\t&.show {\n\t\t\tvisibility: visible;\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t.menubar-icons {\n\t\tflex-grow: 1;\n\t\tmargin-left: calc((100% - 660px) / 2);\n\t}\n\t@media (max-width: 660px) {\n\t\t.menubar-icons {\n\t\t\tmargin-left: 0;\n\t\t}\n\t}\n\t&::v-deep .action-item__menu ul {\n\t\tmax-height: calc(100vh - 88px);\n\t\toverflow: scroll;\n\t}\n}\n\n.menubar button {\n\tposition: relative;\n\twidth: 44px;\n\theight: 44px;\n\tmargin: 0;\n\tbackground-size: 16px;\n\tborder: 0;\n\tbackground-color: transparent;\n\topacity: .5;\n\tcolor: var(--color-main-text);\n\tbackground-position: center center;\n\tvertical-align: top;\n\t&:hover, &:focus, &:active {\n\t\tbackground-color: var(--color-background-dark);\n\t}\n\n\t&.is-active::before {\n\t\ttransform: translateX(-50%);\n\t\tborder-radius: 100%;\n\t\tposition: absolute;\n\t\tbackground: var(--color-primary-element);\n\t\tbottom: 3px;\n\t\theight: 6px;\n\t\twidth: 6px;\n\t\tcontent: '';\n\t\tleft: 50%;\n\n\t}\n\t&.is-active,\n\t&:hover,\n\t&:focus {\n\t\topacity: 1;\n\t}\n\n\t&.icon-undo,\n\t&.icon-redo {\n\t\topacity: .8;\n\n\t\t&:disabled {\n\t\t\topacity: .4;\n\t\t}\n\t}\n}\n\n.menubar .submenu, .menubar .menuitem-emoji {\n\tdisplay: inline-block;\n\twidth: 44px;\n\theight: 44px;\n\tposition: relative;\n\tvertical-align: top;\n}\n"],sourceRoot:""}]);const c=a},48375:(n,t,e)=>{e.d(t,{Z:()=>c});var i=e(87537),o=e.n(i),r=e(23645),a=e.n(r)()(o());a.push([n.id,".menububble[data-v-23aa9303]{display:flex;z-index:10020;background:var(--color-main-background-translucent);box-shadow:0 1px 5px var(--color-box-shadow);border-radius:var(--border-radius-large);overflow:hidden;padding:0;margin-left:10px;height:44px}.menububble__button[data-v-23aa9303]{display:block;flex-grow:1;border:0;padding:.9rem .7rem;margin:0;border-radius:0;cursor:pointer;background-color:var(--color-main-background);border-right:1px solid var(--color-border)}.menububble__button[data-v-23aa9303]:focus,.menububble__button[data-v-23aa9303]:hover{background-color:var(--color-background-hover);border:0;border-right:1px solid var(--color-border) !important}.menububble__button[data-v-23aa9303]:last-child{border:0 !important}.menububble__buttontext[data-v-23aa9303]{padding:.4rem;padding-right:0}.menububble__form[data-v-23aa9303]{display:flex;align-items:center}.menububble__input[data-v-23aa9303]{font:inherit;border:none;background:transparent;min-width:250px}","",{version:3,sources:["webpack://./src/components/MenuBubble.vue"],names:[],mappings:"AAyKA,6BACC,YAAA,CACA,aAAA,CACA,mDAAA,CACA,4CAAA,CACA,wCAAA,CACA,eAAA,CACA,SAAA,CACA,gBAAA,CACA,WAAA,CAEA,qCACC,aAAA,CACA,WAAA,CACA,QAAA,CACA,mBAAA,CACA,QAAA,CACA,eAAA,CACA,cAAA,CACA,6CAAA,CACA,0CAAA,CAEA,sFAEC,8CAAA,CACA,QAAA,CACA,qDAAA,CAGD,gDACC,mBAAA,CAIF,yCACC,aAAA,CACA,eAAA,CAGD,mCACC,YAAA,CACA,kBAAA,CAGD,oCACC,YAAA,CACA,WAAA,CACA,sBAAA,CACA,eAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.menububble {\n\tdisplay: flex;\n\tz-index: 10020;\n\tbackground: var(--color-main-background-translucent);\n\tbox-shadow: 0 1px 5px var(--color-box-shadow);\n\tborder-radius: var(--border-radius-large);\n\toverflow: hidden;\n\tpadding: 0;\n\tmargin-left: 10px;\n\theight: 44px;\n\n\t&__button {\n\t\tdisplay: block;\n\t\tflex-grow: 1;\n\t\tborder: 0;\n\t\tpadding: 0.9rem 0.7rem;\n\t\tmargin: 0;\n\t\tborder-radius: 0;\n\t\tcursor: pointer;\n\t\tbackground-color: var(--color-main-background);\n\t\tborder-right: 1px solid var(--color-border);\n\n\t\t&:focus,\n\t\t&:hover {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t\tborder: 0;\n\t\t\tborder-right: 1px solid var(--color-border) !important;\n\t\t}\n\n\t\t&:last-child {\n\t\t\tborder: 0 !important;\n\t\t}\n\t}\n\n\t&__buttontext {\n\t\tpadding: 0.4rem;\n\t\tpadding-right: 0;\n\t}\n\n\t&__form {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t&__input {\n\t\tfont: inherit;\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\tmin-width: 250px;\n\t}\n}\n"],sourceRoot:""}]);const c=a},56735:(n,t,e)=>{e.d(t,{Z:()=>c});var i=e(87537),o=e.n(i),r=e(23645),a=e.n(r)()(o());a.push([n.id,'#rich-workspace[data-v-6af3308d]{padding:0 50px;margin-bottom:-24px;text-align:left;max-height:0;transition:max-height .5s cubic-bezier(0, 1, 0, 1);z-index:61;position:relative}#rich-workspace.creatable[data-v-6af3308d]{min-height:90px}#rich-workspace[data-v-6af3308d]:only-child{margin-bottom:0}.empty-workspace[data-v-6af3308d]{padding-top:43px;color:var(--color-text-maxcontrast);height:0}#rich-workspace[data-v-6af3308d] div[contenteditable=false]{width:100%;padding:0px;background-color:var(--color-main-background);opacity:1;border:none}#rich-workspace[data-v-6af3308d] #editor-container{height:100%;position:unset !important;top:auto !important}#rich-workspace[data-v-6af3308d] #editor-wrapper{position:unset !important;overflow:visible}#rich-workspace[data-v-6af3308d] #editor{overflow:visible !important}#rich-workspace[data-v-6af3308d] .content-wrapper{overflow:scroll !important;max-height:calc(40vh - 50px);padding-left:10px;padding-bottom:60px}#rich-workspace[data-v-6af3308d] #editor-wrapper .ProseMirror{padding:0px;margin:0}#rich-workspace[data-v-6af3308d] .menubar{z-index:61;margin-bottom:-10px}#rich-workspace[data-v-6af3308d] .menubar .menubar-icons{margin-left:0}#rich-workspace[data-v-6af3308d] .editor__content{margin:0}#rich-workspace.focus[data-v-6af3308d]{max-height:50vh}#rich-workspace[data-v-6af3308d]:not(.focus){max-height:30vh;position:relative;overflow:hidden}#rich-workspace[data-v-6af3308d]:not(.focus):not(.icon-loading):after{content:"";position:absolute;z-index:1;bottom:0;left:0;pointer-events:none;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));width:100%;height:4em}#rich-workspace.dark[data-v-6af3308d]:not(.focus):not(.icon-loading):after{background-image:linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background))}@media only screen and (max-width: 1024px){#rich-workspace[data-v-6af3308d]:not(.focus){max-height:30vh}}html.ie #rich-workspace[data-v-6af3308d] #editor-container{position:initial}html.ie #rich-workspace[data-v-6af3308d] #editor-wrapper{position:relative !important;top:auto !important}html.ie #rich-workspace[data-v-6af3308d] #editor{display:flex;flex-direction:column;overflow:hidden !important}html.ie #rich-workspace[data-v-6af3308d] .menubar{position:relative;overflow:hidden;flex-shrink:0;height:44px;top:auto}html.ie #rich-workspace[data-v-6af3308d] #editor>div:nth-child(2){min-height:44px;overflow-x:hidden;overflow-y:auto;flex-shrink:1}',"",{version:3,sources:["webpack://./src/views/RichWorkspace.vue"],names:[],mappings:"AAkIA,iCACC,cAAA,CAEA,mBAAA,CACA,eAAA,CACA,YAAA,CACA,kDAAA,CACA,UAAA,CACA,iBAAA,CACA,2CACC,eAAA,CAKF,4CACC,eAAA,CAGD,kCACC,gBAAA,CACA,mCAAA,CACA,QAAA,CAGD,4DACC,UAAA,CACA,WAAA,CACA,6CAAA,CACA,SAAA,CACA,WAAA,CAGD,mDACC,WAAA,CACA,yBAAA,CACA,mBAAA,CAGD,iDACC,yBAAA,CACA,gBAAA,CAGD,yCACC,2BAAA,CAGD,kDACC,0BAAA,CACA,4BAAA,CACA,iBAAA,CACA,mBAAA,CAGD,8DACC,WAAA,CACA,QAAA,CAGD,0CACC,UAAA,CAEA,mBAAA,CAGD,yDACC,aAAA,CAGD,kDACC,QAAA,CAGD,uCACC,eAAA,CAGD,6CACC,eAAA,CACA,iBAAA,CACA,eAAA,CAGD,sEACC,UAAA,CACA,iBAAA,CACA,SAAA,CACA,QAAA,CACA,MAAA,CACA,mBAAA,CACA,iGAAA,CACA,UAAA,CACA,UAAA,CAGD,2EACC,2FAAA,CAGD,2CACC,6CACC,eAAA,CAAA,CAMA,2DACC,gBAAA,CAGD,yDACC,4BAAA,CACA,mBAAA,CAGD,iDACC,YAAA,CACA,qBAAA,CACA,0BAAA,CAGD,kDACC,iBAAA,CACA,eAAA,CACA,aAAA,CACA,WAAA,CACA,QAAA,CAGD,kEACC,eAAA,CACA,iBAAA,CACA,eAAA,CACA,aAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#rich-workspace {\n\tpadding: 0 50px;\n\t/* Slightly reduce vertical space */\n\tmargin-bottom: -24px;\n\ttext-align: left;\n\tmax-height: 0;\n\ttransition: max-height 0.5s cubic-bezier(0, 1, 0, 1);\n\tz-index: 61;\n\tposition: relative;\n\t&.creatable {\n\t\tmin-height: 90px;\n\t}\n}\n\n/* For subfolders, where there are no Recommendations */\n#rich-workspace:only-child {\n\tmargin-bottom: 0;\n}\n\n.empty-workspace {\n\tpadding-top: 43px;\n\tcolor: var(--color-text-maxcontrast);\n\theight: 0;\n}\n\n#rich-workspace::v-deep div[contenteditable=false] {\n\twidth: 100%;\n\tpadding: 0px;\n\tbackground-color: var(--color-main-background);\n\topacity: 1;\n\tborder: none;\n}\n\n#rich-workspace::v-deep #editor-container {\n\theight: 100%;\n\tposition: unset !important;\n\ttop: auto !important;\n}\n\n#rich-workspace::v-deep #editor-wrapper {\n\tposition: unset !important;\n\toverflow: visible;\n}\n\n#rich-workspace::v-deep #editor {\n\toverflow: visible !important;\n}\n\n#rich-workspace::v-deep .content-wrapper {\n\toverflow: scroll !important;\n\tmax-height: calc(40vh - 50px);\n\tpadding-left: 10px;\n\tpadding-bottom: 60px; /* ensure menububble fits below */\n}\n\n#rich-workspace::v-deep #editor-wrapper .ProseMirror {\n\tpadding: 0px;\n\tmargin: 0;\n}\n\n#rich-workspace::v-deep .menubar {\n\tz-index: 61;\n\t/* Slightly reduce vertical space */\n\tmargin-bottom: -10px;\n}\n\n#rich-workspace::v-deep .menubar .menubar-icons {\n\tmargin-left: 0;\n}\n\n#rich-workspace::v-deep .editor__content {\n\tmargin: 0;\n}\n\n#rich-workspace.focus {\n\tmax-height: 50vh;\n}\n\n#rich-workspace:not(.focus) {\n\tmax-height: 30vh;\n\tposition: relative;\n\toverflow: hidden;\n}\n\n#rich-workspace:not(.focus):not(.icon-loading):after {\n\tcontent: '';\n\tposition: absolute;\n\tz-index: 1;\n\tbottom: 0;\n\tleft: 0;\n\tpointer-events: none;\n\tbackground-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\n\twidth: 100%;\n\theight: 4em;\n}\n\n#rich-workspace.dark:not(.focus):not(.icon-loading):after {\n\tbackground-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background));\n}\n\n@media only screen and (max-width: 1024px) {\n\t#rich-workspace:not(.focus) {\n\t\tmax-height: 30vh;\n\t}\n}\n\nhtml.ie {\n\t#rich-workspace::v-deep {\n\t\t#editor-container {\n\t\t\tposition: initial;\n\t\t}\n\n\t\t#editor-wrapper {\n\t\t\tposition: relative !important;\n\t\t\ttop: auto !important;\n\t\t}\n\n\t\t#editor {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\toverflow: hidden !important;\n\t\t}\n\n\t\t.menubar {\n\t\t\tposition: relative;\n\t\t\toverflow: hidden;\n\t\t\tflex-shrink: 0;\n\t\t\theight: 44px;\n\t\t\ttop: auto;\n\t\t}\n\n\t\t#editor > div:nth-child(2) {\n\t\t\tmin-height: 44px;\n\t\t\toverflow-x: hidden;\n\t\t\toverflow-y: auto;\n\t\t\tflex-shrink: 1;\n\t\t}\n\t}\n}\n\n"],sourceRoot:""}]);const c=a},37276:(n,e,i)=>{i.r(e),i.d(e,{default:()=>T});var o=i(15168),r=i.n(o);const a=[{label:t("text","Undo"),keyChar:"z",keyModifiers:["ctrl"],class:"icon-undo",action:function(n){return n.undo()},priority:5},{label:t("text","Redo"),keyChar:"y",keyModifiers:["ctrl"],class:"icon-redo",action:function(n){return n.redo()},priority:11},{label:t("text","Bold"),keyChar:"b",keyModifiers:["ctrl"],class:"icon-bold",isActive:"strong",action:function(n){return n.toggleBold()},priority:6},{label:t("text","Italic"),keyChar:"i",keyModifiers:["ctrl"],class:"icon-italic",isActive:"em",action:function(n){return n.toggleItalic()},priority:7},{label:t("text","Underline"),keyChar:"u",keyModifiers:["ctrl"],class:"icon-underline",isActive:"underline",action:function(n){return n.toggleUnderline()},priority:14},{label:t("text","Strikethrough"),keyChar:"d",keyModifiers:["ctrl"],class:"icon-strike",isActive:"strike",action:function(n){return n.toggleStrike()},priority:15},{label:t("text","Headings"),keyChar:"1…6",keyModifiers:["ctrl","shift"],visible:!1,children:[{label:t("text","Heading 1"),class:"icon-h1",isActive:["heading",{level:1}],action:function(n){return n.toggleHeading({level:1})}},{label:t("text","Heading 2"),class:"icon-h2",isActive:["heading",{level:2}],action:function(n){return n.toggleHeading({level:2})}},{label:t("text","Heading 3"),class:"icon-h3",isActive:["heading",{level:3}],action:function(n){return n.toggleHeading({level:3})}},{label:t("text","Heading 4"),class:"icon-h4",isActive:["heading",{level:4}],action:function(n){return n.toggleHeading({level:4})}},{label:t("text","Heading 5"),class:"icon-h5",isActive:["heading",{level:5}],action:function(n){return n.toggleHeading({level:5})}},{label:t("text","Heading 6"),class:"icon-h6",isActive:["heading",{level:6}],action:function(n){return n.toggleHeading({level:6})}}],priority:1},{label:t("text","Unordered list"),keyChar:"8",keyModifiers:["ctrl","shift"],class:"icon-ul",isActive:"bulletList",action:function(n){return n.toggleBulletList()},priority:8},{label:t("text","Ordered list"),keyChar:"9",keyModifiers:["ctrl","shift"],class:"icon-ol",isActive:"orderedList",action:function(n){return n.toggleOrderedList()},priority:9},{label:t("text","ToDo list"),class:"icon-tasklist",isActive:"taskList",action:function(n){return n.toggleTaskList()},priority:10},{label:t("text","Blockquote"),keyChar:">",keyModifiers:["ctrl"],class:"icon-quote",isActive:"blockquote",action:function(n){return n.toggleBlockquote()},priority:12},{label:t("text","Callouts"),visible:!1,children:[{label:t("text","Info"),class:"icon-info",isActive:["callout",{type:"info"}],action:function(n){return n.toggleCallout({type:"info"})}},{label:t("text","Success"),class:"icon-success",isActive:["callout",{type:"success"}],action:function(n){return n.toggleCallout({type:"success"})}},{label:t("text","Warning"),class:"icon-warn",isActive:["callout",{type:"warn"}],action:function(n){return n.toggleCallout({type:"warn"})}},{label:t("text","Danger"),class:"icon-error",isActive:["callout",{type:"error"}],action:function(n){return n.toggleCallout({type:"error"})}}],priority:3},{label:t("text","Code block"),class:"icon-code",isActive:"codeBlock",action:function(n){return n.toggleCodeBlock()},priority:13},{label:t("text","Table"),class:"icon-table",isActive:"table",action:function(n){return n.insertTable()},priority:16},{label:t("text","Emoji picker"),class:"icon-emoji",action:function(n,t){return n.emoji(t)},priority:4},{label:t("text","Insert image"),class:"icon-image",priority:2},{label:t("text","Formatting help"),class:"icon-help",click:function(n){return n.$emit("show-help")},priority:17}];var c=i(88052),l=i(79440),s=i.n(l),u=i(56286),A=i.n(u),d=i(26533),p=i.n(d),f=i(64056),h=i.n(f),b=i(2649),m=i.n(b),C=i(22200);function v(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null==e)return;var i,o,r=[],a=!0,c=!1;try{for(e=e.call(n);!(a=(i=e.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(n){c=!0,o=n}finally{try{a||null==e.return||e.return()}finally{if(c)throw o}}return r}(n,t)||k(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(n){return function(n){if(Array.isArray(n))return y(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||k(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(n,t){if(n){if("string"==typeof n)return y(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?y(n,t):void 0}}function y(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e<t;e++)i[e]=n[e];return i}const x={name:"MenuBar",components:{ActionButton:A(),PopoverMenu:p(),Actions:s(),EmojiPicker:h()},directives:{Tooltip:r(),ClickOutside:m()},mixins:[c.Z],props:{editor:{type:Object,required:!0},syncService:{type:Object,required:!1,default:null},isRichEditor:{type:Boolean,default:!0},autohide:{type:Boolean,default:!1},isPublic:{type:Boolean,default:!1},filePath:{type:String,required:!1,default:""},fileId:{type:Number,required:!1,default:0},uploadingImages:{type:Boolean,default:!1}},data:function(){return{windowWidth:0,windowHeight:0,forceRecompute:0,submenuVisibility:{},lastImagePath:null,icons:g(a)}},computed:{isHiddenInMenu:function(){var n=this;return function(t){return t.priority>n.iconCount}},getIconClasses:function(){var n=this;return function(t){var e={};return e[t.class]=!0,e["is-active"]=n.isActive(t),e}},isActive:function(){var n=this;return function(t){var e,i=t.isActive;if(!i)return!1;var o=Array.isArray(i)?i:[i];return(e=n.editor).isActive.apply(e,g(o))}},isVisible:function(){return this.editor.isFocused||Object.values(this.submenuVisibility).find((function(n){return n}))},disabled:function(){var n=this;return function(t){return t.action&&!t.action(n.editor.can())}},isChildMenuVisible:function(){var n=this;return function(t){return!!Object.prototype.hasOwnProperty.call(n.submenuVisibility,t.label)&&n.submenuVisibility[t.label]}},childPopoverMenu:function(){var n=this;return function(t,e){return t.map((function(t){return{text:t.label,icon:t.class,active:n.isActive(t),action:function(){n.clickIcon(t),n.hideChildMenu(e)}}}))}},childIconClasses:function(){var n=this;return function(t){var e=n.childIcon(t);return n.getIconClasses(e)}},childIcon:function(){var n=this;return function(t){return t.find((function(t){return n.isActive(t)}))||t[0]}},iconCount:function(){this.forceRecompute,this.windowWidth;var n=this.$refs.menubar&&this.$refs.menubar.clientWidth>200?this.$refs.menubar.clientWidth:200;return Math.max(Math.floor(n/44)-1,0)},imagePath:function(){return this.lastImagePath||this.filePath.split("/").slice(0,-1).join("/")}},mounted:function(){var n=this;window.addEventListener("resize",this.getWindowWidth),this.checkInterval=setInterval((function(){var t=n.$refs.menubar&&n.$refs.menubar.clientWidth>0;n.isRichEditor&&t&&n.redrawMenuBar(),n.isRichEditor&&!t||clearInterval(n.checkInterval)}),100),this.$emit("update:loaded",!0)},beforeDestroy:function(){window.removeEventListener("resize",this.getWindowWidth)},methods:{redrawMenuBar:function(){var n=this;this.$nextTick((function(){n.getWindowWidth(),n.forceRecompute++}))},refocus:function(){this.editor.chain().focus().run()},clickIcon:function(n){if(n.click)return n.click(this);var t=n.action(this.editor.chain().focus());t&&t.run()},getWindowWidth:function(n){this.windowWidth=document.documentElement.clientWidth},getWindowHeight:function(n){this.windowHeight=document.documentElement.clientHeight},hideChildMenu:function(n){var t=n.label;this.$set(this.submenuVisibility,t,!1)},hasSubmenu:function(n){return"icon-emoji"===n.class||n.children},toggleChildMenu:function(n){var t=n.label,e=!!Object.prototype.hasOwnProperty.call(this.submenuVisibility,t)&&this.submenuVisibility[t];this.$set(this.submenuVisibility,t,!e),e&&this.refocus()},onUploadImage:function(){this.$refs.imageFileInput.click()},onImageUploadFilePicked:function(n){this.$emit("image-upload",n.target.files),n.target.value=""},showImagePrompt:function(){var n=this;(0,C.getCurrentUser)()&&OC.dialogs.filepicker(t("text","Insert an image"),(function(t){n.$emit("image-insert",t)}),!1,[],!0,void 0,this.imagePath)},optimalPathTo:function(n){var t=n.split("/"),e=this.relativePathTo(n).split("/");return e.length<t.length?e.join("/"):n},relativePathTo:function(n){var t=this.filePath.split("/"),e=n.split("/");for(t.pop();t[0]===e[0];)t.shift(),e.shift();return t.fill("..").concat(e).join("/")},addEmoji:function(n,t){return n.action(this.editor.chain(),{id:t.id,native:t.native}).focus().run()},keysString:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i={ctrl:t("text","Ctrl"),alt:t("text","Alt"),shift:t("text","Shift")};return Object.entries(i).filter((function(n){var t=v(n,2),i=t[0];t[1];return e.includes(i)})).map((function(n){var t=v(n,2);t[0];return t[1]})).concat(n.toUpperCase()).join("+")},getKeys:function(n){return n.keyChar&&!this.isMobile?"(".concat(this.keysString(n.keyChar,n.keyModifiers),")"):""},getLabelAndKeys:function(n){return[n.label,this.getKeys(n)].join(" ")}}};var w=i(93379),_=i.n(w),I=i(7795),B=i.n(I),D=i(90569),E=i.n(D),M=i(3565),O=i.n(M),P=i(19216),j=i.n(P),S=i(44589),U=i.n(S),W=i(96379),L={};L.styleTagTransform=U(),L.setAttributes=O(),L.insert=E().bind(null,"head"),L.domAPI=B(),L.insertStyleElement=j();_()(W.Z,L);W.Z&&W.Z.locals&&W.Z.locals;const T=(0,i(51900).Z)(x,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"menubar",class:{show:n.isVisible,autohide:n.autohide}},[e("input",{ref:"imageFileInput",staticClass:"hidden-visually",attrs:{type:"file",accept:"image/*","aria-hidden":"true",multiple:!0},on:{change:n.onImageUploadFilePicked}}),n._v(" "),n.isRichEditor?e("div",{ref:"menubar",staticClass:"menubar-icons"},[n._l(n.icons,(function(t){return["icon-emoji"===t.class?e("EmojiPicker",{directives:[{name:"show",rawName:"v-show",value:t.priority<=n.iconCount,expression:"icon.priority <= iconCount"}],key:t.label,staticClass:"menuitem-emoji",on:{selectData:function(e){return n.addEmoji(t,e)}}},[e("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:n.t("text","Insert emoji"),expression:"t('text', 'Insert emoji')"}],staticClass:"icon-emoji",attrs:{"aria-label":n.t("text","Insert emoji"),"aria-haspopup":!0},on:{click:function(e){return n.toggleChildMenu(t)}}})]):"icon-image"===t.class?e("Actions",{key:t.label,ref:"imageActions",refInFor:!0,staticClass:"submenu",attrs:{"default-icon":"icon-image"},on:{open:function(e){return n.toggleChildMenu(t)},close:function(e){return n.toggleChildMenu(t)}}},[e("button",{class:{"icon-image":!0,"loading-small":n.uploadingImages},attrs:{slot:"icon",title:t.label,"aria-label":t.label,"aria-haspopup":!0},slot:"icon"}),n._v(" "),e("ActionButton",{attrs:{icon:"icon-upload","close-after-click":!0,disabled:n.uploadingImages},on:{click:function(t){return n.onUploadImage()}}},[n._v("\n\t\t\t\t\t"+n._s(n.t("text","Upload from computer"))+"\n\t\t\t\t")]),n._v(" "),n.isPublic?n._e():e("ActionButton",{attrs:{icon:"icon-folder","close-after-click":!0,disabled:n.uploadingImages},on:{click:function(t){return n.showImagePrompt()}}},[n._v("\n\t\t\t\t\t"+n._s(n.t("text","Insert from Files"))+"\n\t\t\t\t")])],1):t.class?e("button",{directives:[{name:"show",rawName:"v-show",value:t.priority<=n.iconCount,expression:"icon.priority <= iconCount"},{name:"tooltip",rawName:"v-tooltip",value:n.getLabelAndKeys(t),expression:"getLabelAndKeys(icon)"}],key:t.label,class:n.getIconClasses(t),attrs:{disabled:n.disabled(t)},on:{click:function(e){return n.clickIcon(t)}}}):[e("div",{directives:[{name:"show",rawName:"v-show",value:t.priority<=n.iconCount,expression:"icon.priority <= iconCount"},{name:"click-outside",rawName:"v-click-outside",value:function(){return n.hideChildMenu(t)},expression:"() => hideChildMenu(icon)"}],key:t.label,staticClass:"submenu"},[e("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:n.getLabelAndKeys(t),expression:"getLabelAndKeys(icon)"}],class:n.childIconClasses(t.children),on:{click:function(e){return e.preventDefault(),n.toggleChildMenu(t)}}}),n._v(" "),e("div",{staticClass:"popovermenu menu-center",class:{open:n.isChildMenuVisible(t)}},[e("PopoverMenu",{attrs:{menu:n.childPopoverMenu(t.children,t)}})],1)])]]})),n._v(" "),e("Actions",{on:{open:function(t){return n.toggleChildMenu({label:"Remaining Actions"})},close:function(t){return n.toggleChildMenu({label:"Remaining Actions"})}}},[n._l(n.icons,(function(t){return[t.class&&n.isHiddenInMenu(t)&&!n.hasSubmenu(t)?e("ActionButton",{directives:[{name:"tooltip",rawName:"v-tooltip",value:n.getKeys(t),expression:"getKeys(icon)"}],key:t.class,attrs:{icon:t.class,"close-after-click":!0},on:{click:function(e){return n.clickIcon(t)}}},[n._v("\n\t\t\t\t\t"+n._s(t.label)+"\n\t\t\t\t")]):n._e()]}))],2)],2):n._e(),n._v(" "),n._t("default",(function(){return[n._v("\n\t\tLeft side\n\t")]}))],2)}),[],!1,null,"2bc7f97a",null).exports},19078:(n,e,i)=>{i.r(e),i.d(e,{default:()=>I});var o=i(7049),r=i(26798),a=i(15168),c=i.n(a),l=i(22200),s=i(14695),u=i(16453);const A={name:"MenuBubble",components:{BubbleMenu:o.NM},directives:{tooltip:c()},props:{editor:{type:Object,required:!0},contentWrapper:{type:HTMLDivElement,required:!1,default:null},filePath:{type:String,required:!1,default:""}},data:function(){return{linkUrl:null,linkMenuIsActive:!1,isUsingDirectEditing:null!==(0,u.loadState)("text","directEditingToken",null)}},methods:{showLinkMenu:function(){var n=this,t=(0,r.Jo)(this.editor.state,"link");this.linkUrl=t.href,this.linkMenuIsActive=!0,this.$nextTick((function(){n.$refs.linkInput.focus()}))},hideLinkMenu:function(){this.linkUrl=null,this.linkMenuIsActive=!1},selectFile:function(){var n=this;if((0,l.getCurrentUser)()){var e=this.filePath.split("/").slice(0,-1).join("/");OC.dialogs.filepicker(t("text","Select file to link to"),(function(t){OC.Files.getClient().getFileInfo(t).then((function(t,e){var i=(0,s.Lz)(n.filePath,"".concat(e.path,"/").concat(e.name)).split("/").map(encodeURIComponent).join("/"),o="".concat(i,"?fileId=").concat(e.id);n.editor.chain().setLink({href:o}).focus().run(),n.hideLinkMenu()}))}),!1,[],!0,void 0,e)}},setLinkUrl:function(){var n=this.linkUrl;n&&![/^[a-zA-Z]+:/,/^\//,/\?fileId=/,/^\.\.?\//,/^[^.]*[/$]/,/^#/].find((function(t){return n.match(t)}))&&(n="https://"+n);var t=n.replaceAll(" ","%20");this.editor.chain().setLink({href:t}).focus().run(),this.hideLinkMenu()},removeLinkUrl:function(){this.editor.chain().unsetLink().focus().run()},isActive:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.editor.isActive(n,t)}}};var d=i(93379),p=i.n(d),f=i(7795),h=i.n(f),b=i(90569),m=i.n(b),C=i(3565),v=i.n(C),g=i(19216),k=i.n(g),y=i(44589),x=i.n(y),w=i(48375),_={};_.styleTagTransform=x(),_.setAttributes=v(),_.insert=m().bind(null,"head"),_.domAPI=h(),_.insertStyleElement=k();p()(w.Z,_);w.Z&&w.Z.locals&&w.Z.locals;const I=(0,i(51900).Z)(A,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("BubbleMenu",{staticClass:"menububble",attrs:{editor:n.editor,"tippy-options":{onHide:n.hideLinkMenu,duration:200,placement:"bottom"}}},[n.linkMenuIsActive?e("form",{staticClass:"menububble__form",on:{submit:function(t){return t.preventDefault(),n.setLinkUrl()}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:n.linkUrl,expression:"linkUrl"}],ref:"linkInput",staticClass:"menububble__input",attrs:{type:"text",placeholder:"https://"},domProps:{value:n.linkUrl},on:{keydown:function(t){return!t.type.indexOf("key")&&n._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:n.hideLinkMenu.apply(null,arguments)},input:function(t){t.target.composing||(n.linkUrl=t.target.value)}}}),n._v(" "),e("button",{staticClass:"menububble__button icon-confirm",attrs:{type:"button",tabindex:"0"},on:{click:function(t){return n.setLinkUrl()}}})]):[e("button",{staticClass:"menububble__button",class:{"is-active":n.isActive("link")},on:{click:function(t){return n.showLinkMenu()}}},[e("span",{staticClass:"icon-link"}),n._v(" "),e("span",{staticClass:"menububble__buttontext"},[n._v("\n\t\t\t\t"+n._s(n.isActive("link")?n.t("text","Update Link"):n.t("text","Add Link"))+"\n\t\t\t")])]),n._v(" "),n.isUsingDirectEditing?n._e():e("button",{staticClass:"menububble__button",class:{"is-active":n.isActive("link")},on:{click:function(t){return n.selectFile()}}},[e("span",{staticClass:"icon-file"}),n._v(" "),e("span",{staticClass:"menububble__buttontext"},[n._v(n._s(n.t("text","Link file")))])]),n._v(" "),n.isActive("link")?e("button",{staticClass:"menububble__button",class:{"is-active":n.isActive("link")},on:{click:function(t){return n.removeLinkUrl()}}},[e("span",{staticClass:"icon-delete"}),n._v(" "),e("span",{staticClass:"menububble__buttontext"},[n._v("\n\t\t\t\t"+n._s(n.t("text","Remove Link"))+"\n\t\t\t")])]):n._e()]],2)}),[],!1,null,"23aa9303",null).exports}}]);
+//# sourceMappingURL=editor-rich.js.map?v=c2538ac2ef3c077b3106 \ No newline at end of file
diff --git a/js/editor-rich.js.map b/js/editor-rich.js.map
index 429da6460..c59049b73 100644
--- a/js/editor-rich.js.map
+++ b/js/editor-rich.js.map
@@ -1 +1 @@
-{"version":3,"file":"editor-rich.js?v=b0e49e9135d38107f421","mappings":";sSAkDA,MClD8K,EDkD9K,CACA,qBACA,YACA,oGAEA,OACA,MACA,YACA,cAEA,QACA,YACA,eAGA,KAfA,WAgBA,OACA,SACA,UACA,SACA,aACA,8DACA,wCAGA,UACA,WADA,WACA,MACA,sFAEA,UAJA,WAKA,qEAEA,mBAPA,WAQA,iEAEA,SAVA,WAWA,kCACA,sCAGA,OACA,MADA,SACA,GACA,GACA,kDAIA,QA/CA,WA+CA,6IACA,qDACA,iBAEA,qDACA,gBALA,4NAQA,SACA,QADA,aAIA,MAJA,WAIA,WACA,cACA,2BACA,kBAGA,UAVA,WAWA,gBAGA,iBACA,kBACA,WACA,0ME/GIA,EAAU,GAEdA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKJ,KAAW,YAAiB,WCPlD,SAXgB,cACd,GCTW,WAAa,IAAIM,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAQF,EAAW,QAAEI,EAAG,MAAM,CAACE,MAAM,CAAC,gBAAiBN,EAAIO,SAAWP,EAAIQ,MAAO,MAASR,EAAIS,MAAO,KAAQT,EAAIU,UAAW,UAAaV,EAAIW,WAAWC,MAAM,CAAC,GAAK,mBAAmB,CAAEZ,EAAsB,mBAAEI,EAAG,MAA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gB,GAAG,KAAMhB,EAAIiK,SAAS,QAAS7J,EAAG,SAAS,CAACS,YAAY,qBAAqBP,MAAM,CAAE,YAAaN,EAAIiK,SAAS,SAAUnJ,GAAG,CAAC,MAAQ,SAASmB,GAAQ,OAAOjC,EAAIkO,mBAAmB,CAAC9N,EAAG,OAAO,CAACS,YAAY,gBAAgBb,EAAIgB,GAAG,KAAKZ,EAAG,OAAO,CAACS,YAAY,0BAA0B,CAACb,EAAIgB,GAAG,aAAahB,EAAIiB,GAAGjB,EAAIkB,EAAE,OAAQ,gBAAgB,gBAAgBlB,EAAImB,OAAO,KAC7lE,IIWpB,EACA,KACA,WACA,MAI8B","sources":["webpack:///text/src/views/RichWorkspace.vue","webpack:///text/src/views/RichWorkspace.vue?vue&type=script&lang=js&","webpack://text/./src/views/RichWorkspace.vue?9518","webpack://text/./src/views/RichWorkspace.vue?c027","webpack:///text/src/views/RichWorkspace.vue?vue&type=template&id=6af3308d&scoped=true&","webpack:///text/src/helpers/files.js","webpack:///text/src/helpers/mime.js","webpack:///text/src/components/MenuBar.vue?vue&type=style&index=0&id=2bc7f97a&scoped=true&lang=scss&","webpack:///text/src/components/MenuBubble.vue?vue&type=style&index=0&id=23aa9303&scoped=true&lang=scss&","webpack:///text/src/views/RichWorkspace.vue?vue&type=style&index=0&id=6af3308d&lang=scss&scoped=true&","webpack:///text/src/components/MenuBar.vue?vue&type=template&id=2bc7f97a&scoped=true&","webpack:///text/src/mixins/menubar.js","webpack:///text/src/components/MenuBar.vue","webpack:///text/src/components/MenuBar.vue?vue&type=script&lang=js&","webpack://text/./src/components/MenuBar.vue?4871","webpack://text/./src/components/MenuBar.vue?ce1f","webpack:///text/src/components/MenuBubble.vue?vue&type=template&id=23aa9303&scoped=true&","webpack:///text/src/components/MenuBubble.vue","webpack:///text/src/components/MenuBubble.vue?vue&type=script&lang=js&","webpack://text/./src/components/MenuBubble.vue?a094","webpack://text/./src/components/MenuBubble.vue?8445"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<div v-if=\"enabled\" id=\"rich-workspace\" :class=\"{'icon-loading': !loaded || !ready, 'focus': focus, 'dark': darkTheme, 'creatable': canCreate}\">\n\t\t<div v-if=\"showEmptyWorkspace\" class=\"empty-workspace\" @click=\"createNew\">\n\t\t\t<p class=\"placeholder\">\n\t\t\t\t{{ t('text', 'Add notes, lists or links …') }}\n\t\t\t</p>\n\t\t</div>\n\n\t\t<EditorWrapper v-if=\"file\"\n\t\t\tv-show=\"ready\"\n\t\t\t:key=\"file.path\"\n\t\t\t:file-id=\"file.id\"\n\t\t\t:relative-path=\"filepath\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:active=\"true\"\n\t\t\t:autohide=\"true\"\n\t\t\t:mime=\"file.mimetype\"\n\t\t\t:autofocus=\"autofocus\"\n\t\t\t@ready=\"ready=true; loaded=true\"\n\t\t\t@focus=\"focus=true\"\n\t\t\t@blur=\"unfocus\"\n\t\t\t@error=\"reset\" />\n\t</div>\n</template>\n\n<script>\nimport { subscribe } from '@nextcloud/event-bus'\n\nexport default {\n\tname: 'RichWorkspace',\n\tcomponents: {\n\t\tEditorWrapper: () => import(/* webpackChunkName: \"editor\" */'./../components/EditorWrapper'),\n\t},\n\tprops: {\n\t\tfile: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t\tfolder: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfocus: false,\n\t\t\tloaded: false,\n\t\t\tready: false,\n\t\t\tautofocus: false,\n\t\t\tdarkTheme: OCA.Accessibility && OCA.Accessibility.theme === 'dark',\n\t\t\tenabled: OCA.Text.RichWorkspaceEnabled,\n\t\t}\n\t},\n\tcomputed: {\n\t\tshareToken() {\n\t\t\treturn document.getElementById('sharingToken')?.value\n\t\t},\n\t\tcanCreate() {\n\t\t\treturn !!(this.folder && (this.folder.permissions & OC.PERMISSION_CREATE))\n\t\t},\n\t\tshowEmptyWorkspace() {\n\t\t\treturn (!this.file || (this.autofocus && !this.ready)) && this.canCreate\n\t\t},\n\t\tfilepath() {\n\t\t\tconst { path, name } = this.file\n\t\t\treturn path + (path.endsWith('/') ? '' : '/') + name\n\t\t},\n\t},\n\twatch: {\n\t\tfocus(newValue) {\n\t\t\tif (!newValue) {\n\t\t\t\tdocument.querySelector('#editor').scrollTo(0, 0)\n\t\t\t}\n\t\t},\n\t},\n\tasync mounted() {\n\t\tsubscribe('Text::showRichWorkspace', () => {\n\t\t\tthis.enabled = true\n\t\t})\n\t\tsubscribe('Text::hideRichWorkspace', () => {\n\t\t\tthis.enabled = false\n\t\t})\n\t},\n\tmethods: {\n\t\tunfocus() {\n\t\t\t// setTimeout(() => this.focus = false, 2000)\n\t\t},\n\t\treset() {\n\t\t\tthis.focus = false\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.creating = false\n\t\t\t})\n\t\t},\n\t\tcreateNew() {\n\t\t\tif (this.creating) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.creating = true\n\t\t\tthis.autofocus = true\n\t\t\tif (!this.file) {\n\t\t\t\twindow.FileList.createFile('Readme.md', { scrollTo: false, animate: false })\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\t#rich-workspace {\n\t\tpadding: 0 50px;\n\t\t/* Slightly reduce vertical space */\n\t\tmargin-bottom: -24px;\n\t\ttext-align: left;\n\t\tmax-height: 0;\n\t\ttransition: max-height 0.5s cubic-bezier(0, 1, 0, 1);\n\t\tz-index: 61;\n\t\tposition: relative;\n\t\t&.creatable {\n\t\t\tmin-height: 90px;\n\t\t}\n\t}\n\n\t/* For subfolders, where there are no Recommendations */\n\t#rich-workspace:only-child {\n\t\tmargin-bottom: 0;\n\t}\n\n\t.empty-workspace {\n\t\tpadding-top: 43px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t\theight: 0;\n\t}\n\n\t#rich-workspace::v-deep div[contenteditable=false] {\n\t\twidth: 100%;\n\t\tpadding: 0px;\n\t\tbackground-color: var(--color-main-background);\n\t\topacity: 1;\n\t\tborder: none;\n\t}\n\n\t#rich-workspace::v-deep #editor-container {\n\t\theight: 100%;\n\t\tposition: unset !important;\n\t\ttop: auto !important;\n\t}\n\n\t#rich-workspace::v-deep #editor-wrapper {\n\t\tposition: unset !important;\n\t\toverflow: visible;\n\t}\n\n\t#rich-workspace::v-deep #editor {\n\t\toverflow: visible !important;\n\t}\n\n\t#rich-workspace::v-deep .content-wrapper {\n\t\toverflow: scroll !important;\n\t\tmax-height: calc(40vh - 50px);\n\t\tpadding-left: 10px;\n\t\tpadding-bottom: 60px; /* ensure menububble fits below */\n\t}\n\n\t#rich-workspace::v-deep #editor-wrapper .ProseMirror {\n\t\tpadding: 0px;\n\t\tmargin: 0;\n\t}\n\n\t#rich-workspace::v-deep .menubar {\n\t\tz-index: 61;\n\t\t/* Slightly reduce vertical space */\n\t\tmargin-bottom: -10px;\n\t}\n\n\t#rich-workspace::v-deep .menubar .menubar-icons {\n\t\tmargin-left: 0;\n\t}\n\n\t#rich-workspace::v-deep .editor__content {\n\t\tmargin: 0;\n\t}\n\n\t#rich-workspace.focus {\n\t\tmax-height: 50vh;\n\t}\n\n\t#rich-workspace:not(.focus) {\n\t\tmax-height: 30vh;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t}\n\n\t#rich-workspace:not(.focus):not(.icon-loading):after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tz-index: 1;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tpointer-events: none;\n\t\tbackground-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\n\t\twidth: 100%;\n\t\theight: 4em;\n\t}\n\n\t#rich-workspace.dark:not(.focus):not(.icon-loading):after {\n\t\tbackground-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background));\n\t}\n\n\t@media only screen and (max-width: 1024px) {\n\t\t#rich-workspace:not(.focus) {\n\t\t\tmax-height: 30vh;\n\t\t}\n\t}\n\n\thtml.ie {\n\t\t#rich-workspace::v-deep {\n\t\t\t#editor-container {\n\t\t\t\tposition: initial;\n\t\t\t}\n\n\t\t\t#editor-wrapper {\n\t\t\t\tposition: relative !important;\n\t\t\t\ttop: auto !important;\n\t\t\t}\n\n\t\t\t#editor {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\toverflow: hidden !important;\n\t\t\t}\n\n\t\t\t.menubar {\n\t\t\t\tposition: relative;\n\t\t\t\toverflow: hidden;\n\t\t\t\tflex-shrink: 0;\n\t\t\t\theight: 44px;\n\t\t\t\ttop: auto;\n\t\t\t}\n\n\t\t\t#editor > div:nth-child(2) {\n\t\t\t\tmin-height: 44px;\n\t\t\t\toverflow-x: hidden;\n\t\t\t\toverflow-y: auto;\n\t\t\t\tflex-shrink: 1;\n\t\t\t}\n\t\t}\n\t}\n\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=style&index=0&id=6af3308d&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=style&index=0&id=6af3308d&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./RichWorkspace.vue?vue&type=template&id=6af3308d&scoped=true&\"\nimport script from \"./RichWorkspace.vue?vue&type=script&lang=js&\"\nexport * from \"./RichWorkspace.vue?vue&type=script&lang=js&\"\nimport style0 from \"./RichWorkspace.vue?vue&type=style&index=0&id=6af3308d&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6af3308d\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.enabled)?_c('div',{class:{'icon-loading': !_vm.loaded || !_vm.ready, 'focus': _vm.focus, 'dark': _vm.darkTheme, 'creatable': _vm.canCreate},attrs:{\"id\":\"rich-workspace\"}},[(_vm.showEmptyWorkspace)?_c('div',{staticClass:\"empty-workspace\",on:{\"click\":_vm.createNew}},[_c('p',{staticClass:\"placeholder\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('text', 'Add notes, lists or links …'))+\"\\n\\t\\t\")])]):_vm._e(),_vm._v(\" \"),(_vm.file)?_c('EditorWrapper',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.ready),expression:\"ready\"}],key:_vm.file.path,attrs:{\"file-id\":_vm.file.id,\"relative-path\":_vm.filepath,\"share-token\":_vm.shareToken,\"active\":true,\"autohide\":true,\"mime\":_vm.file.mimetype,\"autofocus\":_vm.autofocus},on:{\"ready\":function($event){_vm.ready=true; _vm.loaded=true},\"focus\":function($event){_vm.focus=true},\"blur\":_vm.unfocus,\"error\":_vm.reset}}):_vm._e()],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { openMimetypes } from './mime'\nimport RichWorkspace from '../views/RichWorkspace'\nimport { imagePath } from '@nextcloud/router'\nimport store from '../store'\n\nconst FILE_ACTION_IDENTIFIER = 'Edit with text app'\n\nconst optimalPath = function(from, to) {\n\tconst current = from.split('/')\n\tconst target = to.split('/')\n\tcurrent.pop() // ignore filename\n\twhile (current[0] === target[0]) {\n\t\tcurrent.shift()\n\t\ttarget.shift()\n\t}\n\tconst relativePath = current.fill('..').concat(target)\n\tconst absolutePath = to.split('/')\n\treturn relativePath.length < absolutePath.length\n\t\t? relativePath.join('/')\n\t\t: to\n}\n\nconst registerFileCreate = () => {\n\tconst newFileMenuPlugin = {\n\t\tattach(menu) {\n\t\t\tconst fileList = menu.fileList\n\n\t\t\t// only attach to main file list, public view is not supported yet\n\t\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// register the new menu entry\n\t\t\tmenu.addMenuEntry({\n\t\t\t\tid: 'file',\n\t\t\t\tdisplayName: t('text', 'New text document'),\n\t\t\t\ttemplateName: t('text', 'New text document') + '.md',\n\t\t\t\ticonClass: 'icon-filetype-text',\n\t\t\t\tfileType: 'file',\n\t\t\t\tactionHandler(name) {\n\t\t\t\t\tfileList.createFile(name).then(function(status, data) {\n\t\t\t\t\t\tconst fileInfoModel = new OCA.Files.FileInfoModel(data)\n\t\t\t\t\t\tif (typeof OCA.Viewer !== 'undefined') {\n\t\t\t\t\t\t\tOCA.Files.fileActions.triggerAction('view', fileInfoModel, fileList)\n\t\t\t\t\t\t} else if (typeof OCA.Viewer === 'undefined') {\n\t\t\t\t\t\t\tOCA.Files.fileActions.triggerAction(FILE_ACTION_IDENTIFIER, fileInfoModel, fileList)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t})\n\t\t},\n\t}\n\tOC.Plugins.register('OCA.Files.NewFileMenu', newFileMenuPlugin)\n}\n\nconst registerFileActionFallback = () => {\n\tconst sharingToken = document.getElementById('sharingToken') ? document.getElementById('sharingToken').value : null\n\tconst dir = document.getElementById('dir').value\n\n\tif (!sharingToken || dir !== '') {\n\t\tconst ViewerRoot = document.createElement('div')\n\t\tViewerRoot.id = 'text-viewer-fallback'\n\t\tdocument.body.appendChild(ViewerRoot)\n\t\tconst registerAction = (mime) => OCA.Files.fileActions.register(\n\t\t\tmime,\n\t\t\tFILE_ACTION_IDENTIFIER,\n\t\t\tOC.PERMISSION_UPDATE | OC.PERMISSION_READ,\n\t\t\timagePath('core', 'actions/rename'),\n\t\t\t(filename) => {\n\t\t\t\tconst file = window.FileList.findFile(filename)\n\t\t\t\tPromise.all([\n\t\t\t\t\timport('vue'),\n\t\t\t\t\timport(/* webpackChunkName: \"files-modal\" */'./../components/PublicFilesEditor'),\n\t\t\t\t]).then((imports) => {\n\t\t\t\t\tconst path = window.FileList.getCurrentDirectory() + '/' + filename\n\t\t\t\t\tconst Vue = imports[0].default\n\t\t\t\t\tVue.prototype.t = window.t\n\t\t\t\t\tVue.prototype.n = window.n\n\t\t\t\t\tVue.prototype.OCA = window.OCA\n\t\t\t\t\tconst Editor = imports[1].default\n\t\t\t\t\tconst vm = new Vue({\n\t\t\t\t\t\trender: function(h) { // eslint-disable-line\n\t\t\t\t\t\t\tconst self = this\n\t\t\t\t\t\t\treturn h(Editor, {\n\t\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\t\tfileId: file ? file.id : null,\n\t\t\t\t\t\t\t\t\tactive: true,\n\t\t\t\t\t\t\t\t\tshareToken: sharingToken,\n\t\t\t\t\t\t\t\t\trelativePath: path,\n\t\t\t\t\t\t\t\t\tmimeType: file.mimetype,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ton: {\n\t\t\t\t\t\t\t\t\tclose: function() { // eslint-disable-line\n\t\t\t\t\t\t\t\t\t\tself.$destroy()\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t\tvm.$mount(ViewerRoot)\n\t\t\t\t})\n\t\t\t},\n\t\t\tt('text', 'Edit')\n\t\t)\n\n\t\tfor (let i = 0; i < openMimetypes.length; i++) {\n\t\t\tregisterAction(openMimetypes[i])\n\t\t\tOCA.Files.fileActions.setDefault(openMimetypes[i], FILE_ACTION_IDENTIFIER)\n\t\t}\n\t}\n\n}\n\nconst FilesWorkspacePlugin = {\n\n\tel: null,\n\tvm: null,\n\n\tattach(fileList) {\n\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\treturn\n\t\t}\n\n\t\tthis.el = document.createElement('div')\n\t\tfileList.registerHeader({\n\t\t\tid: 'workspace',\n\t\t\tel: this.el,\n\t\t\trender: this.render.bind(this),\n\t\t\tpriority: 10,\n\t\t})\n\n\t\tconst PROPERTY_WORKSPACE_FILE = `{${OC.Files.Client.NS_NEXTCLOUD}}rich-workspace-file`\n\n\t\tconst oldGetWebdavProperties = fileList._getWebdavProperties\n\t\tfileList._getWebdavProperties = function() {\n\t\t\treturn [\n\t\t\t\t...oldGetWebdavProperties.apply(this, arguments),\n\t\t\t\tPROPERTY_WORKSPACE_FILE,\n\t\t\t]\n\t\t}\n\n\t\tlet readmeId = null\n\n\t\tfileList.filesClient.addFileInfoParser((response, data) => {\n\t\t\tif (data.mimetype === 'httpd/unix-directory') {\n\t\t\t\tconst props = response.propStat[0].properties\n\t\t\t\tconst dir = data.path + (data.path.endsWith('/') ? '' : '/') + data.name\n\t\t\t\tif (dir === fileList.getCurrentDirectory()) {\n\t\t\t\t\treadmeId = props[PROPERTY_WORKSPACE_FILE]\n\t\t\t\t\tthis.vm.folder = {\n\t\t\t\t\t\tpermissions: data.permissions,\n\t\t\t\t\t}\n\t\t\t\t\tthis.vm.loaded = true\n\t\t\t\t\t// in case no file is found we are done\n\t\t\t\t\tthis.vm.ready = true\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (readmeId && data.id === readmeId) {\n\t\t\t\tif (data.mimetype !== 'text/markdown') {\n\t\t\t\t\tconsole.warn('Expected workspace file to be markdown:', data)\n\t\t\t\t}\n\t\t\t\tthis.open(data)\n\t\t\t\treturn\n\t\t\t}\n\t\t\t/*\n\t\t\t * Handle the creation of 'Readme.md'.\n\t\t\t * The PROPFIND after the creation does not include the parent dir.\n\t\t\t */\n\t\t\tif (data.name === 'Readme.md'\n\t\t\t\t&& data.mimetype === 'text/markdown'\n\t\t\t\t&& data.path === fileList.getCurrentDirectory()) {\n\t\t\t\tthis.open(data)\n\t\t\t}\n\t\t})\n\n\t},\n\n\trender(fileList) {\n\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\treturn\n\t\t}\n\n\t\timport('vue').then((module) => {\n\t\t\tconst Vue = module.default\n\t\t\tthis.el.id = 'files-workspace-wrapper'\n\t\t\tVue.prototype.t = window.t\n\t\t\tVue.prototype.n = window.n\n\t\t\tVue.prototype.OCA = window.OCA\n\t\t\tconst View = Vue.extend(RichWorkspace)\n\t\t\tthis.vm = new View({\n\t\t\t\tpropsData: {\n\t\t\t\t\tfile: null,\n\t\t\t\t\tfolder: null,\n\t\t\t\t},\n\t\t\t\tstore,\n\t\t\t}).$mount(this.el)\n\n\t\t\tfileList.$el.on('urlChanged', data => {\n\t\t\t\tthis.vm.file = null\n\t\t\t\tthis.vm.folder = null\n\t\t\t})\n\t\t\tfileList.$el.on('changeDirectory', data => {\n\t\t\t\tthis.vm.file = null\n\t\t\t\tthis.vm.folder = null\n\t\t\t})\n\t\t})\n\t},\n\n\topen(data) {\n\t\tconst previous = this.vm.file\n\t\tconst id = parseInt(data.id)\n\t\tthis.vm.file = {\n\t\t\t...data,\n\t\t\tid,\n\t\t}\n\t\tif (previous?.id !== id) {\n\t\t\t// Editor loads new file. Wait for it to be ready.\n\t\t\tthis.vm.ready = false\n\t\t}\n\t},\n}\n\nexport {\n\toptimalPath,\n\tregisterFileActionFallback,\n\tregisterFileCreate,\n\tFilesWorkspacePlugin,\n\tFILE_ACTION_IDENTIFIER,\n}\n","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nconst openMimetypesMarkdown = [\n\t'text/markdown',\n]\n\nconst openMimetypesPlainText = [\n\t'text/plain',\n\t'application/cmd',\n\t'application/x-empty',\n\t'application/x-msdos-program',\n\t'application/javascript',\n\t'application/json',\n\t'application/x-perl',\n\t'application/x-php',\n\t'application/x-tex',\n\t'application/xml',\n\t'application/yaml',\n\t'text/css',\n\t'text/csv',\n\t'text/html',\n\t'text/org',\n\t'text/x-c',\n\t'text/x-c++src',\n\t'text/x-h',\n\t'text/x-java-source',\n\t'text/x-ldif',\n\t'text/x-python',\n\t'text/x-shellscript',\n]\n\nconst openMimetypes = [...openMimetypesMarkdown, ...openMimetypesPlainText]\n\nexport {\n\topenMimetypes,\n\topenMimetypesMarkdown,\n\topenMimetypesPlainText,\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".menubar[data-v-2bc7f97a]{--background-blur: blur(10px);position:fixed;position:-webkit-sticky;position:sticky;top:0;display:flex;justify-content:flex-end;z-index:10021;background-color:var(--color-main-background-translucent);-webkit-backdrop-filter:var(--background-blur);backdrop-filter:var(--background-blur);max-height:44px;padding-top:3px;padding-bottom:3px}.menubar.autohide[data-v-2bc7f97a]{visibility:hidden;opacity:0;transition:visibility .2s .4s,opacity .2s .4s}.menubar.autohide.show[data-v-2bc7f97a]{visibility:visible;opacity:1}.menubar .menubar-icons[data-v-2bc7f97a]{flex-grow:1;margin-left:calc((100% - 660px)/2)}@media(max-width: 660px){.menubar .menubar-icons[data-v-2bc7f97a]{margin-left:0}}.menubar[data-v-2bc7f97a] .action-item__menu ul{max-height:calc(100vh - 88px);overflow:scroll}.menubar button[data-v-2bc7f97a]{position:relative;width:44px;height:44px;margin:0;background-size:16px;border:0;background-color:transparent;opacity:.5;color:var(--color-main-text);background-position:center center;vertical-align:top}.menubar button[data-v-2bc7f97a]:hover,.menubar button[data-v-2bc7f97a]:focus,.menubar button[data-v-2bc7f97a]:active{background-color:var(--color-background-dark)}.menubar button.is-active[data-v-2bc7f97a]::before{transform:translateX(-50%);border-radius:100%;position:absolute;background:var(--color-primary-element);bottom:3px;height:6px;width:6px;content:\\\"\\\";left:50%}.menubar button.is-active[data-v-2bc7f97a],.menubar button[data-v-2bc7f97a]:hover,.menubar button[data-v-2bc7f97a]:focus{opacity:1}.menubar button.icon-undo[data-v-2bc7f97a],.menubar button.icon-redo[data-v-2bc7f97a]{opacity:.8}.menubar button.icon-undo[data-v-2bc7f97a]:disabled,.menubar button.icon-redo[data-v-2bc7f97a]:disabled{opacity:.4}.menubar .submenu[data-v-2bc7f97a],.menubar .menuitem-emoji[data-v-2bc7f97a]{display:inline-block;width:44px;height:44px;position:relative;vertical-align:top}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/MenuBar.vue\"],\"names\":[],\"mappings\":\"AAiYA,0BACC,6BAAA,CACA,cAAA,CACA,uBAAA,CACA,eAAA,CACA,KAAA,CACA,YAAA,CACA,wBAAA,CACA,aAAA,CACA,yDAAA,CACA,8CAAA,CACA,sCAAA,CACA,eAAA,CACA,eAAA,CACA,kBAAA,CAEA,mCACC,iBAAA,CACA,SAAA,CACA,6CA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\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n.menubar {\\n\\t--background-blur: blur(10px);\\n\\tposition: fixed;\\n\\tposition: -webkit-sticky;\\n\\tposition: sticky;\\n\\ttop: 0;\\n\\tdisplay: flex;\\n\\tjustify-content: flex-end;\\n\\tz-index: 10021; // above modal-header and menububble so menubar is always on top\\n\\tbackground-color: var(--color-main-background-translucent);\\n\\t-webkit-backdrop-filter: var(--background-blur);\\n\\tbackdrop-filter: var(--background-blur);\\n\\tmax-height: 44px; // important for mobile so that the buttons are always inside the container\\n\\tpadding-top:3px;\\n\\tpadding-bottom: 3px;\\n\\n\\t&.autohide {\\n\\t\\tvisibility: hidden;\\n\\t\\topacity: 0;\\n\\t\\ttransition: visibility 0.2s 0.4s, opacity 0.2s 0.4s;\\n\\t\\t&.show {\\n\\t\\t\\tvisibility: visible;\\n\\t\\t\\topacity: 1;\\n\\t\\t}\\n\\t}\\n\\t.menubar-icons {\\n\\t\\tflex-grow: 1;\\n\\t\\tmargin-left: calc((100% - 660px) / 2);\\n\\t}\\n\\t@media (max-width: 660px) {\\n\\t\\t.menubar-icons {\\n\\t\\t\\tmargin-left: 0;\\n\\t\\t}\\n\\t}\\n\\t&::v-deep .action-item__menu ul {\\n\\t\\tmax-height: calc(100vh - 88px);\\n\\t\\toverflow: scroll;\\n\\t}\\n}\\n\\n.menubar button {\\n\\tposition: relative;\\n\\twidth: 44px;\\n\\theight: 44px;\\n\\tmargin: 0;\\n\\tbackground-size: 16px;\\n\\tborder: 0;\\n\\tbackground-color: transparent;\\n\\topacity: .5;\\n\\tcolor: var(--color-main-text);\\n\\tbackground-position: center center;\\n\\tvertical-align: top;\\n\\t&:hover, &:focus, &:active {\\n\\t\\tbackground-color: var(--color-background-dark);\\n\\t}\\n\\n\\t&.is-active::before {\\n\\t\\ttransform: translateX(-50%);\\n\\t\\tborder-radius: 100%;\\n\\t\\tposition: absolute;\\n\\t\\tbackground: var(--color-primary-element);\\n\\t\\tbottom: 3px;\\n\\t\\theight: 6px;\\n\\t\\twidth: 6px;\\n\\t\\tcontent: '';\\n\\t\\tleft: 50%;\\n\\n\\t}\\n\\t&.is-active,\\n\\t&:hover,\\n\\t&:focus {\\n\\t\\topacity: 1;\\n\\t}\\n\\n\\t&.icon-undo,\\n\\t&.icon-redo {\\n\\t\\topacity: .8;\\n\\n\\t\\t&:disabled {\\n\\t\\t\\topacity: .4;\\n\\t\\t}\\n\\t}\\n}\\n\\n.menubar .submenu, .menubar .menuitem-emoji {\\n\\tdisplay: inline-block;\\n\\twidth: 44px;\\n\\theight: 44px;\\n\\tposition: relative;\\n\\tvertical-align: top;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".menububble[data-v-23aa9303]{display:flex;z-index:10020;background:var(--color-main-background-translucent);box-shadow:0 1px 5px var(--color-box-shadow);border-radius:var(--border-radius-large);overflow:hidden;padding:0;margin-left:10px;height:44px}.menububble__button[data-v-23aa9303]{display:block;flex-grow:1;border:0;padding:.9rem .7rem;margin:0;border-radius:0;cursor:pointer;background-color:var(--color-main-background);border-right:1px solid var(--color-border)}.menububble__button[data-v-23aa9303]:focus,.menububble__button[data-v-23aa9303]:hover{background-color:var(--color-background-hover);border:0;border-right:1px solid var(--color-border) !important}.menububble__button[data-v-23aa9303]:last-child{border:0 !important}.menububble__buttontext[data-v-23aa9303]{padding:.4rem;padding-right:0}.menububble__form[data-v-23aa9303]{display:flex;align-items:center}.menububble__input[data-v-23aa9303]{font:inherit;border:none;background:transparent;min-width:250px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/MenuBubble.vue\"],\"names\":[],\"mappings\":\"AAyKA,6BACC,YAAA,CACA,aAAA,CACA,mDAAA,CACA,4CAAA,CACA,wCAAA,CACA,eAAA,CACA,SAAA,CACA,gBAAA,CACA,WAAA,CAEA,qCACC,aAAA,CACA,WAAA,CACA,QAAA,CACA,mBAAA,CACA,QAAA,CACA,eAAA,CACA,cAAA,CACA,6CAAA,CACA,0CAAA,CAEA,sFAEC,8CAAA,CACA,QAAA,CACA,qDAAA,CAGD,gDACC,mBAAA,CAIF,yCACC,aAAA,CACA,eAAA,CAGD,mCACC,YAAA,CACA,kBAAA,CAGD,oCACC,YAAA,CACA,WAAA,CACA,sBAAA,CACA,eAAA\",\"sourcesContent\":[\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n.menububble {\\n\\tdisplay: flex;\\n\\tz-index: 10020;\\n\\tbackground: var(--color-main-background-translucent);\\n\\tbox-shadow: 0 1px 5px var(--color-box-shadow);\\n\\tborder-radius: var(--border-radius-large);\\n\\toverflow: hidden;\\n\\tpadding: 0;\\n\\tmargin-left: 10px;\\n\\theight: 44px;\\n\\n\\t&__button {\\n\\t\\tdisplay: block;\\n\\t\\tflex-grow: 1;\\n\\t\\tborder: 0;\\n\\t\\tpadding: 0.9rem 0.7rem;\\n\\t\\tmargin: 0;\\n\\t\\tborder-radius: 0;\\n\\t\\tcursor: pointer;\\n\\t\\tbackground-color: var(--color-main-background);\\n\\t\\tborder-right: 1px solid var(--color-border);\\n\\n\\t\\t&:focus,\\n\\t\\t&:hover {\\n\\t\\t\\tbackground-color: var(--color-background-hover);\\n\\t\\t\\tborder: 0;\\n\\t\\t\\tborder-right: 1px solid var(--color-border) !important;\\n\\t\\t}\\n\\n\\t\\t&:last-child {\\n\\t\\t\\tborder: 0 !important;\\n\\t\\t}\\n\\t}\\n\\n\\t&__buttontext {\\n\\t\\tpadding: 0.4rem;\\n\\t\\tpadding-right: 0;\\n\\t}\\n\\n\\t&__form {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t}\\n\\n\\t&__input {\\n\\t\\tfont: inherit;\\n\\t\\tborder: none;\\n\\t\\tbackground: transparent;\\n\\t\\tmin-width: 250px;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"#rich-workspace[data-v-6af3308d]{padding:0 50px;margin-bottom:-24px;text-align:left;max-height:0;transition:max-height .5s cubic-bezier(0, 1, 0, 1);z-index:61;position:relative}#rich-workspace.creatable[data-v-6af3308d]{min-height:90px}#rich-workspace[data-v-6af3308d]:only-child{margin-bottom:0}.empty-workspace[data-v-6af3308d]{padding-top:43px;color:var(--color-text-maxcontrast);height:0}#rich-workspace[data-v-6af3308d] div[contenteditable=false]{width:100%;padding:0px;background-color:var(--color-main-background);opacity:1;border:none}#rich-workspace[data-v-6af3308d] #editor-container{height:100%;position:unset !important;top:auto !important}#rich-workspace[data-v-6af3308d] #editor-wrapper{position:unset !important;overflow:visible}#rich-workspace[data-v-6af3308d] #editor{overflow:visible !important}#rich-workspace[data-v-6af3308d] .content-wrapper{overflow:scroll !important;max-height:calc(40vh - 50px);padding-left:10px;padding-bottom:60px}#rich-workspace[data-v-6af3308d] #editor-wrapper .ProseMirror{padding:0px;margin:0}#rich-workspace[data-v-6af3308d] .menubar{z-index:61;margin-bottom:-10px}#rich-workspace[data-v-6af3308d] .menubar .menubar-icons{margin-left:0}#rich-workspace[data-v-6af3308d] .editor__content{margin:0}#rich-workspace.focus[data-v-6af3308d]{max-height:50vh}#rich-workspace[data-v-6af3308d]:not(.focus){max-height:30vh;position:relative;overflow:hidden}#rich-workspace[data-v-6af3308d]:not(.focus):not(.icon-loading):after{content:\\\"\\\";position:absolute;z-index:1;bottom:0;left:0;pointer-events:none;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));width:100%;height:4em}#rich-workspace.dark[data-v-6af3308d]:not(.focus):not(.icon-loading):after{background-image:linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background))}@media only screen and (max-width: 1024px){#rich-workspace[data-v-6af3308d]:not(.focus){max-height:30vh}}html.ie #rich-workspace[data-v-6af3308d] #editor-container{position:initial}html.ie #rich-workspace[data-v-6af3308d] #editor-wrapper{position:relative !important;top:auto !important}html.ie #rich-workspace[data-v-6af3308d] #editor{display:flex;flex-direction:column;overflow:hidden !important}html.ie #rich-workspace[data-v-6af3308d] .menubar{position:relative;overflow:hidden;flex-shrink:0;height:44px;top:auto}html.ie #rich-workspace[data-v-6af3308d] #editor>div:nth-child(2){min-height:44px;overflow-x:hidden;overflow-y:auto;flex-shrink:1}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/views/RichWorkspace.vue\"],\"names\":[],\"mappings\":\"AAkIA,iCACC,cAAA,CAEA,mBAAA,CACA,eAAA,CACA,YAAA,CACA,kDAAA,CACA,UAAA,CACA,iBAAA,CACA,2CACC,eAAA,CAKF,4CACC,eAAA,CAGD,kCACC,gBAAA,CACA,mCAAA,CACA,QAAA,CAGD,4DACC,UAAA,CACA,WAAA,CACA,6CAAA,CACA,SAAA,CACA,WAAA,CAGD,mDACC,WAAA,CACA,yBAAA,CACA,mBAAA,CAGD,iDACC,yBAAA,CACA,gBAAA,CAGD,yCACC,2BAAA,CAGD,kDACC,0BAAA,CACA,4BAAA,CACA,iBAAA,CACA,mBAAA,CAGD,8DACC,WAAA,CACA,QAAA,CAGD,0CACC,UAAA,CAEA,mBAAA,CAGD,yDACC,aAAA,CAGD,kDACC,QAAA,CAGD,uCACC,eAAA,CAGD,6CACC,eAAA,CACA,iBAAA,CACA,eAAA,CAGD,sEACC,UAAA,CACA,iBAAA,CACA,SAAA,CACA,QAAA,CACA,MAAA,CACA,mBAAA,CACA,iGAAA,CACA,UAAA,CACA,UAAA,CAGD,2EACC,2FAAA,CAGD,2CACC,6CACC,eAAA,CAAA,CAMA,2DACC,gBAAA,CAGD,yDACC,4BAAA,CACA,mBAAA,CAGD,iDACC,YAAA,CACA,qBAAA,CACA,0BAAA,CAGD,kDACC,iBAAA,CACA,eAAA,CACA,aAAA,CACA,WAAA,CACA,QAAA,CAGD,kEACC,eAAA,CACA,iBAAA,CACA,eAAA,CACA,aAAA\",\"sourcesContent\":[\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n#rich-workspace {\\n\\tpadding: 0 50px;\\n\\t/* Slightly reduce vertical space */\\n\\tmargin-bottom: -24px;\\n\\ttext-align: left;\\n\\tmax-height: 0;\\n\\ttransition: max-height 0.5s cubic-bezier(0, 1, 0, 1);\\n\\tz-index: 61;\\n\\tposition: relative;\\n\\t&.creatable {\\n\\t\\tmin-height: 90px;\\n\\t}\\n}\\n\\n/* For subfolders, where there are no Recommendations */\\n#rich-workspace:only-child {\\n\\tmargin-bottom: 0;\\n}\\n\\n.empty-workspace {\\n\\tpadding-top: 43px;\\n\\tcolor: var(--color-text-maxcontrast);\\n\\theight: 0;\\n}\\n\\n#rich-workspace::v-deep div[contenteditable=false] {\\n\\twidth: 100%;\\n\\tpadding: 0px;\\n\\tbackground-color: var(--color-main-background);\\n\\topacity: 1;\\n\\tborder: none;\\n}\\n\\n#rich-workspace::v-deep #editor-container {\\n\\theight: 100%;\\n\\tposition: unset !important;\\n\\ttop: auto !important;\\n}\\n\\n#rich-workspace::v-deep #editor-wrapper {\\n\\tposition: unset !important;\\n\\toverflow: visible;\\n}\\n\\n#rich-workspace::v-deep #editor {\\n\\toverflow: visible !important;\\n}\\n\\n#rich-workspace::v-deep .content-wrapper {\\n\\toverflow: scroll !important;\\n\\tmax-height: calc(40vh - 50px);\\n\\tpadding-left: 10px;\\n\\tpadding-bottom: 60px; /* ensure menububble fits below */\\n}\\n\\n#rich-workspace::v-deep #editor-wrapper .ProseMirror {\\n\\tpadding: 0px;\\n\\tmargin: 0;\\n}\\n\\n#rich-workspace::v-deep .menubar {\\n\\tz-index: 61;\\n\\t/* Slightly reduce vertical space */\\n\\tmargin-bottom: -10px;\\n}\\n\\n#rich-workspace::v-deep .menubar .menubar-icons {\\n\\tmargin-left: 0;\\n}\\n\\n#rich-workspace::v-deep .editor__content {\\n\\tmargin: 0;\\n}\\n\\n#rich-workspace.focus {\\n\\tmax-height: 50vh;\\n}\\n\\n#rich-workspace:not(.focus) {\\n\\tmax-height: 30vh;\\n\\tposition: relative;\\n\\toverflow: hidden;\\n}\\n\\n#rich-workspace:not(.focus):not(.icon-loading):after {\\n\\tcontent: '';\\n\\tposition: absolute;\\n\\tz-index: 1;\\n\\tbottom: 0;\\n\\tleft: 0;\\n\\tpointer-events: none;\\n\\tbackground-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\\n\\twidth: 100%;\\n\\theight: 4em;\\n}\\n\\n#rich-workspace.dark:not(.focus):not(.icon-loading):after {\\n\\tbackground-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background));\\n}\\n\\n@media only screen and (max-width: 1024px) {\\n\\t#rich-workspace:not(.focus) {\\n\\t\\tmax-height: 30vh;\\n\\t}\\n}\\n\\nhtml.ie {\\n\\t#rich-workspace::v-deep {\\n\\t\\t#editor-container {\\n\\t\\t\\tposition: initial;\\n\\t\\t}\\n\\n\\t\\t#editor-wrapper {\\n\\t\\t\\tposition: relative !important;\\n\\t\\t\\ttop: auto !important;\\n\\t\\t}\\n\\n\\t\\t#editor {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tflex-direction: column;\\n\\t\\t\\toverflow: hidden !important;\\n\\t\\t}\\n\\n\\t\\t.menubar {\\n\\t\\t\\tposition: relative;\\n\\t\\t\\toverflow: hidden;\\n\\t\\t\\tflex-shrink: 0;\\n\\t\\t\\theight: 44px;\\n\\t\\t\\ttop: auto;\\n\\t\\t}\\n\\n\\t\\t#editor > div:nth-child(2) {\\n\\t\\t\\tmin-height: 44px;\\n\\t\\t\\toverflow-x: hidden;\\n\\t\\t\\toverflow-y: auto;\\n\\t\\t\\tflex-shrink: 1;\\n\\t\\t}\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"menubar\",class:{ 'show': _vm.isVisible, 'autohide': _vm.autohide }},[_c('input',{ref:\"imageFileInput\",staticClass:\"hidden-visually\",attrs:{\"type\":\"file\",\"accept\":\"image/*\",\"aria-hidden\":\"true\",\"multiple\":true},on:{\"change\":_vm.onImageUploadFilePicked}}),_vm._v(\" \"),(_vm.isRichEditor)?_c('div',{ref:\"menubar\",staticClass:\"menubar-icons\"},[_vm._l((_vm.icons),function(icon){return [(icon.class === 'icon-emoji')?_c('EmojiPicker',{directives:[{name:\"show\",rawName:\"v-show\",value:(icon.priority <= _vm.iconCount),expression:\"icon.priority <= iconCount\"}],key:icon.label,staticClass:\"menuitem-emoji\",on:{\"selectData\":function (emojiObject) { return _vm.addEmoji(icon, emojiObject); }}},[_c('button',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:(_vm.t('text', 'Insert emoji')),expression:\"t('text', 'Insert emoji')\"}],staticClass:\"icon-emoji\",attrs:{\"aria-label\":_vm.t('text', 'Insert emoji'),\"aria-haspopup\":true},on:{\"click\":function($event){return _vm.toggleChildMenu(icon)}}})]):(icon.class === 'icon-image')?_c('Actions',{key:icon.label,ref:\"imageActions\",refInFor:true,staticClass:\"submenu\",attrs:{\"default-icon\":'icon-image'},on:{\"open\":function($event){return _vm.toggleChildMenu(icon)},\"close\":function($event){return _vm.toggleChildMenu(icon)}}},[_c('button',{class:{ 'icon-image': true, 'loading-small': _vm.uploadingImages },attrs:{\"slot\":\"icon\",\"title\":icon.label,\"aria-label\":icon.label,\"aria-haspopup\":true},slot:\"icon\"}),_vm._v(\" \"),_c('ActionButton',{attrs:{\"icon\":\"icon-upload\",\"close-after-click\":true,\"disabled\":_vm.uploadingImages},on:{\"click\":function($event){return _vm.onUploadImage()}}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('text', 'Upload from computer'))+\"\\n\\t\\t\\t\\t\")]),_vm._v(\" \"),(!_vm.isPublic)?_c('ActionButton',{attrs:{\"icon\":\"icon-folder\",\"close-after-click\":true,\"disabled\":_vm.uploadingImages},on:{\"click\":function($event){return _vm.showImagePrompt()}}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('text', 'Insert from Files'))+\"\\n\\t\\t\\t\\t\")]):_vm._e()],1):(icon.class)?_c('button',{directives:[{name:\"show\",rawName:\"v-show\",value:(icon.priority <= _vm.iconCount),expression:\"icon.priority <= iconCount\"},{name:\"tooltip\",rawName:\"v-tooltip\",value:(_vm.getLabelAndKeys(icon)),expression:\"getLabelAndKeys(icon)\"}],key:icon.label,class:_vm.getIconClasses(icon),attrs:{\"disabled\":_vm.disabled(icon)},on:{\"click\":function($event){return _vm.clickIcon(icon)}}}):[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(icon.priority <= _vm.iconCount),expression:\"icon.priority <= iconCount\"},{name:\"click-outside\",rawName:\"v-click-outside\",value:(function () { return _vm.hideChildMenu(icon); }),expression:\"() => hideChildMenu(icon)\"}],key:icon.label,staticClass:\"submenu\"},[_c('button',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:(_vm.getLabelAndKeys(icon)),expression:\"getLabelAndKeys(icon)\"}],class:_vm.childIconClasses(icon.children ),on:{\"click\":function($event){$event.preventDefault();return _vm.toggleChildMenu(icon)}}}),_vm._v(\" \"),_c('div',{staticClass:\"popovermenu menu-center\",class:{open: _vm.isChildMenuVisible(icon)}},[_c('PopoverMenu',{attrs:{\"menu\":_vm.childPopoverMenu(icon.children, icon)}})],1)])]]}),_vm._v(\" \"),_c('Actions',{on:{\"open\":function($event){return _vm.toggleChildMenu({ label: 'Remaining Actions' })},\"close\":function($event){return _vm.toggleChildMenu({ label: 'Remaining Actions' })}}},[_vm._l((_vm.icons),function(icon){return [(icon.class && _vm.isHiddenInMenu(icon) && !_vm.hasSubmenu(icon))?_c('ActionButton',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:(_vm.getKeys(icon)),expression:\"getKeys(icon)\"}],key:icon.class,attrs:{\"icon\":icon.class,\"close-after-click\":true},on:{\"click\":function($event){return _vm.clickIcon(icon)}}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(icon.label)+\"\\n\\t\\t\\t\\t\")]):_vm._e()]})],2)],2):_vm._e(),_vm._v(\" \"),_vm._t(\"default\",function(){return [_vm._v(\"\\n\\t\\tLeft side\\n\\t\")]})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport default [\n\t{\n\t\tlabel: t('text', 'Undo'),\n\t\tkeyChar: 'z',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-undo',\n\t\taction: (command) => command.undo(),\n\t\tpriority: 3,\n\t},\n\t{\n\t\tlabel: t('text', 'Redo'),\n\t\tkeyChar: 'y',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-redo',\n\t\taction: (command) => command.redo(),\n\t\tpriority: 11,\n\t},\n\t{\n\t\tlabel: t('text', 'Bold'),\n\t\tkeyChar: 'b',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-bold',\n\t\tisActive: 'strong',\n\t\taction: (command) => {\n\t\t\treturn command.toggleBold()\n\t\t},\n\t\tpriority: 4,\n\t},\n\t{\n\t\tlabel: t('text', 'Italic'),\n\t\tkeyChar: 'i',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-italic',\n\t\tisActive: 'em',\n\t\taction: (command) => {\n\t\t\treturn command.toggleItalic()\n\t\t},\n\t\tpriority: 7,\n\t},\n\t{\n\t\tlabel: t('text', 'Underline'),\n\t\tkeyChar: 'u',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-underline',\n\t\tisActive: 'underline',\n\t\taction: (command) => {\n\t\t\treturn command.toggleUnderline()\n\t\t},\n\t\tpriority: 14,\n\t},\n\t{\n\t\tlabel: t('text', 'Strikethrough'),\n\t\tkeyChar: 'd',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-strike',\n\t\tisActive: 'strike',\n\t\taction: (command) => {\n\t\t\treturn command.toggleStrike()\n\t\t},\n\t\tpriority: 15,\n\t},\n\t{\n\t\tlabel: t('text', 'Headings'),\n\t\tkeyChar: '1…6',\n\t\tkeyModifiers: ['ctrl', 'shift'],\n\t\tvisible: false,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 1'),\n\t\t\t\tclass: 'icon-h1',\n\t\t\t\tisActive: ['heading', { level: 1 }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleHeading({ level: 1 })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 2'),\n\t\t\t\tclass: 'icon-h2',\n\t\t\t\tisActive: ['heading', { level: 2 }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleHeading({ level: 2 })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 3'),\n\t\t\t\tclass: 'icon-h3',\n\t\t\t\tisActive: ['heading', { level: 3 }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleHeading({ level: 3 })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 4'),\n\t\t\t\tclass: 'icon-h4',\n\t\t\t\tisActive: ['heading', { level: 4 }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleHeading({ level: 4 })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 5'),\n\t\t\t\tclass: 'icon-h5',\n\t\t\t\tisActive: ['heading', { level: 5 }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleHeading({ level: 5 })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 6'),\n\t\t\t\tclass: 'icon-h6',\n\t\t\t\tisActive: ['heading', { level: 6 }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleHeading({ level: 6 })\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tpriority: 1,\n\t},\n\t{\n\t\tlabel: t('text', 'Unordered list'),\n\t\tkeyChar: '8',\n\t\tkeyModifiers: ['ctrl', 'shift'],\n\t\tclass: 'icon-ul',\n\t\tisActive: 'bulletList',\n\t\taction: (command) => {\n\t\t\treturn command.toggleBulletList()\n\t\t},\n\t\tpriority: 8,\n\t},\n\t{\n\t\tlabel: t('text', 'Ordered list'),\n\t\tkeyChar: '9',\n\t\tkeyModifiers: ['ctrl', 'shift'],\n\t\tclass: 'icon-ol',\n\t\tisActive: 'orderedList',\n\t\taction: (command) => {\n\t\t\treturn command.toggleOrderedList()\n\t\t},\n\t\tpriority: 9,\n\t},\n\t{\n\t\tlabel: t('text', 'ToDo list'),\n\t\tclass: 'icon-tasklist',\n\t\tisActive: 'taskList',\n\t\taction: (command) => command.toggleTaskList(),\n\t\tpriority: 10,\n\t},\n\t{\n\t\tlabel: t('text', 'Blockquote'),\n\t\tkeyChar: '>',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-quote',\n\t\tisActive: 'blockquote',\n\t\taction: (command) => {\n\t\t\treturn command.toggleBlockquote()\n\t\t},\n\t\tpriority: 12,\n\t},\n\t{\n\t\tlabel: t('text', 'Callouts'),\n\t\tvisible: false,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Info'),\n\t\t\t\tclass: 'icon-info',\n\t\t\t\tisActive: ['callout', { type: 'info' }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleCallout({ type: 'info' })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Success'),\n\t\t\t\tclass: 'icon-success',\n\t\t\t\tisActive: ['callout', { type: 'success' }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleCallout({ type: 'success' })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Warning'),\n\t\t\t\tclass: 'icon-warn',\n\t\t\t\tisActive: ['callout', { type: 'warn' }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleCallout({ type: 'warn' })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Danger'),\n\t\t\t\tclass: 'icon-error',\n\t\t\t\tisActive: ['callout', { type: 'error' }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleCallout({ type: 'error' })\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tpriority: 5,\n\t},\n\t{\n\t\tlabel: t('text', 'Code block'),\n\t\tclass: 'icon-code',\n\t\tisActive: 'codeBlock',\n\t\taction: (command) => {\n\t\t\treturn command.toggleCodeBlock()\n\t\t},\n\t\tpriority: 13,\n\t},\n\t{\n\t\tlabel: t('text', 'Table'),\n\t\tclass: 'icon-table',\n\t\tisActive: 'table',\n\t\taction: (command) => {\n\t\t\treturn command.insertTable()\n\t\t},\n\t\tpriority: 16,\n\t},\n\t{\n\t\tlabel: t('text', 'Emoji picker'),\n\t\tclass: 'icon-emoji',\n\t\taction: (command, emojiObject) => {\n\t\t\treturn command.emoji(emojiObject)\n\t\t},\n\t\tpriority: 6,\n\t},\n\t{\n\t\tlabel: t('text', 'Insert image'),\n\t\tclass: 'icon-image',\n\t\tpriority: 2,\n\t},\n\t{\n\t\tlabel: t('text', 'Formatting help'),\n\t\tclass: 'icon-help',\n\t\tclick: (view) => view.$emit('show-help'),\n\t\tpriority: 17,\n\t},\n]\n","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<div class=\"menubar\" :class=\"{ 'show': isVisible, 'autohide': autohide }\">\n\t\t<input ref=\"imageFileInput\"\n\t\t\ttype=\"file\"\n\t\t\taccept=\"image/*\"\n\t\t\taria-hidden=\"true\"\n\t\t\tclass=\"hidden-visually\"\n\t\t\t:multiple=\"true\"\n\t\t\t@change=\"onImageUploadFilePicked\">\n\t\t<div v-if=\"isRichEditor\" ref=\"menubar\" class=\"menubar-icons\">\n\t\t\t<template v-for=\"(icon) in icons\">\n\t\t\t\t<EmojiPicker v-if=\"icon.class === 'icon-emoji'\"\n\t\t\t\t\tv-show=\"icon.priority <= iconCount\"\n\t\t\t\t\t:key=\"icon.label\"\n\t\t\t\t\tclass=\"menuitem-emoji\"\n\t\t\t\t\t@selectData=\"emojiObject => addEmoji(icon, emojiObject)\">\n\t\t\t\t\t<button v-tooltip=\"t('text', 'Insert emoji')\"\n\t\t\t\t\t\tclass=\"icon-emoji\"\n\t\t\t\t\t\t:aria-label=\"t('text', 'Insert emoji')\"\n\t\t\t\t\t\t:aria-haspopup=\"true\"\n\t\t\t\t\t\t@click=\"toggleChildMenu(icon)\" />\n\t\t\t\t</EmojiPicker>\n\t\t\t\t<Actions v-else-if=\"icon.class === 'icon-image'\"\n\t\t\t\t\t:key=\"icon.label\"\n\t\t\t\t\tref=\"imageActions\"\n\t\t\t\t\tclass=\"submenu\"\n\t\t\t\t\t:default-icon=\"'icon-image'\"\n\t\t\t\t\t@open=\"toggleChildMenu(icon)\"\n\t\t\t\t\t@close=\"toggleChildMenu(icon)\">\n\t\t\t\t\t<button slot=\"icon\"\n\t\t\t\t\t\t:class=\"{ 'icon-image': true, 'loading-small': uploadingImages }\"\n\t\t\t\t\t\t:title=\"icon.label\"\n\t\t\t\t\t\t:aria-label=\"icon.label\"\n\t\t\t\t\t\t:aria-haspopup=\"true\" />\n\t\t\t\t\t<ActionButton icon=\"icon-upload\"\n\t\t\t\t\t\t:close-after-click=\"true\"\n\t\t\t\t\t\t:disabled=\"uploadingImages\"\n\t\t\t\t\t\t@click=\"onUploadImage()\">\n\t\t\t\t\t\t{{ t('text', 'Upload from computer') }}\n\t\t\t\t\t</ActionButton>\n\t\t\t\t\t<ActionButton v-if=\"!isPublic\"\n\t\t\t\t\t\ticon=\"icon-folder\"\n\t\t\t\t\t\t:close-after-click=\"true\"\n\t\t\t\t\t\t:disabled=\"uploadingImages\"\n\t\t\t\t\t\t@click=\"showImagePrompt()\">\n\t\t\t\t\t\t{{ t('text', 'Insert from Files') }}\n\t\t\t\t\t</ActionButton>\n\t\t\t\t</Actions>\n\t\t\t\t<button v-else-if=\"icon.class\"\n\t\t\t\t\tv-show=\"icon.priority <= iconCount\"\n\t\t\t\t\t:key=\"icon.label\"\n\t\t\t\t\tv-tooltip=\"getLabelAndKeys(icon)\"\n\t\t\t\t\t:class=\"getIconClasses(icon)\"\n\t\t\t\t\t:disabled=\"disabled(icon)\"\n\t\t\t\t\t@click=\"clickIcon(icon)\" />\n\t\t\t\t<template v-else>\n\t\t\t\t\t<div v-show=\"icon.priority <= iconCount\"\n\t\t\t\t\t\t:key=\"icon.label\"\n\t\t\t\t\t\tv-click-outside=\"() => hideChildMenu(icon)\"\n\t\t\t\t\t\tclass=\"submenu\">\n\t\t\t\t\t\t<button v-tooltip=\"getLabelAndKeys(icon)\"\n\t\t\t\t\t\t\t:class=\"childIconClasses(icon.children, )\"\n\t\t\t\t\t\t\t@click.prevent=\"toggleChildMenu(icon)\" />\n\t\t\t\t\t\t<div :class=\"{open: isChildMenuVisible(icon)}\" class=\"popovermenu menu-center\">\n\t\t\t\t\t\t\t<PopoverMenu :menu=\"childPopoverMenu(icon.children, icon)\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</template>\n\t\t\t<Actions @open=\"toggleChildMenu({ label: 'Remaining Actions' })\"\n\t\t\t\t@close=\"toggleChildMenu({ label: 'Remaining Actions' })\">\n\t\t\t\t<template v-for=\"(icon) in icons\">\n\t\t\t\t\t<ActionButton v-if=\"icon.class && isHiddenInMenu(icon) && !hasSubmenu(icon)\"\n\t\t\t\t\t\t:key=\"icon.class\"\n\t\t\t\t\t\tv-tooltip=\"getKeys(icon)\"\n\t\t\t\t\t\t:icon=\"icon.class\"\n\t\t\t\t\t\t:close-after-click=\"true\"\n\t\t\t\t\t\t@click=\"clickIcon(icon)\">\n\t\t\t\t\t\t{{ icon.label }}\n\t\t\t\t\t</ActionButton>\n\t\t\t\t\t<!--<template v-else-if=\"!icon.class && isHiddenInMenu(icon)\">\n\t\t\t\t\t\t<ActionButton v-for=\"childIcon in icon.children\"\n\t\t\t\t\t\t\t:key=\"childIcon.class\"\n\t\t\t\t\t\t\t:icon=\"childIcon.class\"\n\t\t\t\t\t\t\t@click=\"clickIcon(childIcon)\">\n\t\t\t\t\t\t\tv-tooltip=\"getKeys(childIcon)\"\n\t\t\t\t\t\t\t{{ childIcon.label }}\n\t\t\t\t\t\t</ActionButton>\n\t\t\t\t\t</template>-->\n\t\t\t\t</template>\n\t\t\t</Actions>\n\t\t</div>\n\t\t<slot>\n\t\t\tLeft side\n\t\t</slot>\n\t</div>\n</template>\n\n<script>\nimport Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'\nimport menuBarIcons from './../mixins/menubar'\nimport isMobile from './../mixins/isMobile'\n\nimport Actions from '@nextcloud/vue/dist/Components/Actions'\nimport ActionButton from '@nextcloud/vue/dist/Components/ActionButton'\nimport PopoverMenu from '@nextcloud/vue/dist/Components/PopoverMenu'\nimport EmojiPicker from '@nextcloud/vue/dist/Components/EmojiPicker'\nimport ClickOutside from 'vue-click-outside'\nimport { getCurrentUser } from '@nextcloud/auth'\n\nexport default {\n\tname: 'MenuBar',\n\tcomponents: {\n\t\tActionButton,\n\t\tPopoverMenu,\n\t\tActions,\n\t\tEmojiPicker,\n\t},\n\tdirectives: {\n\t\tTooltip,\n\t\tClickOutside,\n\t},\n\tmixins: [\n\t\tisMobile,\n\t],\n\tprops: {\n\t\teditor: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tsyncService: {\n\t\t\ttype: Object,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\t\tisRichEditor: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\tautohide: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tisPublic: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tfilePath: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t\tfileId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0,\n\t\t},\n\t\tuploadingImages: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata: () => {\n\t\treturn {\n\t\t\twindowWidth: 0,\n\t\t\twindowHeight: 0,\n\t\t\tforceRecompute: 0,\n\t\t\tsubmenuVisibility: {},\n\t\t\tlastImagePath: null,\n\t\t\ticons: [...menuBarIcons],\n\t\t}\n\t},\n\tcomputed: {\n\t\tisHiddenInMenu() {\n\t\t\treturn (icon) => icon.priority > this.iconCount\n\t\t},\n\t\tgetIconClasses() {\n\t\t\treturn (icon) => {\n\t\t\t\tconst classes = {}\n\t\t\t\tclasses[icon.class] = true\n\t\t\t\tclasses['is-active'] = this.isActive(icon)\n\t\t\t\treturn classes\n\t\t\t}\n\t\t},\n\t\tisActive() {\n\t\t\treturn ({ isActive }) => {\n\t\t\t\tif (!isActive) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tconst args = Array.isArray(isActive) ? isActive : [isActive]\n\t\t\t\treturn this.editor.isActive(...args)\n\t\t\t}\n\t\t},\n\t\tisVisible() {\n\t\t\treturn this.editor.isFocused\n\t\t\t\t|| Object.values(this.submenuVisibility).find((v) => v)\n\t\t},\n\t\tdisabled() {\n\t\t\treturn (menuItem) => {\n\t\t\t\treturn menuItem.action && !menuItem.action(this.editor.can())\n\t\t\t}\n\t\t},\n\t\tisChildMenuVisible() {\n\t\t\treturn (icon) => {\n\t\t\t\treturn Object.prototype.hasOwnProperty.call(this.submenuVisibility, icon.label) ? this.submenuVisibility[icon.label] : false\n\t\t\t}\n\t\t},\n\t\tchildPopoverMenu() {\n\t\t\treturn (icons, parent) => {\n\t\t\t\treturn icons.map(icon => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t// text: this.getLabelAndKeys(icons[index]),\n\t\t\t\t\t\ttext: icon.label,\n\t\t\t\t\t\ticon: icon.class,\n\t\t\t\t\t\tactive: this.isActive(icon),\n\t\t\t\t\t\taction: () => {\n\t\t\t\t\t\t\tthis.clickIcon(icon)\n\t\t\t\t\t\t\tthis.hideChildMenu(parent)\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t\tchildIconClasses() {\n\t\t\treturn (icons) => {\n\t\t\t\tconst icon = this.childIcon(icons)\n\t\t\t\treturn this.getIconClasses(icon)\n\t\t\t}\n\t\t},\n\t\tchildIcon() {\n\t\t\treturn (icons) => icons.find(icon => this.isActive(icon)) || icons[0]\n\t\t},\n\t\ticonCount() {\n\t\t\tthis.forceRecompute // eslint-disable-line\n\t\t\tthis.windowWidth // eslint-disable-line\n\t\t\tconst menuBarWidth = this.$refs.menubar && this.$refs.menubar.clientWidth > 200 ? this.$refs.menubar.clientWidth : 200\n\t\t\treturn Math.max((Math.floor(menuBarWidth / 44) - 1), 0)\n\t\t},\n\t\timagePath() {\n\t\t\treturn this.lastImagePath\n\t\t\t\t|| this.filePath.split('/').slice(0, -1).join('/')\n\t\t},\n\t},\n\tmounted() {\n\t\twindow.addEventListener('resize', this.getWindowWidth)\n\t\tthis.checkInterval = setInterval(() => {\n\t\t\tconst isWidthAvailable = (this.$refs.menubar && this.$refs.menubar.clientWidth > 0)\n\t\t\tif (this.isRichEditor && isWidthAvailable) {\n\t\t\t\tthis.redrawMenuBar()\n\t\t\t}\n\t\t\tif (!this.isRichEditor || isWidthAvailable) {\n\t\t\t\tclearInterval(this.checkInterval)\n\t\t\t}\n\t\t}, 100)\n\t\tthis.$emit('update:loaded', true)\n\t},\n\tbeforeDestroy() {\n\t\twindow.removeEventListener('resize', this.getWindowWidth)\n\t},\n\tmethods: {\n\t\tredrawMenuBar() {\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.getWindowWidth()\n\t\t\t\tthis.forceRecompute++\n\t\t\t})\n\t\t},\n\t\trefocus() {\n\t\t\tthis.editor.chain().focus().run()\n\t\t},\n\t\tclickIcon(icon) {\n\t\t\tif (icon.click) {\n\t\t\t\treturn icon.click(this)\n\t\t\t}\n\t\t\t// Some actions run themselves.\n\t\t\t// others still need to have .run() called upon them.\n\t\t\tconst action = icon.action(this.editor.chain().focus())\n\t\t\taction && action.run()\n\t\t},\n\t\tgetWindowWidth(event) {\n\t\t\tthis.windowWidth = document.documentElement.clientWidth\n\t\t},\n\t\tgetWindowHeight(event) {\n\t\t\tthis.windowHeight = document.documentElement.clientHeight\n\t\t},\n\t\thideChildMenu({ label }) {\n\t\t\tthis.$set(this.submenuVisibility, label, false)\n\t\t},\n\t\thasSubmenu(icon) {\n\t\t\treturn icon.class === 'icon-emoji'\n\t\t\t\t|| icon.children\n\t\t},\n\t\ttoggleChildMenu({ label }) {\n\t\t\tconst lastValue = Object.prototype.hasOwnProperty.call(this.submenuVisibility, label) ? this.submenuVisibility[label] : false\n\t\t\tthis.$set(this.submenuVisibility, label, !lastValue)\n\t\t\tif (lastValue) {\n\t\t\t\tthis.refocus()\n\t\t\t}\n\t\t},\n\t\tonUploadImage() {\n\t\t\tthis.$refs.imageFileInput.click()\n\t\t},\n\t\tonImageUploadFilePicked(event) {\n\t\t\tthis.$emit('image-upload', event.target.files)\n\t\t\t// Clear input to ensure that the change event will be emitted if\n\t\t\t// the same file is picked again.\n\t\t\tevent.target.value = ''\n\t\t},\n\t\tshowImagePrompt() {\n\t\t\tconst currentUser = getCurrentUser()\n\t\t\tif (!currentUser) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tOC.dialogs.filepicker(t('text', 'Insert an image'), (filePath) => {\n\t\t\t\tthis.$emit('image-insert', filePath)\n\t\t\t}, false, [], true, undefined, this.imagePath)\n\t\t},\n\t\toptimalPathTo(targetFile) {\n\t\t\tconst absolutePath = targetFile.split('/')\n\t\t\tconst relativePath = this.relativePathTo(targetFile).split('/')\n\t\t\treturn relativePath.length < absolutePath.length\n\t\t\t\t? relativePath.join('/')\n\t\t\t\t: targetFile\n\t\t},\n\t\trelativePathTo(targetFile) {\n\t\t\tconst current = this.filePath.split('/')\n\t\t\tconst target = targetFile.split('/')\n\t\t\tcurrent.pop() // ignore filename\n\t\t\twhile (current[0] === target[0]) {\n\t\t\t\tcurrent.shift()\n\t\t\t\ttarget.shift()\n\t\t\t}\n\t\t\treturn current.fill('..').concat(target).join('/')\n\t\t},\n\t\taddEmoji(icon, emojiObject) {\n\t\t\treturn icon.action(this.editor.chain(), { id: emojiObject.id, native: emojiObject.native })\n\t\t\t\t.focus()\n\t\t\t\t.run()\n\t\t},\n\t\tkeysString(keyChar, modifiers = []) {\n\t\t\tconst translations = {\n\t\t\t\tctrl: t('text', 'Ctrl'),\n\t\t\t\talt: t('text', 'Alt'),\n\t\t\t\tshift: t('text', 'Shift'),\n\t\t\t}\n\t\t\treturn Object.entries(translations)\n\t\t\t\t.filter(([k, v]) => modifiers.includes(k))\n\t\t\t\t.map(([k, v]) => v)\n\t\t\t\t.concat(keyChar.toUpperCase())\n\t\t\t\t.join('+')\n\t\t},\n\t\tgetKeys(icon) {\n\t\t\treturn (icon.keyChar && !this.isMobile)\n\t\t\t\t? `(${this.keysString(icon.keyChar, icon.keyModifiers)})`\n\t\t\t\t: ''\n\t\t},\n\t\tgetLabelAndKeys(icon) {\n\t\t\treturn [icon.label, this.getKeys(icon)].join(' ')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.menubar {\n\t\t--background-blur: blur(10px);\n\t\tposition: fixed;\n\t\tposition: -webkit-sticky;\n\t\tposition: sticky;\n\t\ttop: 0;\n\t\tdisplay: flex;\n\t\tjustify-content: flex-end;\n\t\tz-index: 10021; // above modal-header and menububble so menubar is always on top\n\t\tbackground-color: var(--color-main-background-translucent);\n\t\t-webkit-backdrop-filter: var(--background-blur);\n\t\tbackdrop-filter: var(--background-blur);\n\t\tmax-height: 44px; // important for mobile so that the buttons are always inside the container\n\t\tpadding-top:3px;\n\t\tpadding-bottom: 3px;\n\n\t\t&.autohide {\n\t\t\tvisibility: hidden;\n\t\t\topacity: 0;\n\t\t\ttransition: visibility 0.2s 0.4s, opacity 0.2s 0.4s;\n\t\t\t&.show {\n\t\t\t\tvisibility: visible;\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t\t.menubar-icons {\n\t\t\tflex-grow: 1;\n\t\t\tmargin-left: calc((100% - 660px) / 2);\n\t\t}\n\t\t@media (max-width: 660px) {\n\t\t\t.menubar-icons {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t}\n\t\t&::v-deep .action-item__menu ul {\n\t\t\tmax-height: calc(100vh - 88px);\n\t\t\toverflow: scroll;\n\t\t}\n\t}\n\n\t.menubar button {\n\t\tposition: relative;\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tmargin: 0;\n\t\tbackground-size: 16px;\n\t\tborder: 0;\n\t\tbackground-color: transparent;\n\t\topacity: .5;\n\t\tcolor: var(--color-main-text);\n\t\tbackground-position: center center;\n\t\tvertical-align: top;\n\t\t&:hover, &:focus, &:active {\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\n\t\t&.is-active::before {\n\t\t\ttransform: translateX(-50%);\n\t\t\tborder-radius: 100%;\n\t\t\tposition: absolute;\n\t\t\tbackground: var(--color-primary-element);\n\t\t\tbottom: 3px;\n\t\t\theight: 6px;\n\t\t\twidth: 6px;\n\t\t\tcontent: '';\n\t\t\tleft: 50%;\n\n\t\t}\n\t\t&.is-active,\n\t\t&:hover,\n\t\t&:focus {\n\t\t\topacity: 1;\n\t\t}\n\n\t\t&.icon-undo,\n\t\t&.icon-redo {\n\t\t\topacity: .8;\n\n\t\t\t&:disabled {\n\t\t\t\topacity: .4;\n\t\t\t}\n\t\t}\n\t}\n\n\t.menubar .submenu, .menubar .menuitem-emoji {\n\t\tdisplay: inline-block;\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tposition: relative;\n\t\tvertical-align: top;\n\t}\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBar.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBar.vue?vue&type=style&index=0&id=2bc7f97a&scoped=true&lang=scss&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBar.vue?vue&type=style&index=0&id=2bc7f97a&scoped=true&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./MenuBar.vue?vue&type=template&id=2bc7f97a&scoped=true&\"\nimport script from \"./MenuBar.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuBar.vue?vue&type=script&lang=js&\"\nimport style0 from \"./MenuBar.vue?vue&type=style&index=0&id=2bc7f97a&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"2bc7f97a\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('BubbleMenu',{staticClass:\"menububble\",attrs:{\"editor\":_vm.editor,\"tippy-options\":{ onHide: _vm.hideLinkMenu, duration: 200, placement: 'bottom' }}},[(_vm.linkMenuIsActive)?_c('form',{staticClass:\"menububble__form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.setLinkUrl()}}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.linkUrl),expression:\"linkUrl\"}],ref:\"linkInput\",staticClass:\"menububble__input\",attrs:{\"type\":\"text\",\"placeholder\":\"https://\"},domProps:{\"value\":(_vm.linkUrl)},on:{\"keydown\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"esc\",27,$event.key,[\"Esc\",\"Escape\"])){ return null; }return _vm.hideLinkMenu.apply(null, arguments)},\"input\":function($event){if($event.target.composing){ return; }_vm.linkUrl=$event.target.value}}}),_vm._v(\" \"),_c('button',{staticClass:\"menububble__button icon-confirm\",attrs:{\"type\":\"button\",\"tabindex\":\"0\"},on:{\"click\":function($event){return _vm.setLinkUrl()}}})]):[_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': _vm.isActive('link') },on:{\"click\":function($event){return _vm.showLinkMenu()}}},[_c('span',{staticClass:\"icon-link\"}),_vm._v(\" \"),_c('span',{staticClass:\"menububble__buttontext\"},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.isActive('link') ? _vm.t('text', 'Update Link') : _vm.t('text', 'Add Link'))+\"\\n\\t\\t\\t\")])]),_vm._v(\" \"),(!_vm.isUsingDirectEditing)?_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': _vm.isActive('link') },on:{\"click\":function($event){return _vm.selectFile()}}},[_c('span',{staticClass:\"icon-file\"}),_vm._v(\" \"),_c('span',{staticClass:\"menububble__buttontext\"},[_vm._v(_vm._s(_vm.t('text', 'Link file')))])]):_vm._e(),_vm._v(\" \"),(_vm.isActive('link'))?_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': _vm.isActive('link') },on:{\"click\":function($event){return _vm.removeLinkUrl()}}},[_c('span',{staticClass:\"icon-delete\"}),_vm._v(\" \"),_c('span',{staticClass:\"menububble__buttontext\"},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('text', 'Remove Link'))+\"\\n\\t\\t\\t\")])]):_vm._e()]],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<BubbleMenu :editor=\"editor\"\n\t\t:tippy-options=\"{ onHide: hideLinkMenu, duration: 200, placement: 'bottom' }\"\n\t\tclass=\"menububble\">\n\t\t<form v-if=\"linkMenuIsActive\" class=\"menububble__form\" @submit.prevent=\"setLinkUrl()\">\n\t\t\t<input ref=\"linkInput\"\n\t\t\t\tv-model=\"linkUrl\"\n\t\t\t\tclass=\"menububble__input\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tplaceholder=\"https://\"\n\t\t\t\t@keydown.esc=\"hideLinkMenu\">\n\t\t\t<button class=\"menububble__button icon-confirm\"\n\t\t\t\ttype=\"button\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t@click=\"setLinkUrl()\" />\n\t\t</form>\n\n\t\t<template v-else>\n\t\t\t<button class=\"menububble__button\"\n\t\t\t\t:class=\"{ 'is-active': isActive('link') }\"\n\t\t\t\t@click=\"showLinkMenu()\">\n\t\t\t\t<span class=\"icon-link\" />\n\t\t\t\t<span class=\"menububble__buttontext\">\n\t\t\t\t\t{{ isActive('link') ? t('text', 'Update Link') : t('text', 'Add Link') }}\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t\t<button v-if=\"!isUsingDirectEditing\"\n\t\t\t\tclass=\"menububble__button\"\n\t\t\t\t:class=\"{ 'is-active': isActive('link') }\"\n\t\t\t\t@click=\"selectFile()\">\n\t\t\t\t<span class=\"icon-file\" />\n\t\t\t\t<span class=\"menububble__buttontext\">{{ t('text', 'Link file') }}</span>\n\t\t\t</button>\n\t\t\t<button v-if=\"isActive('link')\"\n\t\t\t\tclass=\"menububble__button\"\n\t\t\t\t:class=\"{ 'is-active': isActive('link') }\"\n\t\t\t\t@click=\"removeLinkUrl()\">\n\t\t\t\t<span class=\"icon-delete\" />\n\t\t\t\t<span class=\"menububble__buttontext\">\n\t\t\t\t\t{{ t('text', 'Remove Link') }}\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t</template>\n\t</BubbleMenu>\n</template>\n\n<script>\nimport { BubbleMenu } from '@tiptap/vue-2'\nimport { getMarkAttributes } from '@tiptap/core'\nimport Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { optimalPath } from './../helpers/files'\nimport { loadState } from '@nextcloud/initial-state'\n\nexport default {\n\tname: 'MenuBubble',\n\tcomponents: {\n\t\tBubbleMenu,\n\t},\n\tdirectives: {\n\t\ttooltip: Tooltip,\n\t},\n\tprops: {\n\t\teditor: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\t// used to calculate the position based on the scrollOffset\n\t\tcontentWrapper: {\n\t\t\ttype: HTMLDivElement,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\t\tfilePath: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\tdata: () => {\n\t\treturn {\n\t\t\tlinkUrl: null,\n\t\t\tlinkMenuIsActive: false,\n\t\t\tisUsingDirectEditing: loadState('text', 'directEditingToken', null) !== null,\n\t\t}\n\t},\n\tmethods: {\n\t\tshowLinkMenu() {\n\t\t\tconst attrs = getMarkAttributes(this.editor.state, 'link')\n\t\t\tthis.linkUrl = attrs.href\n\t\t\tthis.linkMenuIsActive = true\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$refs.linkInput.focus()\n\t\t\t})\n\t\t},\n\t\thideLinkMenu() {\n\t\t\tthis.linkUrl = null\n\t\t\tthis.linkMenuIsActive = false\n\t\t},\n\t\tselectFile() {\n\t\t\tconst currentUser = getCurrentUser()\n\t\t\tif (!currentUser) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst startPath = this.filePath.split('/').slice(0, -1).join('/')\n\t\t\tOC.dialogs.filepicker(t('text', 'Select file to link to'), (file) => {\n\t\t\t\tconst client = OC.Files.getClient()\n\t\t\t\tclient.getFileInfo(file).then((_status, fileInfo) => {\n\t\t\t\t\tconst path = optimalPath(this.filePath, `${fileInfo.path}/${fileInfo.name}`)\n\t\t\t\t\tconst encodedPath = path.split('/').map(encodeURIComponent).join('/')\n\t\t\t\t\tconst href = `${encodedPath}?fileId=${fileInfo.id}`\n\t\t\t\t\tthis.editor.chain().setLink({ href }).focus().run()\n\t\t\t\t\tthis.hideLinkMenu()\n\t\t\t\t})\n\t\t\t}, false, [], true, undefined, startPath)\n\t\t},\n\t\tsetLinkUrl() {\n\t\t\tlet url = this.linkUrl\n\t\t\t// Heuristics for determining if we need a https:// prefix.\n\t\t\tconst noPrefixes = [\n\t\t\t\t/^[a-zA-Z]+:/, // url with protocol (\"mailTo:email@domain.tld\")\n\t\t\t\t/^\\//, // absolute path\n\t\t\t\t/\\?fileId=/, // relative link with fileId\n\t\t\t\t/^\\.\\.?\\//, // relative link starting with ./ or ../\n\t\t\t\t/^[^.]*[/$]/, // no dots before first '/' - not a domain name\n\t\t\t\t/^#/, // url fragment\n\t\t\t]\n\t\t\tif (url && !noPrefixes.find(regex => url.match(regex))) {\n\t\t\t\turl = 'https://' + url\n\t\t\t}\n\n\t\t\t// Avoid issues when parsing urls later on in markdown that might be entered in an invalid format (e.g. \"mailto: example@example.com\")\n\t\t\tconst href = url.replaceAll(' ', '%20')\n\t\t\tthis.editor.chain().setLink({ href }).focus().run()\n\t\t\tthis.hideLinkMenu()\n\t\t},\n\t\tremoveLinkUrl() {\n\t\t\tthis.editor.chain().unsetLink().focus().run()\n\t\t},\n\t\tisActive(selector, args = {}) {\n\t\t\treturn this.editor.isActive(selector, args)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.menububble {\n\t\tdisplay: flex;\n\t\tz-index: 10020;\n\t\tbackground: var(--color-main-background-translucent);\n\t\tbox-shadow: 0 1px 5px var(--color-box-shadow);\n\t\tborder-radius: var(--border-radius-large);\n\t\toverflow: hidden;\n\t\tpadding: 0;\n\t\tmargin-left: 10px;\n\t\theight: 44px;\n\n\t\t&__button {\n\t\t\tdisplay: block;\n\t\t\tflex-grow: 1;\n\t\t\tborder: 0;\n\t\t\tpadding: 0.9rem 0.7rem;\n\t\t\tmargin: 0;\n\t\t\tborder-radius: 0;\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: var(--color-main-background);\n\t\t\tborder-right: 1px solid var(--color-border);\n\n\t\t\t&:focus,\n\t\t\t&:hover {\n\t\t\t\tbackground-color: var(--color-background-hover);\n\t\t\t\tborder: 0;\n\t\t\t\tborder-right: 1px solid var(--color-border) !important;\n\t\t\t}\n\n\t\t\t&:last-child {\n\t\t\t\tborder: 0 !important;\n\t\t\t}\n\t\t}\n\n\t\t&__buttontext {\n\t\t\tpadding: 0.4rem;\n\t\t\tpadding-right: 0;\n\t\t}\n\n\t\t&__form {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t&__input {\n\t\t\tfont: inherit;\n\t\t\tborder: none;\n\t\t\tbackground: transparent;\n\t\t\tmin-width: 250px;\n\t\t}\n\t}\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=style&index=0&id=23aa9303&scoped=true&lang=scss&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=style&index=0&id=23aa9303&scoped=true&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./MenuBubble.vue?vue&type=template&id=23aa9303&scoped=true&\"\nimport script from \"./MenuBubble.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuBubble.vue?vue&type=script&lang=js&\"\nimport style0 from \"./MenuBubble.vue?vue&type=style&index=0&id=23aa9303&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"23aa9303\",\n null\n \n)\n\nexport default component.exports"],"names":["options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_vm","this","_h","$createElement","_c","_self","class","loaded","ready","focus","darkTheme","canCreate","attrs","staticClass","on","createNew","_v","_s","t","_e","directives","name","rawName","value","expression","key","file","path","id","filepath","shareToken","mimetype","autofocus","$event","unfocus","reset","FILE_ACTION_IDENTIFIER","optimalPath","from","to","current","split","target","pop","shift","relativePath","fill","concat","absolutePath","length","join","registerFileCreate","newFileMenuPlugin","attach","menu","fileList","addMenuEntry","displayName","templateName","iconClass","fileType","actionHandler","createFile","then","status","data","fileInfoModel","OCA","Files","FileInfoModel","Viewer","fileActions","triggerAction","OC","Plugins","register","registerFileActionFallback","sharingToken","document","getElementById","dir","ViewerRoot","createElement","body","appendChild","registerAction","mime","PERMISSION_UPDATE","PERMISSION_READ","imagePath","filename","window","FileList","findFile","Promise","all","imports","getCurrentDirectory","Vue","default","prototype","n","Editor","render","h","self","props","fileId","active","mimeType","close","$destroy","$mount","i","openMimetypes","setDefault","FilesWorkspacePlugin","el","vm","registerHeader","bind","priority","PROPERTY_WORKSPACE_FILE","Client","NS_NEXTCLOUD","oldGetWebdavProperties","_getWebdavProperties","apply","arguments","readmeId","filesClient","addFileInfoParser","response","propStat","properties","endsWith","folder","permissions","console","warn","open","module","View","extend","RichWorkspace","propsData","store","$el","previous","parseInt","openMimetypesMarkdown","openMimetypesPlainText","___CSS_LOADER_EXPORT___","push","label","keyChar","keyModifiers","action","command","undo","redo","isActive","toggleBold","toggleItalic","toggleUnderline","toggleStrike","visible","children","level","toggleHeading","toggleBulletList","toggleOrderedList","toggleTaskList","toggleBlockquote","type","toggleCallout","toggleCodeBlock","insertTable","emojiObject","emoji","click","view","$emit","isVisible","autohide","ref","onImageUploadFilePicked","_l","icon","iconCount","addEmoji","toggleChildMenu","refInFor","uploadingImages","slot","onUploadImage","isPublic","showImagePrompt","getLabelAndKeys","getIconClasses","disabled","clickIcon","hideChildMenu","childIconClasses","preventDefault","isChildMenuVisible","childPopoverMenu","isHiddenInMenu","hasSubmenu","getKeys","_t","editor","onHide","hideLinkMenu","duration","placement","setLinkUrl","domProps","indexOf","_k","keyCode","composing","linkUrl","showLinkMenu","isUsingDirectEditing","selectFile","removeLinkUrl"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"file":"editor-rich.js?v=c2538ac2ef3c077b3106","mappings":";sSAkDA,MClD8K,EDkD9K,CACA,qBACA,YACA,oGAEA,OACA,MACA,YACA,cAEA,QACA,YACA,eAGA,KAfA,WAgBA,OACA,SACA,UACA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:///text/src/views/RichWorkspace.vue?vue&type=script&lang=js&","webpack://text/./src/views/RichWorkspace.vue?9518","webpack://text/./src/views/RichWorkspace.vue?c027","webpack:///text/src/views/RichWorkspace.vue?vue&type=template&id=6af3308d&scoped=true&","webpack:///text/src/helpers/files.js","webpack:///text/src/helpers/mime.js","webpack:///text/src/components/MenuBar.vue?vue&type=style&index=0&id=2bc7f97a&scoped=true&lang=scss&","webpack:///text/src/components/MenuBubble.vue?vue&type=style&index=0&id=23aa9303&scoped=true&lang=scss&","webpack:///text/src/views/RichWorkspace.vue?vue&type=style&index=0&id=6af3308d&lang=scss&scoped=true&","webpack:///text/src/components/MenuBar.vue?vue&type=template&id=2bc7f97a&scoped=true&","webpack:///text/src/mixins/menubar.js","webpack:///text/src/components/MenuBar.vue","webpack:///text/src/components/MenuBar.vue?vue&type=script&lang=js&","webpack://text/./src/components/MenuBar.vue?4871","webpack://text/./src/components/MenuBar.vue?ce1f","webpack:///text/src/components/MenuBubble.vue?vue&type=template&id=23aa9303&scoped=true&","webpack:///text/src/components/MenuBubble.vue","webpack:///text/src/components/MenuBubble.vue?vue&type=script&lang=js&","webpack://text/./src/components/MenuBubble.vue?a094","webpack://text/./src/components/MenuBubble.vue?8445"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<div v-if=\"enabled\" id=\"rich-workspace\" :class=\"{'icon-loading': !loaded || !ready, 'focus': focus, 'dark': darkTheme, 'creatable': canCreate}\">\n\t\t<div v-if=\"showEmptyWorkspace\" class=\"empty-workspace\" @click=\"createNew\">\n\t\t\t<p class=\"placeholder\">\n\t\t\t\t{{ t('text', 'Add notes, lists or links …') }}\n\t\t\t</p>\n\t\t</div>\n\n\t\t<EditorWrapper v-if=\"file\"\n\t\t\tv-show=\"ready\"\n\t\t\t:key=\"file.path\"\n\t\t\t:file-id=\"file.id\"\n\t\t\t:relative-path=\"filepath\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:active=\"true\"\n\t\t\t:autohide=\"true\"\n\t\t\t:mime=\"file.mimetype\"\n\t\t\t:autofocus=\"autofocus\"\n\t\t\t@ready=\"ready=true; loaded=true\"\n\t\t\t@focus=\"focus=true\"\n\t\t\t@blur=\"unfocus\"\n\t\t\t@error=\"reset\" />\n\t</div>\n</template>\n\n<script>\nimport { subscribe } from '@nextcloud/event-bus'\n\nexport default {\n\tname: 'RichWorkspace',\n\tcomponents: {\n\t\tEditorWrapper: () => import(/* webpackChunkName: \"editor\" */'./../components/EditorWrapper'),\n\t},\n\tprops: {\n\t\tfile: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t\tfolder: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfocus: false,\n\t\t\tloaded: false,\n\t\t\tready: false,\n\t\t\tautofocus: false,\n\t\t\tdarkTheme: OCA.Accessibility && OCA.Accessibility.theme === 'dark',\n\t\t\tenabled: OCA.Text.RichWorkspaceEnabled,\n\t\t}\n\t},\n\tcomputed: {\n\t\tshareToken() {\n\t\t\treturn document.getElementById('sharingToken')?.value\n\t\t},\n\t\tcanCreate() {\n\t\t\treturn !!(this.folder && (this.folder.permissions & OC.PERMISSION_CREATE))\n\t\t},\n\t\tshowEmptyWorkspace() {\n\t\t\treturn (!this.file || (this.autofocus && !this.ready)) && this.canCreate\n\t\t},\n\t\tfilepath() {\n\t\t\tconst { path, name } = this.file\n\t\t\treturn path + (path.endsWith('/') ? '' : '/') + name\n\t\t},\n\t},\n\twatch: {\n\t\tfocus(newValue) {\n\t\t\tif (!newValue) {\n\t\t\t\tdocument.querySelector('#editor').scrollTo(0, 0)\n\t\t\t}\n\t\t},\n\t},\n\tasync mounted() {\n\t\tsubscribe('Text::showRichWorkspace', () => {\n\t\t\tthis.enabled = true\n\t\t})\n\t\tsubscribe('Text::hideRichWorkspace', () => {\n\t\t\tthis.enabled = false\n\t\t})\n\t},\n\tmethods: {\n\t\tunfocus() {\n\t\t\t// setTimeout(() => this.focus = false, 2000)\n\t\t},\n\t\treset() {\n\t\t\tthis.focus = false\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.creating = false\n\t\t\t})\n\t\t},\n\t\tcreateNew() {\n\t\t\tif (this.creating) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.creating = true\n\t\t\tthis.autofocus = true\n\t\t\tif (!this.file) {\n\t\t\t\twindow.FileList.createFile('Readme.md', { scrollTo: false, animate: false })\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\t#rich-workspace {\n\t\tpadding: 0 50px;\n\t\t/* Slightly reduce vertical space */\n\t\tmargin-bottom: -24px;\n\t\ttext-align: left;\n\t\tmax-height: 0;\n\t\ttransition: max-height 0.5s cubic-bezier(0, 1, 0, 1);\n\t\tz-index: 61;\n\t\tposition: relative;\n\t\t&.creatable {\n\t\t\tmin-height: 90px;\n\t\t}\n\t}\n\n\t/* For subfolders, where there are no Recommendations */\n\t#rich-workspace:only-child {\n\t\tmargin-bottom: 0;\n\t}\n\n\t.empty-workspace {\n\t\tpadding-top: 43px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t\theight: 0;\n\t}\n\n\t#rich-workspace::v-deep div[contenteditable=false] {\n\t\twidth: 100%;\n\t\tpadding: 0px;\n\t\tbackground-color: var(--color-main-background);\n\t\topacity: 1;\n\t\tborder: none;\n\t}\n\n\t#rich-workspace::v-deep #editor-container {\n\t\theight: 100%;\n\t\tposition: unset !important;\n\t\ttop: auto !important;\n\t}\n\n\t#rich-workspace::v-deep #editor-wrapper {\n\t\tposition: unset !important;\n\t\toverflow: visible;\n\t}\n\n\t#rich-workspace::v-deep #editor {\n\t\toverflow: visible !important;\n\t}\n\n\t#rich-workspace::v-deep .content-wrapper {\n\t\toverflow: scroll !important;\n\t\tmax-height: calc(40vh - 50px);\n\t\tpadding-left: 10px;\n\t\tpadding-bottom: 60px; /* ensure menububble fits below */\n\t}\n\n\t#rich-workspace::v-deep #editor-wrapper .ProseMirror {\n\t\tpadding: 0px;\n\t\tmargin: 0;\n\t}\n\n\t#rich-workspace::v-deep .menubar {\n\t\tz-index: 61;\n\t\t/* Slightly reduce vertical space */\n\t\tmargin-bottom: -10px;\n\t}\n\n\t#rich-workspace::v-deep .menubar .menubar-icons {\n\t\tmargin-left: 0;\n\t}\n\n\t#rich-workspace::v-deep .editor__content {\n\t\tmargin: 0;\n\t}\n\n\t#rich-workspace.focus {\n\t\tmax-height: 50vh;\n\t}\n\n\t#rich-workspace:not(.focus) {\n\t\tmax-height: 30vh;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t}\n\n\t#rich-workspace:not(.focus):not(.icon-loading):after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tz-index: 1;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tpointer-events: none;\n\t\tbackground-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\n\t\twidth: 100%;\n\t\theight: 4em;\n\t}\n\n\t#rich-workspace.dark:not(.focus):not(.icon-loading):after {\n\t\tbackground-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background));\n\t}\n\n\t@media only screen and (max-width: 1024px) {\n\t\t#rich-workspace:not(.focus) {\n\t\t\tmax-height: 30vh;\n\t\t}\n\t}\n\n\thtml.ie {\n\t\t#rich-workspace::v-deep {\n\t\t\t#editor-container {\n\t\t\t\tposition: initial;\n\t\t\t}\n\n\t\t\t#editor-wrapper {\n\t\t\t\tposition: relative !important;\n\t\t\t\ttop: auto !important;\n\t\t\t}\n\n\t\t\t#editor {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\toverflow: hidden !important;\n\t\t\t}\n\n\t\t\t.menubar {\n\t\t\t\tposition: relative;\n\t\t\t\toverflow: hidden;\n\t\t\t\tflex-shrink: 0;\n\t\t\t\theight: 44px;\n\t\t\t\ttop: auto;\n\t\t\t}\n\n\t\t\t#editor > div:nth-child(2) {\n\t\t\t\tmin-height: 44px;\n\t\t\t\toverflow-x: hidden;\n\t\t\t\toverflow-y: auto;\n\t\t\t\tflex-shrink: 1;\n\t\t\t}\n\t\t}\n\t}\n\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=style&index=0&id=6af3308d&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=style&index=0&id=6af3308d&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./RichWorkspace.vue?vue&type=template&id=6af3308d&scoped=true&\"\nimport script from \"./RichWorkspace.vue?vue&type=script&lang=js&\"\nexport * from \"./RichWorkspace.vue?vue&type=script&lang=js&\"\nimport style0 from \"./RichWorkspace.vue?vue&type=style&index=0&id=6af3308d&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6af3308d\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.enabled)?_c('div',{class:{'icon-loading': !_vm.loaded || !_vm.ready, 'focus': _vm.focus, 'dark': _vm.darkTheme, 'creatable': _vm.canCreate},attrs:{\"id\":\"rich-workspace\"}},[(_vm.showEmptyWorkspace)?_c('div',{staticClass:\"empty-workspace\",on:{\"click\":_vm.createNew}},[_c('p',{staticClass:\"placeholder\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('text', 'Add notes, lists or links …'))+\"\\n\\t\\t\")])]):_vm._e(),_vm._v(\" \"),(_vm.file)?_c('EditorWrapper',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.ready),expression:\"ready\"}],key:_vm.file.path,attrs:{\"file-id\":_vm.file.id,\"relative-path\":_vm.filepath,\"share-token\":_vm.shareToken,\"active\":true,\"autohide\":true,\"mime\":_vm.file.mimetype,\"autofocus\":_vm.autofocus},on:{\"ready\":function($event){_vm.ready=true; _vm.loaded=true},\"focus\":function($event){_vm.focus=true},\"blur\":_vm.unfocus,\"error\":_vm.reset}}):_vm._e()],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { openMimetypes } from './mime'\nimport RichWorkspace from '../views/RichWorkspace'\nimport { imagePath } from '@nextcloud/router'\nimport store from '../store'\n\nconst FILE_ACTION_IDENTIFIER = 'Edit with text app'\n\nconst optimalPath = function(from, to) {\n\tconst current = from.split('/')\n\tconst target = to.split('/')\n\tcurrent.pop() // ignore filename\n\twhile (current[0] === target[0]) {\n\t\tcurrent.shift()\n\t\ttarget.shift()\n\t}\n\tconst relativePath = current.fill('..').concat(target)\n\tconst absolutePath = to.split('/')\n\treturn relativePath.length < absolutePath.length\n\t\t? relativePath.join('/')\n\t\t: to\n}\n\nconst registerFileCreate = () => {\n\tconst newFileMenuPlugin = {\n\t\tattach(menu) {\n\t\t\tconst fileList = menu.fileList\n\n\t\t\t// only attach to main file list, public view is not supported yet\n\t\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// register the new menu entry\n\t\t\tmenu.addMenuEntry({\n\t\t\t\tid: 'file',\n\t\t\t\tdisplayName: t('text', 'New text document'),\n\t\t\t\ttemplateName: t('text', 'New text document') + '.md',\n\t\t\t\ticonClass: 'icon-filetype-text',\n\t\t\t\tfileType: 'file',\n\t\t\t\tactionHandler(name) {\n\t\t\t\t\tfileList.createFile(name).then(function(status, data) {\n\t\t\t\t\t\tconst fileInfoModel = new OCA.Files.FileInfoModel(data)\n\t\t\t\t\t\tif (typeof OCA.Viewer !== 'undefined') {\n\t\t\t\t\t\t\tOCA.Files.fileActions.triggerAction('view', fileInfoModel, fileList)\n\t\t\t\t\t\t} else if (typeof OCA.Viewer === 'undefined') {\n\t\t\t\t\t\t\tOCA.Files.fileActions.triggerAction(FILE_ACTION_IDENTIFIER, fileInfoModel, fileList)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t})\n\t\t},\n\t}\n\tOC.Plugins.register('OCA.Files.NewFileMenu', newFileMenuPlugin)\n}\n\nconst registerFileActionFallback = () => {\n\tconst sharingToken = document.getElementById('sharingToken') ? document.getElementById('sharingToken').value : null\n\tconst dir = document.getElementById('dir').value\n\n\tif (!sharingToken || dir !== '') {\n\t\tconst ViewerRoot = document.createElement('div')\n\t\tViewerRoot.id = 'text-viewer-fallback'\n\t\tdocument.body.appendChild(ViewerRoot)\n\t\tconst registerAction = (mime) => OCA.Files.fileActions.register(\n\t\t\tmime,\n\t\t\tFILE_ACTION_IDENTIFIER,\n\t\t\tOC.PERMISSION_UPDATE | OC.PERMISSION_READ,\n\t\t\timagePath('core', 'actions/rename'),\n\t\t\t(filename) => {\n\t\t\t\tconst file = window.FileList.findFile(filename)\n\t\t\t\tPromise.all([\n\t\t\t\t\timport('vue'),\n\t\t\t\t\timport(/* webpackChunkName: \"files-modal\" */'./../components/PublicFilesEditor'),\n\t\t\t\t]).then((imports) => {\n\t\t\t\t\tconst path = window.FileList.getCurrentDirectory() + '/' + filename\n\t\t\t\t\tconst Vue = imports[0].default\n\t\t\t\t\tVue.prototype.t = window.t\n\t\t\t\t\tVue.prototype.n = window.n\n\t\t\t\t\tVue.prototype.OCA = window.OCA\n\t\t\t\t\tconst Editor = imports[1].default\n\t\t\t\t\tconst vm = new Vue({\n\t\t\t\t\t\trender: function(h) { // eslint-disable-line\n\t\t\t\t\t\t\tconst self = this\n\t\t\t\t\t\t\treturn h(Editor, {\n\t\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\t\tfileId: file ? file.id : null,\n\t\t\t\t\t\t\t\t\tactive: true,\n\t\t\t\t\t\t\t\t\tshareToken: sharingToken,\n\t\t\t\t\t\t\t\t\trelativePath: path,\n\t\t\t\t\t\t\t\t\tmimeType: file.mimetype,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ton: {\n\t\t\t\t\t\t\t\t\tclose: function() { // eslint-disable-line\n\t\t\t\t\t\t\t\t\t\tself.$destroy()\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t\tvm.$mount(ViewerRoot)\n\t\t\t\t})\n\t\t\t},\n\t\t\tt('text', 'Edit')\n\t\t)\n\n\t\tfor (let i = 0; i < openMimetypes.length; i++) {\n\t\t\tregisterAction(openMimetypes[i])\n\t\t\tOCA.Files.fileActions.setDefault(openMimetypes[i], FILE_ACTION_IDENTIFIER)\n\t\t}\n\t}\n\n}\n\nconst FilesWorkspacePlugin = {\n\n\tel: null,\n\tvm: null,\n\n\tattach(fileList) {\n\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\treturn\n\t\t}\n\n\t\tthis.el = document.createElement('div')\n\t\tfileList.registerHeader({\n\t\t\tid: 'workspace',\n\t\t\tel: this.el,\n\t\t\trender: this.render.bind(this),\n\t\t\tpriority: 10,\n\t\t})\n\n\t\tconst PROPERTY_WORKSPACE_FILE = `{${OC.Files.Client.NS_NEXTCLOUD}}rich-workspace-file`\n\n\t\tconst oldGetWebdavProperties = fileList._getWebdavProperties\n\t\tfileList._getWebdavProperties = function() {\n\t\t\treturn [\n\t\t\t\t...oldGetWebdavProperties.apply(this, arguments),\n\t\t\t\tPROPERTY_WORKSPACE_FILE,\n\t\t\t]\n\t\t}\n\n\t\tlet readmeId = null\n\n\t\tfileList.filesClient.addFileInfoParser((response, data) => {\n\t\t\tif (data.mimetype === 'httpd/unix-directory') {\n\t\t\t\tconst props = response.propStat[0].properties\n\t\t\t\tconst dir = data.path + (data.path.endsWith('/') ? '' : '/') + data.name\n\t\t\t\tif (dir === fileList.getCurrentDirectory()) {\n\t\t\t\t\treadmeId = props[PROPERTY_WORKSPACE_FILE]\n\t\t\t\t\tthis.vm.folder = {\n\t\t\t\t\t\tpermissions: data.permissions,\n\t\t\t\t\t}\n\t\t\t\t\tthis.vm.loaded = true\n\t\t\t\t\t// in case no file is found we are done\n\t\t\t\t\tthis.vm.ready = true\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (readmeId && data.id === readmeId) {\n\t\t\t\tif (data.mimetype !== 'text/markdown') {\n\t\t\t\t\tconsole.warn('Expected workspace file to be markdown:', data)\n\t\t\t\t}\n\t\t\t\tthis.open(data)\n\t\t\t\treturn\n\t\t\t}\n\t\t\t/*\n\t\t\t * Handle the creation of 'Readme.md'.\n\t\t\t * The PROPFIND after the creation does not include the parent dir.\n\t\t\t */\n\t\t\tif (data.name === 'Readme.md'\n\t\t\t\t&& data.mimetype === 'text/markdown'\n\t\t\t\t&& data.path === fileList.getCurrentDirectory()) {\n\t\t\t\tthis.open(data)\n\t\t\t}\n\t\t})\n\n\t},\n\n\trender(fileList) {\n\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\treturn\n\t\t}\n\n\t\timport('vue').then((module) => {\n\t\t\tconst Vue = module.default\n\t\t\tthis.el.id = 'files-workspace-wrapper'\n\t\t\tVue.prototype.t = window.t\n\t\t\tVue.prototype.n = window.n\n\t\t\tVue.prototype.OCA = window.OCA\n\t\t\tconst View = Vue.extend(RichWorkspace)\n\t\t\tthis.vm = new View({\n\t\t\t\tpropsData: {\n\t\t\t\t\tfile: null,\n\t\t\t\t\tfolder: null,\n\t\t\t\t},\n\t\t\t\tstore,\n\t\t\t}).$mount(this.el)\n\n\t\t\tfileList.$el.on('urlChanged', data => {\n\t\t\t\tthis.vm.file = null\n\t\t\t\tthis.vm.folder = null\n\t\t\t})\n\t\t\tfileList.$el.on('changeDirectory', data => {\n\t\t\t\tthis.vm.file = null\n\t\t\t\tthis.vm.folder = null\n\t\t\t})\n\t\t})\n\t},\n\n\topen(data) {\n\t\tconst previous = this.vm.file\n\t\tconst id = parseInt(data.id)\n\t\tthis.vm.file = {\n\t\t\t...data,\n\t\t\tid,\n\t\t}\n\t\tif (previous?.id !== id) {\n\t\t\t// Editor loads new file. Wait for it to be ready.\n\t\t\tthis.vm.ready = false\n\t\t}\n\t},\n}\n\nexport {\n\toptimalPath,\n\tregisterFileActionFallback,\n\tregisterFileCreate,\n\tFilesWorkspacePlugin,\n\tFILE_ACTION_IDENTIFIER,\n}\n","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nconst openMimetypesMarkdown = [\n\t'text/markdown',\n]\n\nconst openMimetypesPlainText = [\n\t'text/plain',\n\t'application/cmd',\n\t'application/x-empty',\n\t'application/x-msdos-program',\n\t'application/javascript',\n\t'application/json',\n\t'application/x-perl',\n\t'application/x-php',\n\t'application/x-tex',\n\t'application/xml',\n\t'application/yaml',\n\t'text/css',\n\t'text/csv',\n\t'text/html',\n\t'text/org',\n\t'text/x-c',\n\t'text/x-c++src',\n\t'text/x-h',\n\t'text/x-java-source',\n\t'text/x-ldif',\n\t'text/x-python',\n\t'text/x-shellscript',\n]\n\nconst openMimetypes = [...openMimetypesMarkdown, ...openMimetypesPlainText]\n\nexport {\n\topenMimetypes,\n\topenMimetypesMarkdown,\n\topenMimetypesPlainText,\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".menubar[data-v-2bc7f97a]{--background-blur: blur(10px);position:fixed;position:-webkit-sticky;position:sticky;top:0;display:flex;justify-content:flex-end;z-index:10021;background-color:var(--color-main-background-translucent);-webkit-backdrop-filter:var(--background-blur);backdrop-filter:var(--background-blur);max-height:44px;padding-top:3px;padding-bottom:3px}.menubar.autohide[data-v-2bc7f97a]{visibility:hidden;opacity:0;transition:visibility .2s .4s,opacity .2s .4s}.menubar.autohide.show[data-v-2bc7f97a]{visibility:visible;opacity:1}.menubar .menubar-icons[data-v-2bc7f97a]{flex-grow:1;margin-left:calc((100% - 660px)/2)}@media(max-width: 660px){.menubar .menubar-icons[data-v-2bc7f97a]{margin-left:0}}.menubar[data-v-2bc7f97a] .action-item__menu ul{max-height:calc(100vh - 88px);overflow:scroll}.menubar button[data-v-2bc7f97a]{position:relative;width:44px;height:44px;margin:0;background-size:16px;border:0;background-color:transparent;opacity:.5;color:var(--color-main-text);background-position:center center;vertical-align:top}.menubar button[data-v-2bc7f97a]:hover,.menubar button[data-v-2bc7f97a]:focus,.menubar button[data-v-2bc7f97a]:active{background-color:var(--color-background-dark)}.menubar button.is-active[data-v-2bc7f97a]::before{transform:translateX(-50%);border-radius:100%;position:absolute;background:var(--color-primary-element);bottom:3px;height:6px;width:6px;content:\\\"\\\";left:50%}.menubar button.is-active[data-v-2bc7f97a],.menubar button[data-v-2bc7f97a]:hover,.menubar button[data-v-2bc7f97a]:focus{opacity:1}.menubar button.icon-undo[data-v-2bc7f97a],.menubar button.icon-redo[data-v-2bc7f97a]{opacity:.8}.menubar button.icon-undo[data-v-2bc7f97a]:disabled,.menubar button.icon-redo[data-v-2bc7f97a]:disabled{opacity:.4}.menubar .submenu[data-v-2bc7f97a],.menubar .menuitem-emoji[data-v-2bc7f97a]{display:inline-block;width:44px;height:44px;position:relative;vertical-align:top}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/MenuBar.vue\"],\"names\":[],\"mappings\":\"AAiYA,0BACC,6BAAA,CACA,cAAA,CACA,uBAAA,CACA,eAAA,CACA,KAAA,CACA,YAAA,CACA,wBAAA,CACA,aAAA,CACA,yDAAA,CACA,8CAAA,CACA,sCAAA,CACA,eAAA,CACA,eAAA,CACA,kBAAA,CAEA,mCACC,iBAAA,CACA,SAAA,CACA,6CAAA,CACA,wCACC,kBAAA,CACA,SAAA,CAGF,yCACC,WAAA,CACA,kCAAA,CAED,yBACC,yCACC,aAAA,CAAA,CAGF,gDACC,6BAAA,CACA,eAAA,CAIF,iCACC,iBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,oBAAA,CACA,QAAA,CACA,4BAAA,CACA,UAAA,CACA,4BAAA,CACA,iCAAA,CACA,kBAAA,CACA,sHACC,6CAAA,CAGD,mDACC,0BAAA,CACA,kBAAA,CACA,iBAAA,CACA,uCAAA,CACA,UAAA,CACA,UAAA,CACA,SAAA,CACA,UAAA,CACA,QAAA,CAGD,yHAGC,SAAA,CAGD,sFAEC,UAAA,CAEA,wGACC,UAAA,CAKH,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\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n.menubar {\\n\\t--background-blur: blur(10px);\\n\\tposition: fixed;\\n\\tposition: -webkit-sticky;\\n\\tposition: sticky;\\n\\ttop: 0;\\n\\tdisplay: flex;\\n\\tjustify-content: flex-end;\\n\\tz-index: 10021; // above modal-header and menububble so menubar is always on top\\n\\tbackground-color: var(--color-main-background-translucent);\\n\\t-webkit-backdrop-filter: var(--background-blur);\\n\\tbackdrop-filter: var(--background-blur);\\n\\tmax-height: 44px; // important for mobile so that the buttons are always inside the container\\n\\tpadding-top:3px;\\n\\tpadding-bottom: 3px;\\n\\n\\t&.autohide {\\n\\t\\tvisibility: hidden;\\n\\t\\topacity: 0;\\n\\t\\ttransition: visibility 0.2s 0.4s, opacity 0.2s 0.4s;\\n\\t\\t&.show {\\n\\t\\t\\tvisibility: visible;\\n\\t\\t\\topacity: 1;\\n\\t\\t}\\n\\t}\\n\\t.menubar-icons {\\n\\t\\tflex-grow: 1;\\n\\t\\tmargin-left: calc((100% - 660px) / 2);\\n\\t}\\n\\t@media (max-width: 660px) {\\n\\t\\t.menubar-icons {\\n\\t\\t\\tmargin-left: 0;\\n\\t\\t}\\n\\t}\\n\\t&::v-deep .action-item__menu ul {\\n\\t\\tmax-height: calc(100vh - 88px);\\n\\t\\toverflow: scroll;\\n\\t}\\n}\\n\\n.menubar button {\\n\\tposition: relative;\\n\\twidth: 44px;\\n\\theight: 44px;\\n\\tmargin: 0;\\n\\tbackground-size: 16px;\\n\\tborder: 0;\\n\\tbackground-color: transparent;\\n\\topacity: .5;\\n\\tcolor: var(--color-main-text);\\n\\tbackground-position: center center;\\n\\tvertical-align: top;\\n\\t&:hover, &:focus, &:active {\\n\\t\\tbackground-color: var(--color-background-dark);\\n\\t}\\n\\n\\t&.is-active::before {\\n\\t\\ttransform: translateX(-50%);\\n\\t\\tborder-radius: 100%;\\n\\t\\tposition: absolute;\\n\\t\\tbackground: var(--color-primary-element);\\n\\t\\tbottom: 3px;\\n\\t\\theight: 6px;\\n\\t\\twidth: 6px;\\n\\t\\tcontent: '';\\n\\t\\tleft: 50%;\\n\\n\\t}\\n\\t&.is-active,\\n\\t&:hover,\\n\\t&:focus {\\n\\t\\topacity: 1;\\n\\t}\\n\\n\\t&.icon-undo,\\n\\t&.icon-redo {\\n\\t\\topacity: .8;\\n\\n\\t\\t&:disabled {\\n\\t\\t\\topacity: .4;\\n\\t\\t}\\n\\t}\\n}\\n\\n.menubar .submenu, .menubar .menuitem-emoji {\\n\\tdisplay: inline-block;\\n\\twidth: 44px;\\n\\theight: 44px;\\n\\tposition: relative;\\n\\tvertical-align: top;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".menububble[data-v-23aa9303]{display:flex;z-index:10020;background:var(--color-main-background-translucent);box-shadow:0 1px 5px var(--color-box-shadow);border-radius:var(--border-radius-large);overflow:hidden;padding:0;margin-left:10px;height:44px}.menububble__button[data-v-23aa9303]{display:block;flex-grow:1;border:0;padding:.9rem .7rem;margin:0;border-radius:0;cursor:pointer;background-color:var(--color-main-background);border-right:1px solid var(--color-border)}.menububble__button[data-v-23aa9303]:focus,.menububble__button[data-v-23aa9303]:hover{background-color:var(--color-background-hover);border:0;border-right:1px solid var(--color-border) !important}.menububble__button[data-v-23aa9303]:last-child{border:0 !important}.menububble__buttontext[data-v-23aa9303]{padding:.4rem;padding-right:0}.menububble__form[data-v-23aa9303]{display:flex;align-items:center}.menububble__input[data-v-23aa9303]{font:inherit;border:none;background:transparent;min-width:250px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/MenuBubble.vue\"],\"names\":[],\"mappings\":\"AAyKA,6BACC,YAAA,CACA,aAAA,CACA,mDAAA,CACA,4CAAA,CACA,wCAAA,CACA,eAAA,CACA,SAAA,CACA,gBAAA,CACA,WAAA,CAEA,qCACC,aAAA,CACA,WAAA,CACA,QAAA,CACA,mBAAA,CACA,QAAA,CACA,eAAA,CACA,cAAA,CACA,6CAAA,CACA,0CAAA,CAEA,sFAEC,8CAAA,CACA,QAAA,CACA,qDAAA,CAGD,gDACC,mBAAA,CAIF,yCACC,aAAA,CACA,eAAA,CAGD,mCACC,YAAA,CACA,kBAAA,CAGD,oCACC,YAAA,CACA,WAAA,CACA,sBAAA,CACA,eAAA\",\"sourcesContent\":[\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n.menububble {\\n\\tdisplay: flex;\\n\\tz-index: 10020;\\n\\tbackground: var(--color-main-background-translucent);\\n\\tbox-shadow: 0 1px 5px var(--color-box-shadow);\\n\\tborder-radius: var(--border-radius-large);\\n\\toverflow: hidden;\\n\\tpadding: 0;\\n\\tmargin-left: 10px;\\n\\theight: 44px;\\n\\n\\t&__button {\\n\\t\\tdisplay: block;\\n\\t\\tflex-grow: 1;\\n\\t\\tborder: 0;\\n\\t\\tpadding: 0.9rem 0.7rem;\\n\\t\\tmargin: 0;\\n\\t\\tborder-radius: 0;\\n\\t\\tcursor: pointer;\\n\\t\\tbackground-color: var(--color-main-background);\\n\\t\\tborder-right: 1px solid var(--color-border);\\n\\n\\t\\t&:focus,\\n\\t\\t&:hover {\\n\\t\\t\\tbackground-color: var(--color-background-hover);\\n\\t\\t\\tborder: 0;\\n\\t\\t\\tborder-right: 1px solid var(--color-border) !important;\\n\\t\\t}\\n\\n\\t\\t&:last-child {\\n\\t\\t\\tborder: 0 !important;\\n\\t\\t}\\n\\t}\\n\\n\\t&__buttontext {\\n\\t\\tpadding: 0.4rem;\\n\\t\\tpadding-right: 0;\\n\\t}\\n\\n\\t&__form {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t}\\n\\n\\t&__input {\\n\\t\\tfont: inherit;\\n\\t\\tborder: none;\\n\\t\\tbackground: transparent;\\n\\t\\tmin-width: 250px;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"#rich-workspace[data-v-6af3308d]{padding:0 50px;margin-bottom:-24px;text-align:left;max-height:0;transition:max-height .5s cubic-bezier(0, 1, 0, 1);z-index:61;position:relative}#rich-workspace.creatable[data-v-6af3308d]{min-height:90px}#rich-workspace[data-v-6af3308d]:only-child{margin-bottom:0}.empty-workspace[data-v-6af3308d]{padding-top:43px;color:var(--color-text-maxcontrast);height:0}#rich-workspace[data-v-6af3308d] div[contenteditable=false]{width:100%;padding:0px;background-color:var(--color-main-background);opacity:1;border:none}#rich-workspace[data-v-6af3308d] #editor-container{height:100%;position:unset !important;top:auto !important}#rich-workspace[data-v-6af3308d] #editor-wrapper{position:unset !important;overflow:visible}#rich-workspace[data-v-6af3308d] #editor{overflow:visible !important}#rich-workspace[data-v-6af3308d] .content-wrapper{overflow:scroll !important;max-height:calc(40vh - 50px);padding-left:10px;padding-bottom:60px}#rich-workspace[data-v-6af3308d] #editor-wrapper .ProseMirror{padding:0px;margin:0}#rich-workspace[data-v-6af3308d] .menubar{z-index:61;margin-bottom:-10px}#rich-workspace[data-v-6af3308d] .menubar .menubar-icons{margin-left:0}#rich-workspace[data-v-6af3308d] .editor__content{margin:0}#rich-workspace.focus[data-v-6af3308d]{max-height:50vh}#rich-workspace[data-v-6af3308d]:not(.focus){max-height:30vh;position:relative;overflow:hidden}#rich-workspace[data-v-6af3308d]:not(.focus):not(.icon-loading):after{content:\\\"\\\";position:absolute;z-index:1;bottom:0;left:0;pointer-events:none;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));width:100%;height:4em}#rich-workspace.dark[data-v-6af3308d]:not(.focus):not(.icon-loading):after{background-image:linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background))}@media only screen and (max-width: 1024px){#rich-workspace[data-v-6af3308d]:not(.focus){max-height:30vh}}html.ie #rich-workspace[data-v-6af3308d] #editor-container{position:initial}html.ie #rich-workspace[data-v-6af3308d] #editor-wrapper{position:relative !important;top:auto !important}html.ie #rich-workspace[data-v-6af3308d] #editor{display:flex;flex-direction:column;overflow:hidden !important}html.ie #rich-workspace[data-v-6af3308d] .menubar{position:relative;overflow:hidden;flex-shrink:0;height:44px;top:auto}html.ie #rich-workspace[data-v-6af3308d] #editor>div:nth-child(2){min-height:44px;overflow-x:hidden;overflow-y:auto;flex-shrink:1}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/views/RichWorkspace.vue\"],\"names\":[],\"mappings\":\"AAkIA,iCACC,cAAA,CAEA,mBAAA,CACA,eAAA,CACA,YAAA,CACA,kDAAA,CACA,UAAA,CACA,iBAAA,CACA,2CACC,eAAA,CAKF,4CACC,eAAA,CAGD,kCACC,gBAAA,CACA,mCAAA,CACA,QAAA,CAGD,4DACC,UAAA,CACA,WAAA,CACA,6CAAA,CACA,SAAA,CACA,WAAA,CAGD,mDACC,WAAA,CACA,yBAAA,CACA,mBAAA,CAGD,iDACC,yBAAA,CACA,gBAAA,CAGD,yCACC,2BAAA,CAGD,kDACC,0BAAA,CACA,4BAAA,CACA,iBAAA,CACA,mBAAA,CAGD,8DACC,WAAA,CACA,QAAA,CAGD,0CACC,UAAA,CAEA,mBAAA,CAGD,yDACC,aAAA,CAGD,kDACC,QAAA,CAGD,uCACC,eAAA,CAGD,6CACC,eAAA,CACA,iBAAA,CACA,eAAA,CAGD,sEACC,UAAA,CACA,iBAAA,CACA,SAAA,CACA,QAAA,CACA,MAAA,CACA,mBAAA,CACA,iGAAA,CACA,UAAA,CACA,UAAA,CAGD,2EACC,2FAAA,CAGD,2CACC,6CACC,eAAA,CAAA,CAMA,2DACC,gBAAA,CAGD,yDACC,4BAAA,CACA,mBAAA,CAGD,iDACC,YAAA,CACA,qBAAA,CACA,0BAAA,CAGD,kDACC,iBAAA,CACA,eAAA,CACA,aAAA,CACA,WAAA,CACA,QAAA,CAGD,kEACC,eAAA,CACA,iBAAA,CACA,eAAA,CACA,aAAA\",\"sourcesContent\":[\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n#rich-workspace {\\n\\tpadding: 0 50px;\\n\\t/* Slightly reduce vertical space */\\n\\tmargin-bottom: -24px;\\n\\ttext-align: left;\\n\\tmax-height: 0;\\n\\ttransition: max-height 0.5s cubic-bezier(0, 1, 0, 1);\\n\\tz-index: 61;\\n\\tposition: relative;\\n\\t&.creatable {\\n\\t\\tmin-height: 90px;\\n\\t}\\n}\\n\\n/* For subfolders, where there are no Recommendations */\\n#rich-workspace:only-child {\\n\\tmargin-bottom: 0;\\n}\\n\\n.empty-workspace {\\n\\tpadding-top: 43px;\\n\\tcolor: var(--color-text-maxcontrast);\\n\\theight: 0;\\n}\\n\\n#rich-workspace::v-deep div[contenteditable=false] {\\n\\twidth: 100%;\\n\\tpadding: 0px;\\n\\tbackground-color: var(--color-main-background);\\n\\topacity: 1;\\n\\tborder: none;\\n}\\n\\n#rich-workspace::v-deep #editor-container {\\n\\theight: 100%;\\n\\tposition: unset !important;\\n\\ttop: auto !important;\\n}\\n\\n#rich-workspace::v-deep #editor-wrapper {\\n\\tposition: unset !important;\\n\\toverflow: visible;\\n}\\n\\n#rich-workspace::v-deep #editor {\\n\\toverflow: visible !important;\\n}\\n\\n#rich-workspace::v-deep .content-wrapper {\\n\\toverflow: scroll !important;\\n\\tmax-height: calc(40vh - 50px);\\n\\tpadding-left: 10px;\\n\\tpadding-bottom: 60px; /* ensure menububble fits below */\\n}\\n\\n#rich-workspace::v-deep #editor-wrapper .ProseMirror {\\n\\tpadding: 0px;\\n\\tmargin: 0;\\n}\\n\\n#rich-workspace::v-deep .menubar {\\n\\tz-index: 61;\\n\\t/* Slightly reduce vertical space */\\n\\tmargin-bottom: -10px;\\n}\\n\\n#rich-workspace::v-deep .menubar .menubar-icons {\\n\\tmargin-left: 0;\\n}\\n\\n#rich-workspace::v-deep .editor__content {\\n\\tmargin: 0;\\n}\\n\\n#rich-workspace.focus {\\n\\tmax-height: 50vh;\\n}\\n\\n#rich-workspace:not(.focus) {\\n\\tmax-height: 30vh;\\n\\tposition: relative;\\n\\toverflow: hidden;\\n}\\n\\n#rich-workspace:not(.focus):not(.icon-loading):after {\\n\\tcontent: '';\\n\\tposition: absolute;\\n\\tz-index: 1;\\n\\tbottom: 0;\\n\\tleft: 0;\\n\\tpointer-events: none;\\n\\tbackground-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\\n\\twidth: 100%;\\n\\theight: 4em;\\n}\\n\\n#rich-workspace.dark:not(.focus):not(.icon-loading):after {\\n\\tbackground-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background));\\n}\\n\\n@media only screen and (max-width: 1024px) {\\n\\t#rich-workspace:not(.focus) {\\n\\t\\tmax-height: 30vh;\\n\\t}\\n}\\n\\nhtml.ie {\\n\\t#rich-workspace::v-deep {\\n\\t\\t#editor-container {\\n\\t\\t\\tposition: initial;\\n\\t\\t}\\n\\n\\t\\t#editor-wrapper {\\n\\t\\t\\tposition: relative !important;\\n\\t\\t\\ttop: auto !important;\\n\\t\\t}\\n\\n\\t\\t#editor {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tflex-direction: column;\\n\\t\\t\\toverflow: hidden !important;\\n\\t\\t}\\n\\n\\t\\t.menubar {\\n\\t\\t\\tposition: relative;\\n\\t\\t\\toverflow: hidden;\\n\\t\\t\\tflex-shrink: 0;\\n\\t\\t\\theight: 44px;\\n\\t\\t\\ttop: auto;\\n\\t\\t}\\n\\n\\t\\t#editor > div:nth-child(2) {\\n\\t\\t\\tmin-height: 44px;\\n\\t\\t\\toverflow-x: hidden;\\n\\t\\t\\toverflow-y: auto;\\n\\t\\t\\tflex-shrink: 1;\\n\\t\\t}\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"menubar\",class:{ 'show': _vm.isVisible, 'autohide': _vm.autohide }},[_c('input',{ref:\"imageFileInput\",staticClass:\"hidden-visually\",attrs:{\"type\":\"file\",\"accept\":\"image/*\",\"aria-hidden\":\"true\",\"multiple\":true},on:{\"change\":_vm.onImageUploadFilePicked}}),_vm._v(\" \"),(_vm.isRichEditor)?_c('div',{ref:\"menubar\",staticClass:\"menubar-icons\"},[_vm._l((_vm.icons),function(icon){return [(icon.class === 'icon-emoji')?_c('EmojiPicker',{directives:[{name:\"show\",rawName:\"v-show\",value:(icon.priority <= _vm.iconCount),expression:\"icon.priority <= iconCount\"}],key:icon.label,staticClass:\"menuitem-emoji\",on:{\"selectData\":function (emojiObject) { return _vm.addEmoji(icon, emojiObject); }}},[_c('button',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:(_vm.t('text', 'Insert emoji')),expression:\"t('text', 'Insert emoji')\"}],staticClass:\"icon-emoji\",attrs:{\"aria-label\":_vm.t('text', 'Insert emoji'),\"aria-haspopup\":true},on:{\"click\":function($event){return _vm.toggleChildMenu(icon)}}})]):(icon.class === 'icon-image')?_c('Actions',{key:icon.label,ref:\"imageActions\",refInFor:true,staticClass:\"submenu\",attrs:{\"default-icon\":'icon-image'},on:{\"open\":function($event){return _vm.toggleChildMenu(icon)},\"close\":function($event){return _vm.toggleChildMenu(icon)}}},[_c('button',{class:{ 'icon-image': true, 'loading-small': _vm.uploadingImages },attrs:{\"slot\":\"icon\",\"title\":icon.label,\"aria-label\":icon.label,\"aria-haspopup\":true},slot:\"icon\"}),_vm._v(\" \"),_c('ActionButton',{attrs:{\"icon\":\"icon-upload\",\"close-after-click\":true,\"disabled\":_vm.uploadingImages},on:{\"click\":function($event){return _vm.onUploadImage()}}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('text', 'Upload from computer'))+\"\\n\\t\\t\\t\\t\")]),_vm._v(\" \"),(!_vm.isPublic)?_c('ActionButton',{attrs:{\"icon\":\"icon-folder\",\"close-after-click\":true,\"disabled\":_vm.uploadingImages},on:{\"click\":function($event){return _vm.showImagePrompt()}}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('text', 'Insert from Files'))+\"\\n\\t\\t\\t\\t\")]):_vm._e()],1):(icon.class)?_c('button',{directives:[{name:\"show\",rawName:\"v-show\",value:(icon.priority <= _vm.iconCount),expression:\"icon.priority <= iconCount\"},{name:\"tooltip\",rawName:\"v-tooltip\",value:(_vm.getLabelAndKeys(icon)),expression:\"getLabelAndKeys(icon)\"}],key:icon.label,class:_vm.getIconClasses(icon),attrs:{\"disabled\":_vm.disabled(icon)},on:{\"click\":function($event){return _vm.clickIcon(icon)}}}):[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(icon.priority <= _vm.iconCount),expression:\"icon.priority <= iconCount\"},{name:\"click-outside\",rawName:\"v-click-outside\",value:(function () { return _vm.hideChildMenu(icon); }),expression:\"() => hideChildMenu(icon)\"}],key:icon.label,staticClass:\"submenu\"},[_c('button',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:(_vm.getLabelAndKeys(icon)),expression:\"getLabelAndKeys(icon)\"}],class:_vm.childIconClasses(icon.children ),on:{\"click\":function($event){$event.preventDefault();return _vm.toggleChildMenu(icon)}}}),_vm._v(\" \"),_c('div',{staticClass:\"popovermenu menu-center\",class:{open: _vm.isChildMenuVisible(icon)}},[_c('PopoverMenu',{attrs:{\"menu\":_vm.childPopoverMenu(icon.children, icon)}})],1)])]]}),_vm._v(\" \"),_c('Actions',{on:{\"open\":function($event){return _vm.toggleChildMenu({ label: 'Remaining Actions' })},\"close\":function($event){return _vm.toggleChildMenu({ label: 'Remaining Actions' })}}},[_vm._l((_vm.icons),function(icon){return [(icon.class && _vm.isHiddenInMenu(icon) && !_vm.hasSubmenu(icon))?_c('ActionButton',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:(_vm.getKeys(icon)),expression:\"getKeys(icon)\"}],key:icon.class,attrs:{\"icon\":icon.class,\"close-after-click\":true},on:{\"click\":function($event){return _vm.clickIcon(icon)}}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(icon.label)+\"\\n\\t\\t\\t\\t\")]):_vm._e()]})],2)],2):_vm._e(),_vm._v(\" \"),_vm._t(\"default\",function(){return [_vm._v(\"\\n\\t\\tLeft side\\n\\t\")]})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport default [\n\t{\n\t\tlabel: t('text', 'Undo'),\n\t\tkeyChar: 'z',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-undo',\n\t\taction: (command) => command.undo(),\n\t\tpriority: 5,\n\t},\n\t{\n\t\tlabel: t('text', 'Redo'),\n\t\tkeyChar: 'y',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-redo',\n\t\taction: (command) => command.redo(),\n\t\tpriority: 11,\n\t},\n\t{\n\t\tlabel: t('text', 'Bold'),\n\t\tkeyChar: 'b',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-bold',\n\t\tisActive: 'strong',\n\t\taction: (command) => {\n\t\t\treturn command.toggleBold()\n\t\t},\n\t\tpriority: 6,\n\t},\n\t{\n\t\tlabel: t('text', 'Italic'),\n\t\tkeyChar: 'i',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-italic',\n\t\tisActive: 'em',\n\t\taction: (command) => {\n\t\t\treturn command.toggleItalic()\n\t\t},\n\t\tpriority: 7,\n\t},\n\t{\n\t\tlabel: t('text', 'Underline'),\n\t\tkeyChar: 'u',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-underline',\n\t\tisActive: 'underline',\n\t\taction: (command) => {\n\t\t\treturn command.toggleUnderline()\n\t\t},\n\t\tpriority: 14,\n\t},\n\t{\n\t\tlabel: t('text', 'Strikethrough'),\n\t\tkeyChar: 'd',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-strike',\n\t\tisActive: 'strike',\n\t\taction: (command) => {\n\t\t\treturn command.toggleStrike()\n\t\t},\n\t\tpriority: 15,\n\t},\n\t{\n\t\tlabel: t('text', 'Headings'),\n\t\tkeyChar: '1…6',\n\t\tkeyModifiers: ['ctrl', 'shift'],\n\t\tvisible: false,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 1'),\n\t\t\t\tclass: 'icon-h1',\n\t\t\t\tisActive: ['heading', { level: 1 }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleHeading({ level: 1 })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 2'),\n\t\t\t\tclass: 'icon-h2',\n\t\t\t\tisActive: ['heading', { level: 2 }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleHeading({ level: 2 })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 3'),\n\t\t\t\tclass: 'icon-h3',\n\t\t\t\tisActive: ['heading', { level: 3 }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleHeading({ level: 3 })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 4'),\n\t\t\t\tclass: 'icon-h4',\n\t\t\t\tisActive: ['heading', { level: 4 }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleHeading({ level: 4 })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 5'),\n\t\t\t\tclass: 'icon-h5',\n\t\t\t\tisActive: ['heading', { level: 5 }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleHeading({ level: 5 })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 6'),\n\t\t\t\tclass: 'icon-h6',\n\t\t\t\tisActive: ['heading', { level: 6 }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleHeading({ level: 6 })\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tpriority: 1,\n\t},\n\t{\n\t\tlabel: t('text', 'Unordered list'),\n\t\tkeyChar: '8',\n\t\tkeyModifiers: ['ctrl', 'shift'],\n\t\tclass: 'icon-ul',\n\t\tisActive: 'bulletList',\n\t\taction: (command) => {\n\t\t\treturn command.toggleBulletList()\n\t\t},\n\t\tpriority: 8,\n\t},\n\t{\n\t\tlabel: t('text', 'Ordered list'),\n\t\tkeyChar: '9',\n\t\tkeyModifiers: ['ctrl', 'shift'],\n\t\tclass: 'icon-ol',\n\t\tisActive: 'orderedList',\n\t\taction: (command) => {\n\t\t\treturn command.toggleOrderedList()\n\t\t},\n\t\tpriority: 9,\n\t},\n\t{\n\t\tlabel: t('text', 'ToDo list'),\n\t\tclass: 'icon-tasklist',\n\t\tisActive: 'taskList',\n\t\taction: (command) => command.toggleTaskList(),\n\t\tpriority: 10,\n\t},\n\t{\n\t\tlabel: t('text', 'Blockquote'),\n\t\tkeyChar: '>',\n\t\tkeyModifiers: ['ctrl'],\n\t\tclass: 'icon-quote',\n\t\tisActive: 'blockquote',\n\t\taction: (command) => {\n\t\t\treturn command.toggleBlockquote()\n\t\t},\n\t\tpriority: 12,\n\t},\n\t{\n\t\tlabel: t('text', 'Callouts'),\n\t\tvisible: false,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Info'),\n\t\t\t\tclass: 'icon-info',\n\t\t\t\tisActive: ['callout', { type: 'info' }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleCallout({ type: 'info' })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Success'),\n\t\t\t\tclass: 'icon-success',\n\t\t\t\tisActive: ['callout', { type: 'success' }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleCallout({ type: 'success' })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Warning'),\n\t\t\t\tclass: 'icon-warn',\n\t\t\t\tisActive: ['callout', { type: 'warn' }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleCallout({ type: 'warn' })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Danger'),\n\t\t\t\tclass: 'icon-error',\n\t\t\t\tisActive: ['callout', { type: 'error' }],\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.toggleCallout({ type: 'error' })\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tpriority: 3,\n\t},\n\t{\n\t\tlabel: t('text', 'Code block'),\n\t\tclass: 'icon-code',\n\t\tisActive: 'codeBlock',\n\t\taction: (command) => {\n\t\t\treturn command.toggleCodeBlock()\n\t\t},\n\t\tpriority: 13,\n\t},\n\t{\n\t\tlabel: t('text', 'Table'),\n\t\tclass: 'icon-table',\n\t\tisActive: 'table',\n\t\taction: (command) => {\n\t\t\treturn command.insertTable()\n\t\t},\n\t\tpriority: 16,\n\t},\n\t{\n\t\tlabel: t('text', 'Emoji picker'),\n\t\tclass: 'icon-emoji',\n\t\taction: (command, emojiObject) => {\n\t\t\treturn command.emoji(emojiObject)\n\t\t},\n\t\tpriority: 4,\n\t},\n\t{\n\t\tlabel: t('text', 'Insert image'),\n\t\tclass: 'icon-image',\n\t\tpriority: 2,\n\t},\n\t{\n\t\tlabel: t('text', 'Formatting help'),\n\t\tclass: 'icon-help',\n\t\tclick: (view) => view.$emit('show-help'),\n\t\tpriority: 17,\n\t},\n]\n","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<div class=\"menubar\" :class=\"{ 'show': isVisible, 'autohide': autohide }\">\n\t\t<input ref=\"imageFileInput\"\n\t\t\ttype=\"file\"\n\t\t\taccept=\"image/*\"\n\t\t\taria-hidden=\"true\"\n\t\t\tclass=\"hidden-visually\"\n\t\t\t:multiple=\"true\"\n\t\t\t@change=\"onImageUploadFilePicked\">\n\t\t<div v-if=\"isRichEditor\" ref=\"menubar\" class=\"menubar-icons\">\n\t\t\t<template v-for=\"(icon) in icons\">\n\t\t\t\t<EmojiPicker v-if=\"icon.class === 'icon-emoji'\"\n\t\t\t\t\tv-show=\"icon.priority <= iconCount\"\n\t\t\t\t\t:key=\"icon.label\"\n\t\t\t\t\tclass=\"menuitem-emoji\"\n\t\t\t\t\t@selectData=\"emojiObject => addEmoji(icon, emojiObject)\">\n\t\t\t\t\t<button v-tooltip=\"t('text', 'Insert emoji')\"\n\t\t\t\t\t\tclass=\"icon-emoji\"\n\t\t\t\t\t\t:aria-label=\"t('text', 'Insert emoji')\"\n\t\t\t\t\t\t:aria-haspopup=\"true\"\n\t\t\t\t\t\t@click=\"toggleChildMenu(icon)\" />\n\t\t\t\t</EmojiPicker>\n\t\t\t\t<Actions v-else-if=\"icon.class === 'icon-image'\"\n\t\t\t\t\t:key=\"icon.label\"\n\t\t\t\t\tref=\"imageActions\"\n\t\t\t\t\tclass=\"submenu\"\n\t\t\t\t\t:default-icon=\"'icon-image'\"\n\t\t\t\t\t@open=\"toggleChildMenu(icon)\"\n\t\t\t\t\t@close=\"toggleChildMenu(icon)\">\n\t\t\t\t\t<button slot=\"icon\"\n\t\t\t\t\t\t:class=\"{ 'icon-image': true, 'loading-small': uploadingImages }\"\n\t\t\t\t\t\t:title=\"icon.label\"\n\t\t\t\t\t\t:aria-label=\"icon.label\"\n\t\t\t\t\t\t:aria-haspopup=\"true\" />\n\t\t\t\t\t<ActionButton icon=\"icon-upload\"\n\t\t\t\t\t\t:close-after-click=\"true\"\n\t\t\t\t\t\t:disabled=\"uploadingImages\"\n\t\t\t\t\t\t@click=\"onUploadImage()\">\n\t\t\t\t\t\t{{ t('text', 'Upload from computer') }}\n\t\t\t\t\t</ActionButton>\n\t\t\t\t\t<ActionButton v-if=\"!isPublic\"\n\t\t\t\t\t\ticon=\"icon-folder\"\n\t\t\t\t\t\t:close-after-click=\"true\"\n\t\t\t\t\t\t:disabled=\"uploadingImages\"\n\t\t\t\t\t\t@click=\"showImagePrompt()\">\n\t\t\t\t\t\t{{ t('text', 'Insert from Files') }}\n\t\t\t\t\t</ActionButton>\n\t\t\t\t</Actions>\n\t\t\t\t<button v-else-if=\"icon.class\"\n\t\t\t\t\tv-show=\"icon.priority <= iconCount\"\n\t\t\t\t\t:key=\"icon.label\"\n\t\t\t\t\tv-tooltip=\"getLabelAndKeys(icon)\"\n\t\t\t\t\t:class=\"getIconClasses(icon)\"\n\t\t\t\t\t:disabled=\"disabled(icon)\"\n\t\t\t\t\t@click=\"clickIcon(icon)\" />\n\t\t\t\t<template v-else>\n\t\t\t\t\t<div v-show=\"icon.priority <= iconCount\"\n\t\t\t\t\t\t:key=\"icon.label\"\n\t\t\t\t\t\tv-click-outside=\"() => hideChildMenu(icon)\"\n\t\t\t\t\t\tclass=\"submenu\">\n\t\t\t\t\t\t<button v-tooltip=\"getLabelAndKeys(icon)\"\n\t\t\t\t\t\t\t:class=\"childIconClasses(icon.children, )\"\n\t\t\t\t\t\t\t@click.prevent=\"toggleChildMenu(icon)\" />\n\t\t\t\t\t\t<div :class=\"{open: isChildMenuVisible(icon)}\" class=\"popovermenu menu-center\">\n\t\t\t\t\t\t\t<PopoverMenu :menu=\"childPopoverMenu(icon.children, icon)\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</template>\n\t\t\t<Actions @open=\"toggleChildMenu({ label: 'Remaining Actions' })\"\n\t\t\t\t@close=\"toggleChildMenu({ label: 'Remaining Actions' })\">\n\t\t\t\t<template v-for=\"(icon) in icons\">\n\t\t\t\t\t<ActionButton v-if=\"icon.class && isHiddenInMenu(icon) && !hasSubmenu(icon)\"\n\t\t\t\t\t\t:key=\"icon.class\"\n\t\t\t\t\t\tv-tooltip=\"getKeys(icon)\"\n\t\t\t\t\t\t:icon=\"icon.class\"\n\t\t\t\t\t\t:close-after-click=\"true\"\n\t\t\t\t\t\t@click=\"clickIcon(icon)\">\n\t\t\t\t\t\t{{ icon.label }}\n\t\t\t\t\t</ActionButton>\n\t\t\t\t\t<!--<template v-else-if=\"!icon.class && isHiddenInMenu(icon)\">\n\t\t\t\t\t\t<ActionButton v-for=\"childIcon in icon.children\"\n\t\t\t\t\t\t\t:key=\"childIcon.class\"\n\t\t\t\t\t\t\t:icon=\"childIcon.class\"\n\t\t\t\t\t\t\t@click=\"clickIcon(childIcon)\">\n\t\t\t\t\t\t\tv-tooltip=\"getKeys(childIcon)\"\n\t\t\t\t\t\t\t{{ childIcon.label }}\n\t\t\t\t\t\t</ActionButton>\n\t\t\t\t\t</template>-->\n\t\t\t\t</template>\n\t\t\t</Actions>\n\t\t</div>\n\t\t<slot>\n\t\t\tLeft side\n\t\t</slot>\n\t</div>\n</template>\n\n<script>\nimport Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'\nimport menuBarIcons from './../mixins/menubar'\nimport isMobile from './../mixins/isMobile'\n\nimport Actions from '@nextcloud/vue/dist/Components/Actions'\nimport ActionButton from '@nextcloud/vue/dist/Components/ActionButton'\nimport PopoverMenu from '@nextcloud/vue/dist/Components/PopoverMenu'\nimport EmojiPicker from '@nextcloud/vue/dist/Components/EmojiPicker'\nimport ClickOutside from 'vue-click-outside'\nimport { getCurrentUser } from '@nextcloud/auth'\n\nexport default {\n\tname: 'MenuBar',\n\tcomponents: {\n\t\tActionButton,\n\t\tPopoverMenu,\n\t\tActions,\n\t\tEmojiPicker,\n\t},\n\tdirectives: {\n\t\tTooltip,\n\t\tClickOutside,\n\t},\n\tmixins: [\n\t\tisMobile,\n\t],\n\tprops: {\n\t\teditor: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tsyncService: {\n\t\t\ttype: Object,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\t\tisRichEditor: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\tautohide: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tisPublic: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tfilePath: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t\tfileId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0,\n\t\t},\n\t\tuploadingImages: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata: () => {\n\t\treturn {\n\t\t\twindowWidth: 0,\n\t\t\twindowHeight: 0,\n\t\t\tforceRecompute: 0,\n\t\t\tsubmenuVisibility: {},\n\t\t\tlastImagePath: null,\n\t\t\ticons: [...menuBarIcons],\n\t\t}\n\t},\n\tcomputed: {\n\t\tisHiddenInMenu() {\n\t\t\treturn (icon) => icon.priority > this.iconCount\n\t\t},\n\t\tgetIconClasses() {\n\t\t\treturn (icon) => {\n\t\t\t\tconst classes = {}\n\t\t\t\tclasses[icon.class] = true\n\t\t\t\tclasses['is-active'] = this.isActive(icon)\n\t\t\t\treturn classes\n\t\t\t}\n\t\t},\n\t\tisActive() {\n\t\t\treturn ({ isActive }) => {\n\t\t\t\tif (!isActive) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tconst args = Array.isArray(isActive) ? isActive : [isActive]\n\t\t\t\treturn this.editor.isActive(...args)\n\t\t\t}\n\t\t},\n\t\tisVisible() {\n\t\t\treturn this.editor.isFocused\n\t\t\t\t|| Object.values(this.submenuVisibility).find((v) => v)\n\t\t},\n\t\tdisabled() {\n\t\t\treturn (menuItem) => {\n\t\t\t\treturn menuItem.action && !menuItem.action(this.editor.can())\n\t\t\t}\n\t\t},\n\t\tisChildMenuVisible() {\n\t\t\treturn (icon) => {\n\t\t\t\treturn Object.prototype.hasOwnProperty.call(this.submenuVisibility, icon.label) ? this.submenuVisibility[icon.label] : false\n\t\t\t}\n\t\t},\n\t\tchildPopoverMenu() {\n\t\t\treturn (icons, parent) => {\n\t\t\t\treturn icons.map(icon => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t// text: this.getLabelAndKeys(icons[index]),\n\t\t\t\t\t\ttext: icon.label,\n\t\t\t\t\t\ticon: icon.class,\n\t\t\t\t\t\tactive: this.isActive(icon),\n\t\t\t\t\t\taction: () => {\n\t\t\t\t\t\t\tthis.clickIcon(icon)\n\t\t\t\t\t\t\tthis.hideChildMenu(parent)\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t\tchildIconClasses() {\n\t\t\treturn (icons) => {\n\t\t\t\tconst icon = this.childIcon(icons)\n\t\t\t\treturn this.getIconClasses(icon)\n\t\t\t}\n\t\t},\n\t\tchildIcon() {\n\t\t\treturn (icons) => icons.find(icon => this.isActive(icon)) || icons[0]\n\t\t},\n\t\ticonCount() {\n\t\t\tthis.forceRecompute // eslint-disable-line\n\t\t\tthis.windowWidth // eslint-disable-line\n\t\t\tconst menuBarWidth = this.$refs.menubar && this.$refs.menubar.clientWidth > 200 ? this.$refs.menubar.clientWidth : 200\n\t\t\treturn Math.max((Math.floor(menuBarWidth / 44) - 1), 0)\n\t\t},\n\t\timagePath() {\n\t\t\treturn this.lastImagePath\n\t\t\t\t|| this.filePath.split('/').slice(0, -1).join('/')\n\t\t},\n\t},\n\tmounted() {\n\t\twindow.addEventListener('resize', this.getWindowWidth)\n\t\tthis.checkInterval = setInterval(() => {\n\t\t\tconst isWidthAvailable = (this.$refs.menubar && this.$refs.menubar.clientWidth > 0)\n\t\t\tif (this.isRichEditor && isWidthAvailable) {\n\t\t\t\tthis.redrawMenuBar()\n\t\t\t}\n\t\t\tif (!this.isRichEditor || isWidthAvailable) {\n\t\t\t\tclearInterval(this.checkInterval)\n\t\t\t}\n\t\t}, 100)\n\t\tthis.$emit('update:loaded', true)\n\t},\n\tbeforeDestroy() {\n\t\twindow.removeEventListener('resize', this.getWindowWidth)\n\t},\n\tmethods: {\n\t\tredrawMenuBar() {\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.getWindowWidth()\n\t\t\t\tthis.forceRecompute++\n\t\t\t})\n\t\t},\n\t\trefocus() {\n\t\t\tthis.editor.chain().focus().run()\n\t\t},\n\t\tclickIcon(icon) {\n\t\t\tif (icon.click) {\n\t\t\t\treturn icon.click(this)\n\t\t\t}\n\t\t\t// Some actions run themselves.\n\t\t\t// others still need to have .run() called upon them.\n\t\t\tconst action = icon.action(this.editor.chain().focus())\n\t\t\taction && action.run()\n\t\t},\n\t\tgetWindowWidth(event) {\n\t\t\tthis.windowWidth = document.documentElement.clientWidth\n\t\t},\n\t\tgetWindowHeight(event) {\n\t\t\tthis.windowHeight = document.documentElement.clientHeight\n\t\t},\n\t\thideChildMenu({ label }) {\n\t\t\tthis.$set(this.submenuVisibility, label, false)\n\t\t},\n\t\thasSubmenu(icon) {\n\t\t\treturn icon.class === 'icon-emoji'\n\t\t\t\t|| icon.children\n\t\t},\n\t\ttoggleChildMenu({ label }) {\n\t\t\tconst lastValue = Object.prototype.hasOwnProperty.call(this.submenuVisibility, label) ? this.submenuVisibility[label] : false\n\t\t\tthis.$set(this.submenuVisibility, label, !lastValue)\n\t\t\tif (lastValue) {\n\t\t\t\tthis.refocus()\n\t\t\t}\n\t\t},\n\t\tonUploadImage() {\n\t\t\tthis.$refs.imageFileInput.click()\n\t\t},\n\t\tonImageUploadFilePicked(event) {\n\t\t\tthis.$emit('image-upload', event.target.files)\n\t\t\t// Clear input to ensure that the change event will be emitted if\n\t\t\t// the same file is picked again.\n\t\t\tevent.target.value = ''\n\t\t},\n\t\tshowImagePrompt() {\n\t\t\tconst currentUser = getCurrentUser()\n\t\t\tif (!currentUser) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tOC.dialogs.filepicker(t('text', 'Insert an image'), (filePath) => {\n\t\t\t\tthis.$emit('image-insert', filePath)\n\t\t\t}, false, [], true, undefined, this.imagePath)\n\t\t},\n\t\toptimalPathTo(targetFile) {\n\t\t\tconst absolutePath = targetFile.split('/')\n\t\t\tconst relativePath = this.relativePathTo(targetFile).split('/')\n\t\t\treturn relativePath.length < absolutePath.length\n\t\t\t\t? relativePath.join('/')\n\t\t\t\t: targetFile\n\t\t},\n\t\trelativePathTo(targetFile) {\n\t\t\tconst current = this.filePath.split('/')\n\t\t\tconst target = targetFile.split('/')\n\t\t\tcurrent.pop() // ignore filename\n\t\t\twhile (current[0] === target[0]) {\n\t\t\t\tcurrent.shift()\n\t\t\t\ttarget.shift()\n\t\t\t}\n\t\t\treturn current.fill('..').concat(target).join('/')\n\t\t},\n\t\taddEmoji(icon, emojiObject) {\n\t\t\treturn icon.action(this.editor.chain(), { id: emojiObject.id, native: emojiObject.native })\n\t\t\t\t.focus()\n\t\t\t\t.run()\n\t\t},\n\t\tkeysString(keyChar, modifiers = []) {\n\t\t\tconst translations = {\n\t\t\t\tctrl: t('text', 'Ctrl'),\n\t\t\t\talt: t('text', 'Alt'),\n\t\t\t\tshift: t('text', 'Shift'),\n\t\t\t}\n\t\t\treturn Object.entries(translations)\n\t\t\t\t.filter(([k, v]) => modifiers.includes(k))\n\t\t\t\t.map(([k, v]) => v)\n\t\t\t\t.concat(keyChar.toUpperCase())\n\t\t\t\t.join('+')\n\t\t},\n\t\tgetKeys(icon) {\n\t\t\treturn (icon.keyChar && !this.isMobile)\n\t\t\t\t? `(${this.keysString(icon.keyChar, icon.keyModifiers)})`\n\t\t\t\t: ''\n\t\t},\n\t\tgetLabelAndKeys(icon) {\n\t\t\treturn [icon.label, this.getKeys(icon)].join(' ')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.menubar {\n\t\t--background-blur: blur(10px);\n\t\tposition: fixed;\n\t\tposition: -webkit-sticky;\n\t\tposition: sticky;\n\t\ttop: 0;\n\t\tdisplay: flex;\n\t\tjustify-content: flex-end;\n\t\tz-index: 10021; // above modal-header and menububble so menubar is always on top\n\t\tbackground-color: var(--color-main-background-translucent);\n\t\t-webkit-backdrop-filter: var(--background-blur);\n\t\tbackdrop-filter: var(--background-blur);\n\t\tmax-height: 44px; // important for mobile so that the buttons are always inside the container\n\t\tpadding-top:3px;\n\t\tpadding-bottom: 3px;\n\n\t\t&.autohide {\n\t\t\tvisibility: hidden;\n\t\t\topacity: 0;\n\t\t\ttransition: visibility 0.2s 0.4s, opacity 0.2s 0.4s;\n\t\t\t&.show {\n\t\t\t\tvisibility: visible;\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t\t.menubar-icons {\n\t\t\tflex-grow: 1;\n\t\t\tmargin-left: calc((100% - 660px) / 2);\n\t\t}\n\t\t@media (max-width: 660px) {\n\t\t\t.menubar-icons {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t}\n\t\t&::v-deep .action-item__menu ul {\n\t\t\tmax-height: calc(100vh - 88px);\n\t\t\toverflow: scroll;\n\t\t}\n\t}\n\n\t.menubar button {\n\t\tposition: relative;\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tmargin: 0;\n\t\tbackground-size: 16px;\n\t\tborder: 0;\n\t\tbackground-color: transparent;\n\t\topacity: .5;\n\t\tcolor: var(--color-main-text);\n\t\tbackground-position: center center;\n\t\tvertical-align: top;\n\t\t&:hover, &:focus, &:active {\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\n\t\t&.is-active::before {\n\t\t\ttransform: translateX(-50%);\n\t\t\tborder-radius: 100%;\n\t\t\tposition: absolute;\n\t\t\tbackground: var(--color-primary-element);\n\t\t\tbottom: 3px;\n\t\t\theight: 6px;\n\t\t\twidth: 6px;\n\t\t\tcontent: '';\n\t\t\tleft: 50%;\n\n\t\t}\n\t\t&.is-active,\n\t\t&:hover,\n\t\t&:focus {\n\t\t\topacity: 1;\n\t\t}\n\n\t\t&.icon-undo,\n\t\t&.icon-redo {\n\t\t\topacity: .8;\n\n\t\t\t&:disabled {\n\t\t\t\topacity: .4;\n\t\t\t}\n\t\t}\n\t}\n\n\t.menubar .submenu, .menubar .menuitem-emoji {\n\t\tdisplay: inline-block;\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tposition: relative;\n\t\tvertical-align: top;\n\t}\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBar.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBar.vue?vue&type=style&index=0&id=2bc7f97a&scoped=true&lang=scss&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBar.vue?vue&type=style&index=0&id=2bc7f97a&scoped=true&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./MenuBar.vue?vue&type=template&id=2bc7f97a&scoped=true&\"\nimport script from \"./MenuBar.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuBar.vue?vue&type=script&lang=js&\"\nimport style0 from \"./MenuBar.vue?vue&type=style&index=0&id=2bc7f97a&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"2bc7f97a\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('BubbleMenu',{staticClass:\"menububble\",attrs:{\"editor\":_vm.editor,\"tippy-options\":{ onHide: _vm.hideLinkMenu, duration: 200, placement: 'bottom' }}},[(_vm.linkMenuIsActive)?_c('form',{staticClass:\"menububble__form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.setLinkUrl()}}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.linkUrl),expression:\"linkUrl\"}],ref:\"linkInput\",staticClass:\"menububble__input\",attrs:{\"type\":\"text\",\"placeholder\":\"https://\"},domProps:{\"value\":(_vm.linkUrl)},on:{\"keydown\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"esc\",27,$event.key,[\"Esc\",\"Escape\"])){ return null; }return _vm.hideLinkMenu.apply(null, arguments)},\"input\":function($event){if($event.target.composing){ return; }_vm.linkUrl=$event.target.value}}}),_vm._v(\" \"),_c('button',{staticClass:\"menububble__button icon-confirm\",attrs:{\"type\":\"button\",\"tabindex\":\"0\"},on:{\"click\":function($event){return _vm.setLinkUrl()}}})]):[_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': _vm.isActive('link') },on:{\"click\":function($event){return _vm.showLinkMenu()}}},[_c('span',{staticClass:\"icon-link\"}),_vm._v(\" \"),_c('span',{staticClass:\"menububble__buttontext\"},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.isActive('link') ? _vm.t('text', 'Update Link') : _vm.t('text', 'Add Link'))+\"\\n\\t\\t\\t\")])]),_vm._v(\" \"),(!_vm.isUsingDirectEditing)?_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': _vm.isActive('link') },on:{\"click\":function($event){return _vm.selectFile()}}},[_c('span',{staticClass:\"icon-file\"}),_vm._v(\" \"),_c('span',{staticClass:\"menububble__buttontext\"},[_vm._v(_vm._s(_vm.t('text', 'Link file')))])]):_vm._e(),_vm._v(\" \"),(_vm.isActive('link'))?_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': _vm.isActive('link') },on:{\"click\":function($event){return _vm.removeLinkUrl()}}},[_c('span',{staticClass:\"icon-delete\"}),_vm._v(\" \"),_c('span',{staticClass:\"menububble__buttontext\"},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('text', 'Remove Link'))+\"\\n\\t\\t\\t\")])]):_vm._e()]],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<BubbleMenu :editor=\"editor\"\n\t\t:tippy-options=\"{ onHide: hideLinkMenu, duration: 200, placement: 'bottom' }\"\n\t\tclass=\"menububble\">\n\t\t<form v-if=\"linkMenuIsActive\" class=\"menububble__form\" @submit.prevent=\"setLinkUrl()\">\n\t\t\t<input ref=\"linkInput\"\n\t\t\t\tv-model=\"linkUrl\"\n\t\t\t\tclass=\"menububble__input\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tplaceholder=\"https://\"\n\t\t\t\t@keydown.esc=\"hideLinkMenu\">\n\t\t\t<button class=\"menububble__button icon-confirm\"\n\t\t\t\ttype=\"button\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t@click=\"setLinkUrl()\" />\n\t\t</form>\n\n\t\t<template v-else>\n\t\t\t<button class=\"menububble__button\"\n\t\t\t\t:class=\"{ 'is-active': isActive('link') }\"\n\t\t\t\t@click=\"showLinkMenu()\">\n\t\t\t\t<span class=\"icon-link\" />\n\t\t\t\t<span class=\"menububble__buttontext\">\n\t\t\t\t\t{{ isActive('link') ? t('text', 'Update Link') : t('text', 'Add Link') }}\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t\t<button v-if=\"!isUsingDirectEditing\"\n\t\t\t\tclass=\"menububble__button\"\n\t\t\t\t:class=\"{ 'is-active': isActive('link') }\"\n\t\t\t\t@click=\"selectFile()\">\n\t\t\t\t<span class=\"icon-file\" />\n\t\t\t\t<span class=\"menububble__buttontext\">{{ t('text', 'Link file') }}</span>\n\t\t\t</button>\n\t\t\t<button v-if=\"isActive('link')\"\n\t\t\t\tclass=\"menububble__button\"\n\t\t\t\t:class=\"{ 'is-active': isActive('link') }\"\n\t\t\t\t@click=\"removeLinkUrl()\">\n\t\t\t\t<span class=\"icon-delete\" />\n\t\t\t\t<span class=\"menububble__buttontext\">\n\t\t\t\t\t{{ t('text', 'Remove Link') }}\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t</template>\n\t</BubbleMenu>\n</template>\n\n<script>\nimport { BubbleMenu } from '@tiptap/vue-2'\nimport { getMarkAttributes } from '@tiptap/core'\nimport Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { optimalPath } from './../helpers/files'\nimport { loadState } from '@nextcloud/initial-state'\n\nexport default {\n\tname: 'MenuBubble',\n\tcomponents: {\n\t\tBubbleMenu,\n\t},\n\tdirectives: {\n\t\ttooltip: Tooltip,\n\t},\n\tprops: {\n\t\teditor: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\t// used to calculate the position based on the scrollOffset\n\t\tcontentWrapper: {\n\t\t\ttype: HTMLDivElement,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\t\tfilePath: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\tdata: () => {\n\t\treturn {\n\t\t\tlinkUrl: null,\n\t\t\tlinkMenuIsActive: false,\n\t\t\tisUsingDirectEditing: loadState('text', 'directEditingToken', null) !== null,\n\t\t}\n\t},\n\tmethods: {\n\t\tshowLinkMenu() {\n\t\t\tconst attrs = getMarkAttributes(this.editor.state, 'link')\n\t\t\tthis.linkUrl = attrs.href\n\t\t\tthis.linkMenuIsActive = true\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$refs.linkInput.focus()\n\t\t\t})\n\t\t},\n\t\thideLinkMenu() {\n\t\t\tthis.linkUrl = null\n\t\t\tthis.linkMenuIsActive = false\n\t\t},\n\t\tselectFile() {\n\t\t\tconst currentUser = getCurrentUser()\n\t\t\tif (!currentUser) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst startPath = this.filePath.split('/').slice(0, -1).join('/')\n\t\t\tOC.dialogs.filepicker(t('text', 'Select file to link to'), (file) => {\n\t\t\t\tconst client = OC.Files.getClient()\n\t\t\t\tclient.getFileInfo(file).then((_status, fileInfo) => {\n\t\t\t\t\tconst path = optimalPath(this.filePath, `${fileInfo.path}/${fileInfo.name}`)\n\t\t\t\t\tconst encodedPath = path.split('/').map(encodeURIComponent).join('/')\n\t\t\t\t\tconst href = `${encodedPath}?fileId=${fileInfo.id}`\n\t\t\t\t\tthis.editor.chain().setLink({ href }).focus().run()\n\t\t\t\t\tthis.hideLinkMenu()\n\t\t\t\t})\n\t\t\t}, false, [], true, undefined, startPath)\n\t\t},\n\t\tsetLinkUrl() {\n\t\t\tlet url = this.linkUrl\n\t\t\t// Heuristics for determining if we need a https:// prefix.\n\t\t\tconst noPrefixes = [\n\t\t\t\t/^[a-zA-Z]+:/, // url with protocol (\"mailTo:email@domain.tld\")\n\t\t\t\t/^\\//, // absolute path\n\t\t\t\t/\\?fileId=/, // relative link with fileId\n\t\t\t\t/^\\.\\.?\\//, // relative link starting with ./ or ../\n\t\t\t\t/^[^.]*[/$]/, // no dots before first '/' - not a domain name\n\t\t\t\t/^#/, // url fragment\n\t\t\t]\n\t\t\tif (url && !noPrefixes.find(regex => url.match(regex))) {\n\t\t\t\turl = 'https://' + url\n\t\t\t}\n\n\t\t\t// Avoid issues when parsing urls later on in markdown that might be entered in an invalid format (e.g. \"mailto: example@example.com\")\n\t\t\tconst href = url.replaceAll(' ', '%20')\n\t\t\tthis.editor.chain().setLink({ href }).focus().run()\n\t\t\tthis.hideLinkMenu()\n\t\t},\n\t\tremoveLinkUrl() {\n\t\t\tthis.editor.chain().unsetLink().focus().run()\n\t\t},\n\t\tisActive(selector, args = {}) {\n\t\t\treturn this.editor.isActive(selector, args)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.menububble {\n\t\tdisplay: flex;\n\t\tz-index: 10020;\n\t\tbackground: var(--color-main-background-translucent);\n\t\tbox-shadow: 0 1px 5px var(--color-box-shadow);\n\t\tborder-radius: var(--border-radius-large);\n\t\toverflow: hidden;\n\t\tpadding: 0;\n\t\tmargin-left: 10px;\n\t\theight: 44px;\n\n\t\t&__button {\n\t\t\tdisplay: block;\n\t\t\tflex-grow: 1;\n\t\t\tborder: 0;\n\t\t\tpadding: 0.9rem 0.7rem;\n\t\t\tmargin: 0;\n\t\t\tborder-radius: 0;\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: var(--color-main-background);\n\t\t\tborder-right: 1px solid var(--color-border);\n\n\t\t\t&:focus,\n\t\t\t&:hover {\n\t\t\t\tbackground-color: var(--color-background-hover);\n\t\t\t\tborder: 0;\n\t\t\t\tborder-right: 1px solid var(--color-border) !important;\n\t\t\t}\n\n\t\t\t&:last-child {\n\t\t\t\tborder: 0 !important;\n\t\t\t}\n\t\t}\n\n\t\t&__buttontext {\n\t\t\tpadding: 0.4rem;\n\t\t\tpadding-right: 0;\n\t\t}\n\n\t\t&__form {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t&__input {\n\t\t\tfont: inherit;\n\t\t\tborder: none;\n\t\t\tbackground: transparent;\n\t\t\tmin-width: 250px;\n\t\t}\n\t}\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=style&index=0&id=23aa9303&scoped=true&lang=scss&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=style&index=0&id=23aa9303&scoped=true&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./MenuBubble.vue?vue&type=template&id=23aa9303&scoped=true&\"\nimport script from \"./MenuBubble.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuBubble.vue?vue&type=script&lang=js&\"\nimport style0 from \"./MenuBubble.vue?vue&type=style&index=0&id=23aa9303&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"23aa9303\",\n null\n \n)\n\nexport default component.exports"],"names":["options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_vm","this","_h","$createElement","_c","_self","class","loaded","ready","focus","darkTheme","canCreate","attrs","staticClass","on","createNew","_v","_s","t","_e","directives","name","rawName","value","expression","key","file","path","id","filepath","shareToken","mimetype","autofocus","$event","unfocus","reset","FILE_ACTION_IDENTIFIER","optimalPath","from","to","current","split","target","pop","shift","relativePath","fill","concat","absolutePath","length","join","registerFileCreate","newFileMenuPlugin","attach","menu","fileList","addMenuEntry","displayName","templateName","iconClass","fileType","actionHandler","createFile","then","status","data","fileInfoModel","OCA","Files","FileInfoModel","Viewer","fileActions","triggerAction","OC","Plugins","register","registerFileActionFallback","sharingToken","document","getElementById","dir","ViewerRoot","createElement","body","appendChild","registerAction","mime","PERMISSION_UPDATE","PERMISSION_READ","imagePath","filename","window","FileList","findFile","Promise","all","imports","getCurrentDirectory","Vue","default","prototype","n","Editor","render","h","self","props","fileId","active","mimeType","close","$destroy","$mount","i","openMimetypes","setDefault","FilesWorkspacePlugin","el","vm","registerHeader","bind","priority","PROPERTY_WORKSPACE_FILE","Client","NS_NEXTCLOUD","oldGetWebdavProperties","_getWebdavProperties","apply","arguments","readmeId","filesClient","addFileInfoParser","response","propStat","properties","endsWith","folder","permissions","console","warn","open","module","View","extend","RichWorkspace","propsData","store","$el","previous","parseInt","openMimetypesMarkdown","openMimetypesPlainText","___CSS_LOADER_EXPORT___","push","label","keyChar","keyModifiers","action","command","undo","redo","isActive","toggleBold","toggleItalic","toggleUnderline","toggleStrike","visible","children","level","toggleHeading","toggleBulletList","toggleOrderedList","toggleTaskList","toggleBlockquote","type","toggleCallout","toggleCodeBlock","insertTable","emojiObject","emoji","click","view","$emit","isVisible","autohide","ref","onImageUploadFilePicked","_l","icon","iconCount","addEmoji","toggleChildMenu","refInFor","uploadingImages","slot","onUploadImage","isPublic","showImagePrompt","getLabelAndKeys","getIconClasses","disabled","clickIcon","hideChildMenu","childIconClasses","preventDefault","isChildMenuVisible","childPopoverMenu","isHiddenInMenu","hasSubmenu","getKeys","_t","editor","onHide","hideLinkMenu","duration","placement","setLinkUrl","domProps","indexOf","_k","keyCode","composing","linkUrl","showLinkMenu","isUsingDirectEditing","selectFile","removeLinkUrl"],"sourceRoot":""} \ No newline at end of file
diff --git a/src/mixins/menubar.js b/src/mixins/menubar.js
index 936099499..2d802fafc 100644
--- a/src/mixins/menubar.js
+++ b/src/mixins/menubar.js
@@ -27,7 +27,7 @@ export default [
keyModifiers: ['ctrl'],
class: 'icon-undo',
action: (command) => command.undo(),
- priority: 3,
+ priority: 5,
},
{
label: t('text', 'Redo'),
@@ -46,7 +46,7 @@ export default [
action: (command) => {
return command.toggleBold()
},
- priority: 4,
+ priority: 6,
},
{
label: t('text', 'Italic'),
@@ -215,7 +215,7 @@ export default [
},
},
],
- priority: 5,
+ priority: 3,
},
{
label: t('text', 'Code block'),
@@ -241,7 +241,7 @@ export default [
action: (command, emojiObject) => {
return command.emoji(emojiObject)
},
- priority: 6,
+ priority: 4,
},
{
label: t('text', 'Insert image'),