mirror of https://github.com/gophish/gophish
Cleaned up CKEditor link dialog to be more simple. Related to #1327
parent
af293da9f5
commit
ea97d6257d
File diff suppressed because one or more lines are too long
|
@ -229,5 +229,20 @@ $(document).ready(function () {
|
|||
$("#capture_passwords").toggle()
|
||||
$("#redirect_url").toggle()
|
||||
})
|
||||
CKEDITOR.on('dialogDefinition', function (ev) {
|
||||
// Take the dialog name and its definition from the event data.
|
||||
var dialogName = ev.data.name;
|
||||
var dialogDefinition = ev.data.definition;
|
||||
|
||||
// Check if the definition is from the dialog window you are interested in (the "Link" dialog window).
|
||||
if (dialogName == 'link') {
|
||||
dialogDefinition.minWidth = 500
|
||||
dialogDefinition.minHeight = 100
|
||||
|
||||
// Remove the linkType field
|
||||
var infoTab = dialogDefinition.getContents('info');
|
||||
infoTab.get('linkType').hidden = true;
|
||||
}
|
||||
});
|
||||
load()
|
||||
})
|
|
@ -3,27 +3,57 @@
|
|||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.editorConfig = function( config ) {
|
||||
CKEDITOR.editorConfig = function (config) {
|
||||
// Define changes to default configuration here.
|
||||
// For complete reference see:
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.config
|
||||
|
||||
// The toolbar groups arrangement, optimized for two toolbar rows.
|
||||
config.toolbarGroups = [
|
||||
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
|
||||
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
|
||||
{ name: 'links' },
|
||||
{ name: 'insert' },
|
||||
{ name: 'forms' },
|
||||
{ name: 'tools' },
|
||||
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
|
||||
{ name: 'others' },
|
||||
config.toolbarGroups = [{
|
||||
name: 'clipboard',
|
||||
groups: ['clipboard', 'undo']
|
||||
},
|
||||
{
|
||||
name: 'editing',
|
||||
groups: ['find', 'selection', 'spellchecker']
|
||||
},
|
||||
{
|
||||
name: 'links'
|
||||
},
|
||||
{
|
||||
name: 'insert'
|
||||
},
|
||||
{
|
||||
name: 'forms'
|
||||
},
|
||||
{
|
||||
name: 'tools'
|
||||
},
|
||||
{
|
||||
name: 'document',
|
||||
groups: ['mode', 'document', 'doctools']
|
||||
},
|
||||
{
|
||||
name: 'others'
|
||||
},
|
||||
'/',
|
||||
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
|
||||
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
|
||||
{ name: 'styles' },
|
||||
{ name: 'colors' },
|
||||
{ name: 'about' }
|
||||
{
|
||||
name: 'basicstyles',
|
||||
groups: ['basicstyles', 'cleanup']
|
||||
},
|
||||
{
|
||||
name: 'paragraph',
|
||||
groups: ['list', 'indent', 'blocks', 'align', 'bidi']
|
||||
},
|
||||
{
|
||||
name: 'styles'
|
||||
},
|
||||
{
|
||||
name: 'colors'
|
||||
},
|
||||
{
|
||||
name: 'about'
|
||||
}
|
||||
];
|
||||
|
||||
// Remove some buttons provided by the standard plugins, which are
|
||||
|
@ -37,4 +67,6 @@ CKEDITOR.editorConfig = function( config ) {
|
|||
config.fullPage = true;
|
||||
config.allowedContent = true;
|
||||
config.startupMode = "source";
|
||||
config.linkShowAdvancedTab = false
|
||||
config.linkShowTargetTab = false
|
||||
};
|
Loading…
Reference in New Issue