-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheditablefooter.cfm
More file actions
66 lines (53 loc) · 2.22 KB
/
editablefooter.cfm
File metadata and controls
66 lines (53 loc) · 2.22 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
<script>
// The "instanceCreated" event is fired for every editor instance created.
CKEDITOR.on( 'instanceCreated', function ( event ) {
var editor = event.editor,
element = editor.element;
// Customize editors for headers and tag list.
// These editors do not need features like smileys, templates, iframes etc.
if ( element.is( 'h1', 'h2', 'h3' ) || element.getAttribute( 'id' ) == 'taglist' ) {
// Customize the editor configuration on "configLoaded" event,
// which is fired after the configuration file loading and
// execution. This makes it possible to change the
// configuration before the editor initialization takes place.
editor.on( 'configLoaded', function () {
// Remove redundant plugins to make the editor simpler.
editor.config.removePlugins = 'colorbutton,find,flash,font,' +
'forms,iframe,image,newpage,removeformat,' +
'smiley,specialchar,stylescombo,templates';
// Rearrange the toolbar layout.
editor.config.toolbarGroups = [
{ name: 'editing', groups: [ 'basicstyles', 'links' ] },
{ name: 'undo' },
{ name: 'clipboard', groups: [ 'selection', 'clipboard' ] },
{ name: 'about' }
];
} );
}
//On the details_page --- when an title is edited, it can also edit the page name
editor.on( 'focus', function( evt ) {
$( "#renamePage" ).toggle( "slow" );
} );
editor.on( 'blur', function( evt ) {
var chkBoxName = evt.editor.element.getAttribute('chkboxid');
var renamePostName;
$( "#renamePage" ).toggle( "slow" );
$( "#renamePageChk" ).change(function() {
var $input = $( this );
renamePostName = $input.is( ":checked" );
}).change();
var thisContent = evt.editor.getData();
var fileName = evt.editor.element.getAttribute('id');
$.post("post.cfm",
{
content: thisContent,
id: fileName,
pageUrl : '<cfoutput>#currentPage#</cfoutput>',
myCheckbox : renamePostName
},
function(data, status){
//alert("Data: " + data + "\nStatus: " + status);
});
});
} );
</script>