diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 87168ca7c..0361332d5 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -560,6 +560,24 @@ define([ }); }; + common.listAllTags = function (cb) { + var all = []; + var proxy = getProxy(); + var files = common.find(proxy, ['drive', 'filesData']); + + if (typeof(files) !== 'object') { return cb('invalid_drive'); } + Object.keys(files).forEach(function (k) { + var file = files[k]; + if (!Array.isArray(file.tags)) { return; } + file.tags.forEach(function (tag) { + if (all.indexOf(tag) === -1) { + all.push(tag); + } + }); + }); + cb(void 0, all); + }; + common.getLSAttribute = function (attr) { return localStorage[attr]; }; diff --git a/www/pad/app-pad.less b/www/pad/app-pad.less index f187d5683..85b1605b1 100644 --- a/www/pad/app-pad.less +++ b/www/pad/app-pad.less @@ -20,7 +20,7 @@ height: 28px; padding: 2px 0; } - #cke_1_top .cryptpad-toolbar { + #cke_1_top .cp-toolbar { padding: 0; display: block; } @@ -28,3 +28,16 @@ min-width: 60%; } } + +.cke_wysiwyg_frame { + min-width: 60%; +} + +@media print { + #cke_1_top { + display:none !important; + } + &.cp-app-pad .cp-toolbar-userlist-drawer { + display:none; + } +} diff --git a/www/pad/inner.js b/www/pad/inner.js index 8cd2b9beb..9be24e78a 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -369,6 +369,8 @@ define([ if (!readOnly && !initializing) { userDocStateDom.setAttribute("contenteditable", "true"); // lol wtf + } else if (readOnly) { + userDocStateDom.removeAttribute("contenteditable"); } var patch = (DD).diff(inner, userDocStateDom); (DD).apply(inner, patch);