Skip to content

Commit

Permalink
Merge 816a09d into 682c7d8
Browse files Browse the repository at this point in the history
  • Loading branch information
lqez committed Nov 19, 2018
2 parents 682c7d8 + 816a09d commit 87f3978
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/js/base/module/Buttons.js
Expand Up @@ -97,10 +97,13 @@ export default class Buttons {
callback: ($button) => {
const $recentColor = $button.find('.note-recent-color');
if (backColor) {
$recentColor.css('background-color', '#FFFF00');
$button.attr('data-backColor', '#FFFF00');
$recentColor.css('background-color', this.options.colorButton.backColor);
$button.attr('data-backColor', this.options.colorButton.backColor);
}
if (!foreColor) {
if (foreColor) {
$recentColor.css('color', this.options.colorButton.foreColor);
$button.attr('data-foreColor', this.options.colorButton.foreColor);
} else {
$recentColor.css('color', 'transparent');
}
}
Expand All @@ -127,7 +130,7 @@ export default class Buttons {
' <button type="button" class="note-color-select btn" data-event="openPalette" data-value="backColorPicker">',
this.lang.color.cpSelect,
' </button>',
' <input type="color" id="backColorPicker" class="note-btn note-color-select-btn" value="#FFFF00" data-event="backColorPalette">',
' <input type="color" id="backColorPicker" class="note-btn note-color-select-btn" value="' + this.options.colorButton.backColor + '" data-event="backColorPalette">',
' </div>',
' <div class="note-holder-custom" id="backColorPalette" data-event="backColor"/>',
'</div>'
Expand All @@ -145,7 +148,7 @@ export default class Buttons {
' <button type="button" class="note-color-select btn" data-event="openPalette" data-value="foreColorPicker">',
this.lang.color.cpSelect,
' </button>',
' <input type="color" id="foreColorPicker" class="note-btn note-color-select-btn" value="#000000" data-event="foreColorPalette">',
' <input type="color" id="foreColorPicker" class="note-btn note-color-select-btn" value="' + this.options.colorButton.foreColor + '" data-event="foreColorPalette">',
' <div class="note-holder-custom" id="foreColorPalette" data-event="foreColor"/>',
'</div>'
].join('') : ''),
Expand Down
5 changes: 5 additions & 0 deletions src/js/bs3/settings.js
Expand Up @@ -155,6 +155,11 @@ $.summernote = $.extend($.summernote, {
['Rosewood', 'Cinnamon', 'Olive', 'Parsley', 'Tiber', 'Midnight Blue', 'Valentino', 'Loulou']
],

colorButton: {
foreColor: '#000000',
backColor: '#FFFF00'
},

lineHeights: ['1.0', '1.2', '1.4', '1.5', '1.6', '1.8', '2.0', '3.0'],

tableClassName: 'table table-bordered',
Expand Down
5 changes: 5 additions & 0 deletions src/js/bs4/settings.js
Expand Up @@ -158,6 +158,11 @@ $.summernote = $.extend($.summernote, {
['Rosewood', 'Cinnamon', 'Olive', 'Parsley', 'Tiber', 'Midnight Blue', 'Valentino', 'Loulou']
],

colorButton: {
foreColor: '#000000',
backColor: '#FFFF00'
},

lineHeights: ['1.0', '1.2', '1.4', '1.5', '1.6', '1.8', '2.0', '3.0'],

tableClassName: 'table table-bordered',
Expand Down
5 changes: 5 additions & 0 deletions src/js/lite/settings.js
Expand Up @@ -152,6 +152,11 @@ $.summernote = $.extend($.summernote, {
['Rosewood', 'Cinnamon', 'Olive', 'Parsley', 'Tiber', 'Midnight Blue', 'Valentino', 'Loulou']
],

colorButton: {
foreColor: '#000000',
backColor: '#FFFF00'
},

lineHeights: ['1.0', '1.2', '1.4', '1.5', '1.6', '1.8', '2.0', '3.0'],

tableClassName: 'table table-bordered',
Expand Down

0 comments on commit 87f3978

Please sign in to comment.