mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
Added labs.allow_html_editor_biti_buttons setting (RTL/LTR html edito buttons) (#375)
This commit is contained in:
parent
7b97a9f85d
commit
7aa8dcea6b
75 changed files with 865 additions and 29 deletions
|
|
@ -132,17 +132,17 @@
|
|||
'toolbarGroups': [
|
||||
{name: 'spec'},
|
||||
{name: 'styles'},
|
||||
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
|
||||
{name: 'basicstyles', groups: ['basicstyles', 'cleanup', 'bidi']},
|
||||
{name: 'colors'},
|
||||
{name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align']},
|
||||
{name: 'links'},
|
||||
{name: 'insert'},
|
||||
{name: 'document', groups: ['mode', 'document', 'doctools']},
|
||||
{name: 'others'}
|
||||
// {name: 'document', groups: ['mode', 'document', 'doctools']}
|
||||
],
|
||||
|
||||
'removePlugins': 'liststyle,tabletools,contextmenu', //blockquote
|
||||
'removeButtons': 'Format,Undo,Redo,Cut,Copy,Paste,Anchor,Strike,Subscript,Superscript,Image,SelectAll',
|
||||
'removeButtons': 'Format,Undo,Redo,Cut,Copy,Paste,Anchor,Strike,Subscript,Superscript,Image,SelectAll,Source',
|
||||
'removeDialogTabs': 'link:advanced;link:target;image:advanced;images:advanced',
|
||||
|
||||
'extraPlugins': 'plain',
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
_ = require('_'),
|
||||
|
||||
Globals = require('Common/Globals'),
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
Settings = require('Storage/Settings')
|
||||
;
|
||||
|
||||
|
|
@ -167,13 +169,23 @@
|
|||
var
|
||||
oConfig = Globals.oHtmlEditorDefaultConfig,
|
||||
sLanguage = Settings.settingsGet('Language'),
|
||||
bSource = !!Settings.settingsGet('AllowHtmlEditorSourceButton')
|
||||
bSource = !!Settings.settingsGet('AllowHtmlEditorSourceButton'),
|
||||
bBiti = !!Settings.settingsGet('AllowHtmlEditorBitiButtons')
|
||||
;
|
||||
|
||||
if (bSource && oConfig.toolbarGroups && !oConfig.toolbarGroups.__SourceInited)
|
||||
if ((bSource || bBiti) && !oConfig.toolbarGroups.__SourceInited)
|
||||
{
|
||||
oConfig.toolbarGroups.__SourceInited = true;
|
||||
oConfig.toolbarGroups.push({name: 'document', groups: ['mode', 'document', 'doctools']});
|
||||
|
||||
if (bSource)
|
||||
{
|
||||
oConfig.removeButtons = oConfig.removeButtons.replace(',Source', '');
|
||||
}
|
||||
|
||||
if (bBiti)
|
||||
{
|
||||
oConfig.extraPlugins += (oConfig.extraPlugins ? ',' : '') + 'bidi';
|
||||
}
|
||||
}
|
||||
|
||||
oConfig.enterMode = window.CKEDITOR.ENTER_BR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue