diff --git a/resources/js/wysiwyg/config.js b/resources/js/wysiwyg/config.js index 1594646d8..11090ce4b 100644 --- a/resources/js/wysiwyg/config.js +++ b/resources/js/wysiwyg/config.js @@ -7,6 +7,7 @@ import {getPlugin as getCodeeditorPlugin} from "./plugin-codeeditor"; import {getPlugin as getDrawioPlugin} from "./plugin-drawio"; import {getPlugin as getCustomhrPlugin} from "./plugins-customhr"; import {getPlugin as getImagemanagerPlugin} from "./plugins-imagemanager"; +import {getPlugin as getAboutPlugin} from "./plugins-about"; const style_formats = [ {title: "Large Header", format: "h2", preview: 'color: blue;'}, @@ -74,7 +75,7 @@ function buildToolbar(options) { 'bullist numlist outdent indent', textDirPlugins, 'table imagemanager-insert link hr codeeditor drawio media', - 'removeformat code ${textDirPlugins} fullscreen' + 'removeformat code about fullscreen' ]; return toolbar.filter(row => Boolean(row)).join(' | '); @@ -100,12 +101,14 @@ function gatherPlugins(options) { "codeeditor", "media", "imagemanager", + "about", options.textDirection === 'rtl' ? 'directionality' : '', ]; window.tinymce.PluginManager.add('codeeditor', getCodeeditorPlugin(options)); window.tinymce.PluginManager.add('customhr', getCustomhrPlugin(options)); window.tinymce.PluginManager.add('imagemanager', getImagemanagerPlugin(options)); + window.tinymce.PluginManager.add('about', getAboutPlugin(options)); if (options.drawioUrl) { window.tinymce.PluginManager.add('drawio', getDrawioPlugin(options)); diff --git a/resources/js/wysiwyg/plugins-about.js b/resources/js/wysiwyg/plugins-about.js new file mode 100644 index 000000000..1585de72d --- /dev/null +++ b/resources/js/wysiwyg/plugins-about.js @@ -0,0 +1,29 @@ +/** + * @param {Editor} editor + * @param {String} url + */ +function register(editor, url) { + + const aboutDialog = { + title: 'About the WYSIWYG Editor', + url: window.baseUrl('/help/wysiwyg'), + }; + + editor.ui.registry.addButton('about', { + icon: 'help', + tooltip: 'About the editor', + onAction() { + tinymce.activeEditor.windowManager.openUrl(aboutDialog); + } + }); + +} + + +/** + * @param {WysiwygConfigOptions} options + * @return {register} + */ +export function getPlugin(options) { + return register; +} \ No newline at end of file diff --git a/resources/lang/en/editor.php b/resources/lang/en/editor.php index 83e8f4313..ed40133e4 100644 --- a/resources/lang/en/editor.php +++ b/resources/lang/en/editor.php @@ -130,4 +130,17 @@ return [ 'open_link' => 'Open link in...', 'open_link_current' => 'Current window', 'open_link_new' => 'New window', + + // About view + 'editor_license' => 'Editor License & Copyright', + 'editor_tiny_license' => 'This editor is built using :tinyLink which is provided under an LGPLv2.1 license.', + 'editor_tiny_license_link' => 'The copyright and license details of TinyMCE can be found here.', + 'save_continue' => 'Save Page & Continue', + 'callouts_cycle' => '(Keep pressing to toggle through types)', + 'shortcuts' => 'Shortcuts', + 'shortcut' => 'Shortcut', + 'shortcuts_intro' => 'The following shortcuts are available in the editor:', + 'windows_linux' => '(Windows/Linux)', + 'mac' => '(Mac)', + 'description' => 'Description', ]; diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php index acf588f4a..d44c45e62 100644 --- a/resources/views/errors/503.blade.php +++ b/resources/views/errors/503.blade.php @@ -1,22 +1,6 @@ - - -
-
+ {!! trans('editor.editor_tiny_license', ['tinyLink' => 'TinyMCE']) !!}
+
+ {{ trans('editor.editor_tiny_license_link') }}
+
{{ trans('editor.shortcuts_intro') }}
+{{ trans('editor.shortcut') }} {{ trans('editor.windows_linux') }} | +{{ trans('editor.shortcut') }} {{ trans('editor.mac') }} | +{{ trans('editor.description') }} | +
---|---|---|
Ctrl +S |
+ Cmd +S |
+ {{ trans('entities.pages_edit_save_draft') }} | +
Ctrl +Enter |
+ Cmd +Enter |
+ {{ trans('editor.save_continue') }} | +
Ctrl +B |
+ Cmd +B |
+ {{ trans('editor.bold') }} | +
Ctrl +I |
+ Cmd +I |
+ {{ trans('editor.italic') }} | +
+ Ctrl +1 + Ctrl +2 + Ctrl +3 + Ctrl +4
+ |
+
+ Cmd +1 + Cmd +2 + Cmd +3 + Cmd +4
+ |
+
+ {{ trans('editor.header_large') }} + {{ trans('editor.header_medium') }} + {{ trans('editor.header_small') }} + {{ trans('editor.header_tiny') }} + |
+
+ Ctrl +5 + Ctrl +D
+ |
+
+ Cmd +5 + Cmd +D
+ |
+ {{ trans('editor.paragraph') }} | +
+ Ctrl +6 + Ctrl +Q
+ |
+
+ Cmd +6 + Cmd +Q
+ |
+ {{ trans('editor.blockquote') }} | +
+ Ctrl +7 + Ctrl +E
+ |
+
+ Cmd +7 + Cmd +E
+ |
+ {{ trans('editor.insert_code_block') }} | +
+ Ctrl +Shift +8 + Ctrl +Shift +E
+ |
+
+ Cmd +Shift +8 + Cmd +Shift +E
+ |
+ {{ trans('editor.inline_code') }} | +
Ctrl +9 |
+ Cmd +9 |
+
+ {{ trans('editor.callouts') }} + {{ trans('editor.callouts_cycle') }} + |
+