Skip to content

Commit

Permalink
#14: add quickbar support
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas.ludwig committed Jun 17, 2024
1 parent 46bb335 commit b031884
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion amd/build/configuration.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/configuration.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion amd/src/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

import {addMenubarItem, addToolbarButtons} from 'editor_tiny/utils';
import {addMenubarItem, addQuickbarsToolbarItem, addToolbarButtons} from 'editor_tiny/utils';
import {forecolor, backcolor} from './common';

const configureToolbar = (toolbar) => {
Expand All @@ -35,9 +35,16 @@ const configureMenu = (menu) => {
return menu;
};

const configureQuickbarToolbar = (quickbar) => {
quickbar = addQuickbarsToolbarItem(quickbar, '|', forecolor);
quickbar = addQuickbarsToolbarItem(quickbar, '|', backcolor);
return quickbar;
};

export const configure = (instanceConfig) => {
return {
toolbar: configureToolbar(instanceConfig.toolbar),
menu: configureMenu(instanceConfig.menu),
quickbars_selection_toolbar: configureQuickbarToolbar(instanceConfig.quickbars_selection_toolbar),
};
};

0 comments on commit b031884

Please sign in to comment.