config.js
3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/**
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
config.language = 'en';
config.height = 400; // 500 pixels.
config.skin = 'moonocolor';
config.allowedContent = true;
config.toolbar = [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source', '-', 'NewPage', 'Preview', '-', 'Templates', '-', 'Maximize' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Undo', 'Redo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
{ name: 'extra1', items: [ 'wenzgmap','tliyoutube' ] },
'/',
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ] },
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
{ name: 'insert', items: [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe' ] },
'/',
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', '-', 'RemoveFormat' ] },
{ name: 'others', items: [ '-' ] },
'/',
'/',
{ name: 'Subscribe Builder', items: [ 'Form', '-','Checkbox', 'Radio', 'TextField', 'Textarea', 'Select','-', 'Button', 'ImageButton','-', 'HiddenField' ] }
];
// Toolbar groups configuration.
config.toolbarGroups = [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
'/',
{ name: 'extra1' },
'/',
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
{ name: 'links' },
{ name: 'insert' },
'/',
{ name: 'styles' },
{ name: 'colors' },
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'others' },
'/',
'/',
{ name: 'Subscribe Builder' },
];
//config.uiColor = '#d9dde3';
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;
console.log(dialogDefinition);
// Check if the definition is from the dialog window you are interested in (the "Link" dialog window).
if ( dialogName == 'form' ) {
// Get a reference to the "Link Info" tab.
var infoTab = dialogDefinition.getContents( 'info' );
// Set the default value for the URL field.
var idField = infoTab.get( 'id' );
idField[ 'default' ] = 'isp_form_'+jQuery('#popup_id').val();
idField.inputStyle = 'visibility: hidden; display:none;';
idField.label = '';
var idField = infoTab.get( 'enctype' );
idField.inputStyle = 'visibility: hidden; display:none;';
idField.label = '';
var idField = infoTab.get( 'target' );
idField.inputStyle = 'visibility: hidden; display:none;';
idField.label = '';
idField = infoTab.get( 'method' );
idField[ 'default' ] = 'post';
}
});
config.extraPlugins = 'tliyoutube,wenzgmap';
};