Add context menu settings
Adding a field to manage context menu with default value as in TinyMCE documentation: https://www.tiny.cloud/docs/tinymce/latest/contextmenu/#options + information about how to get the browser spellchecker
This commit is contained in:
parent
3c02c86498
commit
1a5c6ef563
1 changed files with 10 additions and 0 deletions
|
@ -13,6 +13,7 @@ class pluginTinymce extends Plugin
|
||||||
$this->dbFields = array(
|
$this->dbFields = array(
|
||||||
'toolbar1' => 'formatselect bold italic forecolor backcolor removeformat | bullist numlist table | blockquote alignleft aligncenter alignright | link unlink pagebreak image code',
|
'toolbar1' => 'formatselect bold italic forecolor backcolor removeformat | bullist numlist table | blockquote alignleft aligncenter alignright | link unlink pagebreak image code',
|
||||||
'toolbar2' => '',
|
'toolbar2' => '',
|
||||||
|
'contextmenu' => 'link linkchecker image editimage table spellchecker configurepermanentpen',
|
||||||
'plugins' => 'code autolink image link pagebreak advlist lists textpattern table',
|
'plugins' => 'code autolink image link pagebreak advlist lists textpattern table',
|
||||||
'codesampleLanguages' => 'HTML/XML markup|JavaScript javascript|CSS css|PHP php|Ruby ruby|Python python|Java java|C c|C# sharp|C++ cpp'
|
'codesampleLanguages' => 'HTML/XML markup|JavaScript javascript|CSS css|PHP php|Ruby ruby|Python python|Java java|C c|C# sharp|C++ cpp'
|
||||||
);
|
);
|
||||||
|
@ -36,6 +37,13 @@ class pluginTinymce extends Plugin
|
||||||
$html .= '<input name="toolbar2" id="jstoolbar2" type="text" dir="auto" value="' . $this->getValue('toolbar2') . '">';
|
$html .= '<input name="toolbar2" id="jstoolbar2" type="text" dir="auto" value="' . $this->getValue('toolbar2') . '">';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
|
|
||||||
|
$html .= '<div>';
|
||||||
|
$html .= '<label>' . $L->get('context-menu') . '</label>';
|
||||||
|
$html .= '<input name="contextmenu" id="jscontextmenu" type="text" dir="auto" value="' . $this->getValue('contextmenu') . '">';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
$html .= '<div class="alert alert-light" role="alert">' . $L->get('context-menu-info') . '</div>';
|
||||||
|
|
||||||
$html .= '<div>';
|
$html .= '<div>';
|
||||||
$html .= '<label>' . $L->get('Plugins') . '</label>';
|
$html .= '<label>' . $L->get('Plugins') . '</label>';
|
||||||
$html .= '<input name="plugins" id="jsplugins" type="text" dir="auto" value="' . $this->getValue('plugins') . '">';
|
$html .= '<input name="plugins" id="jsplugins" type="text" dir="auto" value="' . $this->getValue('plugins') . '">';
|
||||||
|
@ -74,6 +82,7 @@ class pluginTinymce extends Plugin
|
||||||
|
|
||||||
$toolbar1 = $this->getValue('toolbar1');
|
$toolbar1 = $this->getValue('toolbar1');
|
||||||
$toolbar2 = $this->getValue('toolbar2');
|
$toolbar2 = $this->getValue('toolbar2');
|
||||||
|
$contextmenu = $this->getValue('contextmenu');
|
||||||
$content_css = $this->htmlPath() . 'css/tinymce_content.css';
|
$content_css = $this->htmlPath() . 'css/tinymce_content.css';
|
||||||
$plugins = $this->getValue('plugins');
|
$plugins = $this->getValue('plugins');
|
||||||
$version = $this->version();
|
$version = $this->version();
|
||||||
|
@ -143,6 +152,7 @@ class pluginTinymce extends Plugin
|
||||||
plugins: ["$plugins"],
|
plugins: ["$plugins"],
|
||||||
toolbar1: "$toolbar1",
|
toolbar1: "$toolbar1",
|
||||||
toolbar2: "$toolbar2",
|
toolbar2: "$toolbar2",
|
||||||
|
contextmenu: "$contextmenu",
|
||||||
language: "$lang",
|
language: "$lang",
|
||||||
content_css: "$content_css",
|
content_css: "$content_css",
|
||||||
codesample_languages: [$codesampleConfig],
|
codesample_languages: [$codesampleConfig],
|
||||||
|
|
Loading…
Reference in a new issue