Support changing the global default for richeditor buttons (#2937)
Added support for changing the global default for richeditor buttons. Addresses: #2677, #2384, #2078, #1743 and rainlab/pages-plugin#188
This commit is contained in:
parent
879afdeea9
commit
dfcf324d00
|
|
@ -85,6 +85,7 @@ class RichEditor extends FormWidgetBase
|
|||
$this->vars['value'] = $this->getLoadValue();
|
||||
$this->vars['toolbarButtons'] = $this->evalToolbarButtons();
|
||||
|
||||
$this->vars['globalToolbarButtons'] = EditorSetting::getConfigured('html_toolbar_buttons');
|
||||
$this->vars['allowEmptyTags'] = EditorSetting::getConfigured('html_allow_empty_tags');
|
||||
$this->vars['allowTags'] = EditorSetting::getConfigured('html_allow_tags');
|
||||
$this->vars['noWrapTags'] = EditorSetting::getConfigured('html_no_wrap_tags');
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
<?php if ($fullPage): ?>data-fullpage="true"<?php endif ?>
|
||||
<?php if ($readOnly): ?>data-read-only="true"<?php endif ?>
|
||||
<?php if ($editorLang): ?>data-editor-lang="<?= $editorLang ?>"<?php endif ?>
|
||||
<?php if ($toolbarButtons): ?>data-toolbar-buttons="<?= implode(',', $toolbarButtons) ?>"<?php endif ?>
|
||||
<?php if ($toolbarButtons): ?>data-toolbar-buttons="<?= implode(',', $toolbarButtons) ?>"
|
||||
<?php elseif ($globalToolbarButtons): ?>data-toolbar-buttons="<?= str_replace(" ", "", $globalToolbarButtons) ?>"<?php endif ?>
|
||||
<?php if ($allowEmptyTags): ?>data-allow-empty-tags="<?= e($allowEmptyTags) ?>"<?php endif ?>
|
||||
<?php if ($allowTags): ?>data-allow-tags="<?= e($allowTags) ?>"<?php endif ?>
|
||||
<?php if ($noWrapTags): ?>data-no-wrap-tags="<?= e($noWrapTags) ?>"<?php endif ?>
|
||||
|
|
|
|||
|
|
@ -361,7 +361,9 @@ return [
|
|||
'no_wrap' => 'Do not wrap tags',
|
||||
'no_wrap_comment' => 'The list of tags that should not be wrapped inside block tags.',
|
||||
'remove_tags' => 'Remove tags',
|
||||
'remove_tags_comment' => 'The list of tags that are removed together with their content.'
|
||||
'remove_tags_comment' => 'The list of tags that are removed together with their content.',
|
||||
'toolbar_buttons' => 'Toolbar Buttons',
|
||||
'toolbar_buttons_comment' => 'The Toolbar Buttons to be displayed in the Rich Editor by default. [fullscreen, bold, italic, underline, strikeThrough, subscript, superscript, fontFamily, fontSize, |, color, emoticons, inlineStyle, paragraphStyle, |, paragraphFormat, align, formatOL, formatUL, outdent, indent, quote, insertHR, -, insertLink, insertImage, insertVideo, insertAudio, insertFile, insertTable, undo, redo, clearFormatting, selectAll, html]',
|
||||
],
|
||||
'tooltips' => [
|
||||
'preview_website' => 'Preview the website'
|
||||
|
|
|
|||
|
|
@ -95,3 +95,10 @@ tabs:
|
|||
tab: backend::lang.editor.markup_tags
|
||||
type: textarea
|
||||
span: auto
|
||||
|
||||
html_toolbar_buttons:
|
||||
label: backend::lang.editor.toolbar_buttons
|
||||
comment: backend::lang.editor.toolbar_buttons_comment
|
||||
tab: backend::lang.editor.toolbar_buttons
|
||||
type: textarea
|
||||
span: auto
|
||||
|
|
|
|||
Loading…
Reference in New Issue