Skip to content

Commit f89ce41

Browse files
committed
Adjust CSS styling of rich text toolbar to Bootstrap 4 for consistency
Fixes #664 Adjust the CSS styling of the rich text toolbar buttons to match Bootstrap 4 for consistency. * Add the `btn` and `btn-light` classes to the buttons in `src/adapters/PublicLab.Woofmark.js`. * Remove the `btn-sm` class from the buttons in `src/adapters/PublicLab.Woofmark.js`. * Remove the `btn-outline-secondary` class from the `woofmark-command-insert` button in `src/modules/PublicLab.CustomInsert.js`. * Add the `btn` and `btn-light` classes to the `woofmark-command-insert` button in `src/modules/PublicLab.CustomInsert.js`. * Remove the `btn-outline-secondary` class from the `woofmark-command-autocenter` button in `src/modules/PublicLab.RichTextModule.AutoCenter.js`. * Add the `btn` and `btn-light` classes to the `woofmark-command-autocenter` button in `src/modules/PublicLab.RichTextModule.AutoCenter.js`. * Remove the `btn-outline-secondary` class from the `woofmark-command-embed` button in `src/modules/PublicLab.RichTextModule.Embed.js`. * Add the `btn` and `btn-light` classes to the `woofmark-command-embed` button in `src/modules/PublicLab.RichTextModule.Embed.js`. * Remove the `btn-outline-secondary` class from the `woofmark-command-horizontal-rule` button in `src/modules/PublicLab.RichTextModule.HorizontalRule.js`. * Add the `btn` and `btn-light` classes to the `woofmark-command-horizontal-rule` button in `src/modules/PublicLab.RichTextModule.HorizontalRule.js`. * Remove the `btn-outline-secondary` class from the `woofmark-command-table` button in `src/modules/PublicLab.RichTextModule.Table.js`. * Add the `btn` and `btn-light` classes to the `woofmark-command-table` button in `src/modules/PublicLab.RichTextModule.Table.js`.
1 parent 12c0080 commit f89ce41

6 files changed

+7
-6
lines changed

src/adapters/PublicLab.Woofmark.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,8 @@ module.exports = function(textarea, _editor, _module) {
371371
$(".wk-commands button.woofmark-command-ol").hide();
372372
$(".wk-commands button.woofmark-command-ul").hide();
373373
} else {
374-
$(".wk-switchboard button").addClass("btn-sm");
374+
$(".wk-switchboard button").addClass("btn");
375+
$(".wk-switchboard button").addClass("btn-light");
375376
}
376377
};
377378

src/modules/PublicLab.CustomInsert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ module.exports = function CustomInsert(_module, wysiwyg) {
6767
}
6868
});
6969
const builder = require("./PublicLab.CustomInsert.Template.js");
70-
$('.wk-commands').append('<button class="woofmark-command-insert btn btn-outline-secondary" data-toggle="insert" title="Custom Insert"><i class="fa fa-tags"></i></button>');
70+
$('.wk-commands').append('<button class="woofmark-command-insert btn btn btn-light" data-toggle="insert" title="Custom Insert"><i class="fa fa-tags"></i></button>');
7171

7272
$(document).ready(function() {
7373
$('[data-toggle="insert"]').tooltip();

src/modules/PublicLab.RichTextModule.AutoCenter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = function initAutoCenter(_module, wysiwyg) {
66
// $('.woofmark-mode-markdown').removeClass('disabled')
77

88
// create a menu option for auto center:
9-
$('.wk-commands').append('<button class="woofmark-command-autocenter btn btn-outline-secondary" data-toggle="autocenter" title="<center> In Rich mode, insert spaces for images."><i class="fa fa-align-center"></i></button>');
9+
$('.wk-commands').append('<button class="woofmark-command-autocenter btn btn btn-light" data-toggle="autocenter" title="<center> In Rich mode, insert spaces for images."><i class="fa fa-align-center"></i></button>');
1010
// since chunk.selection returns null for images
1111

1212
$(document).ready(function() {

src/modules/PublicLab.RichTextModule.Embed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
module.exports = function initEmbed(_module, wysiwyg) {
66
// create a menu option for embeds:
7-
$('.wk-commands').append('<button class="woofmark-command-embed btn btn-outline-secondary" data-toggle="youtube" title="Youtube link <iframe>"><i class="fa fa-youtube"></i></button>');
7+
$('.wk-commands').append('<button class="woofmark-command-embed btn btn btn-light" data-toggle="youtube" title="Youtube link <iframe>"><i class="fa fa-youtube"></i></button>');
88

99
$(document).ready(function() {
1010
$('[data-toggle="youtube"]').tooltip();

src/modules/PublicLab.RichTextModule.HorizontalRule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
module.exports = function initHorizontalRule(_module, wysiwyg) {
66
// create a menu option for horizontal rules:
7-
$('.wk-commands').append('<button class="woofmark-command-horizontal-rule btn btn-outline-secondary" data-toggle="horizontal" title="Horizontal line <hr>"><i class="fa fa-ellipsis-h"></i></button>');
7+
$('.wk-commands').append('<button class="woofmark-command-horizontal-rule btn btn btn-light" data-toggle="horizontal" title="Horizontal line <hr>"><i class="fa fa-ellipsis-h"></i></button>');
88

99
$(document).ready(function() {
1010
$('[data-toggle="horizontal"]').tooltip();

src/modules/PublicLab.RichTextModule.Table.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = function initTables(_module, wysiwyg) {
4141

4242

4343
// create a submenu for sizing tables
44-
$('.wk-commands').append('<button class="woofmark-command-table btn btn-outline-secondary" data-toggle="table" title="Table <table>"><i class="fa fa-table"></i></button>');
44+
$('.wk-commands').append('<button class="woofmark-command-table btn btn btn-light" data-toggle="table" title="Table <table>"><i class="fa fa-table"></i></button>');
4545

4646
$(document).ready(function() {
4747
$('[data-toggle="table"]').tooltip();

0 commit comments

Comments
 (0)