1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Started upgrade to TinyMCE6, Untested

- Merged in latest TinyMCE code.
- Gone through tinymce upgrade guide, made required config changes.
- Altered license references.
This commit is contained in:
Dan Brown
2022-07-17 18:33:03 +01:00
parent d9e9c1735a
commit c519f707e8
85 changed files with 1228 additions and 2233 deletions

View File

@ -62,14 +62,12 @@ function file_picker_callback(callback, value, meta) {
/**
* @param {WysiwygConfigOptions} options
* @return {string}
* @return {string[]}
*/
function gatherPlugins(options) {
const plugins = [
"image",
"imagetools",
"table",
"paste",
"link",
"autolink",
"fullscreen",
@ -98,7 +96,7 @@ function gatherPlugins(options) {
plugins.push('drawio');
}
return plugins.filter(plugin => Boolean(plugin)).join(' ');
return plugins.filter(plugin => Boolean(plugin));
}
/**
@ -215,7 +213,7 @@ export function build(options) {
window.baseUrl('/dist/styles.css'),
],
branding: false,
skin: options.darkMode ? 'oxide-dark' : 'oxide',
skin: options.darkMode ? 'tinymce-5-dark' : 'tinymce-5',
body_class: 'page-content',
browser_spellcheck: true,
relative_urls: false,
@ -240,7 +238,6 @@ export function build(options) {
"+doc-root[code-block]"
].join(','),
plugins: gatherPlugins(options),
imagetools_toolbar: 'imageoptions',
contextmenu: false,
toolbar: getPrimaryToolbar(options),
content_style: getContentStyle(options),
@ -249,6 +246,8 @@ export function build(options) {
media_alt_source: false,
media_poster: false,
formats,
table_style_by_css: false,
table_use_colgroups: false,
file_picker_types: 'file image',
file_picker_callback,
paste_preprocess(plugin, args) {