Skip to content
Snippets Groups Projects
Commit db86653a authored by Elmar Ludwig's avatar Elmar Ludwig Committed by David Siegfried
Browse files

initial set of editor toolbar presets, re #1798

Merge request studip/studip!1178
parent a7d168b5
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,43 @@ function replaceTextarea(textarea) {
if ($textarea.attr('data-editor')) {
const parsed = parseOptions($textarea.attr('data-editor'));
if (parsed.toolbar === 'small') {
options.toolbar = {
removeItems: [
'undo',
'redo',
'findAndReplace',
'strikethrough',
'horizontalLine',
'insertBlockQuote',
'splitBlockQuote',
'removeBlockQuote',
]
};
} else if (parsed.toolbar === 'minimal') {
options.toolbar = {
items: [
'bold',
'italic',
'underline',
'subscript',
'superscript',
'|',
'removeFormat',
'|',
'bulletedList',
'numberedList',
'|',
'fontColor',
'fontBackgroundColor',
'|',
'link',
'math',
'specialCharacters',
]
};
}
if (parsed.removePlugins) {
options.removePlugins = parsed.removePlugins.split(",")
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment