mirror of https://github.com/xwiki-labs/cryptpad
Page mode by default in rich text
This commit is contained in:
parent
ca9f874afb
commit
41c0704ad8
|
@ -1179,6 +1179,7 @@
|
|||
&.fa-download { order: 2; }
|
||||
&.fa-upload { order: 3; }
|
||||
&.fa-print { order: 4; }
|
||||
&.fa-arrows-h { order: 5; }
|
||||
&.fa-cog { order: 5; }
|
||||
&.fa-info-circle { order: 6; }
|
||||
&.fa-help { order: 7; }
|
||||
|
|
|
@ -1651,7 +1651,6 @@ define([
|
|||
if (data.hiddenReadOnly) { button.addClass('cp-hidden-if-readonly'); }
|
||||
if (data.name) {
|
||||
button.addClass('cp-toolbar-icon-'+data.name);
|
||||
button.click(common.prepareFeedback(data.name));
|
||||
}
|
||||
if (data.text) {
|
||||
$('<span>', {'class': 'cp-toolbar-drawer-element'}).text(data.text)
|
||||
|
|
|
@ -38,6 +38,9 @@ define([
|
|||
drive: {
|
||||
hideDuplicate: true
|
||||
},
|
||||
pad: {
|
||||
width: true
|
||||
},
|
||||
general: {
|
||||
allowUserFeedback: true
|
||||
}
|
||||
|
|
|
@ -731,10 +731,30 @@ define([
|
|||
$iframe.find('body').attr('spellcheck', true);
|
||||
}
|
||||
});
|
||||
|
||||
Messages.pad_useFullWidth = "Use full width"; // XXX
|
||||
Messages.pad_usePageWidth = "Use page mode"; // XXX
|
||||
framework._.sfCommon.getAttribute(['pad', 'width'], function (err, data) {
|
||||
if (data) {
|
||||
var active = data || typeof(data) === "undefined";
|
||||
if (active) {
|
||||
$iframe.find('html').addClass('cke_body_width');
|
||||
}
|
||||
var $width = framework._.sfCommon.createButton('', true, {
|
||||
icon: 'fa-arrows-h',
|
||||
text: active ? Messages.pad_useFullWidth : Messages.pad_usePageWidth,
|
||||
name: "pad-width",
|
||||
},function () {
|
||||
if (active) {
|
||||
$iframe.find('html').removeClass('cke_body_width');
|
||||
} else {
|
||||
$iframe.find('html').addClass('cke_body_width');
|
||||
}
|
||||
active = !active;
|
||||
var key = active ? Messages.pad_useFullWidth : Messages.pad_usePageWidth;
|
||||
$width.find('.cp-toolbar-drawer-element').text(key);
|
||||
framework._.sfCommon.setAttribute(['pad', 'width'], active);
|
||||
});
|
||||
framework._.toolbar.$drawer.append($width);
|
||||
});
|
||||
|
||||
framework._.sfCommon.isPadStored(function (err, val) {
|
||||
|
|
Loading…
Reference in New Issue