init: function(editor) {
editor.addCommand( 'inlinesave', {
exec: function (editor) {
- var pagename = window.location.pathname.replace(/\/$/, '/index');
+ var pagename = window.location.pathname;
var body = editor.getData();
// empty line is equivalent to a paragraph break
body = body.replace(/<br \/>\s*<br \/>/g, '<p>');
ajaxpost.send(data);
},
});
+ editor.setKeystroke(CKEDITOR.CTRL + 83 /*S*/, 'inlinesave');
editor.ui.addButton( 'Inlinesave', {
command: 'inlinesave',
label: editor.lang.save.toolbar,
switch (event.data.name) {
case 'table':
// override initial attribute values
- var infoTab = event.data.definition.getContents('info');
- infoTab.get('txtWidth').default = '';
- infoTab.get('txtBorder').default = '0';
- infoTab.get('txtCellSpace').default = '';
- infoTab.get('txtCellPad').default = '';
+ var infotab = event.data.definition.getContents('info');
+ infotab.remove('txtWidth');
+ infotab.remove('txtHeight');
+ infotab.remove('txtBorder');
+ infotab.remove('txtCellSpace');
+ infotab.remove('txtCellPad');
+ infotab.remove('cmbAlign');
+
+ // horizontal repositioning of existing elements
+ var hbox = {
+ id: 'hboxDimensions',
+ type: 'hbox',
+ children: [ infotab.get('txtCols'), infotab.get('txtRows') ],
+ };
+ infotab.add(hbox, 'selHeaders');
+ infotab.remove('txtCols');
+ infotab.remove('txtRows');
+
break;
case 'link':
// hide unneeded widgets from the Link Info tab
config.toolbarCanCollapse = true;
config.floatSpacePreferRight = true;
config.floatSpaceDockedOffsetY = 0;
+ config.title = false;
config.startupFocus = true;
config.disableObjectResizing = true;