Hi
create a new image button.save.gif and put into /FCKeditor/images/toolbar.
Save the code below as /fckeditor.custom.js
config.ToolbarSets["Default"] = [
['Save','-','EditSource','-','Cut','Copy','Paste','PasteText','PasteWord','-','Find','-','Undo','Redo','-','SelectAll','RemoveFormat','-','Link','RemoveLink','-','Image','Table','Rule','SpecialChar','Smiley','-','About'] ,
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','InsertOrderedList','InsertUnorderedList','-','Outdent','Indent','-','ShowTableBorders','ShowDetails','-','Zoom'] ,
['FontStyle','-','FontFormat','-','Font','-','FontSize','-','TextColor','BGColor']
] ;
config.ToolbarSets["Source"] = [
['Save','-','EditSource']
] ;
config.ToolbarSets["Accessibility"] = [
['Save','-','EditSource','-','Cut','Copy','Paste','-','SelectAll','RemoveFormat','-','Link','RemoveLink','-','Image','Rule','-','About'] ,
['FontStyle','-','Bold','Italic','Underline','-','InsertOrderedList','InsertUnorderedList','-','Undo','Redo']
] ;
TBI.prototype.Save = new TBButton("Save" , lang["Save"] , "doSave()" , TBCMD_CUSTOM) ;
function doSave()
{
oLinkedField = parent.document.getElementsByName(URLParams['FieldName'])[0] ;
var oForm = oLinkedField.form ;
oForm.submit();
}
This will work in all languages.
Best
Steen
create a new image button.save.gif and put into /FCKeditor/images/toolbar.
Save the code below as /fckeditor.custom.js
config.ToolbarSets["Default"] = [
['Save','-','EditSource','-','Cut','Copy','Paste','PasteText','PasteWord','-','Find','-','Undo','Redo','-','SelectAll','RemoveFormat','-','Link','RemoveLink','-','Image','Table','Rule','SpecialChar','Smiley','-','About'] ,
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','InsertOrderedList','InsertUnorderedList','-','Outdent','Indent','-','ShowTableBorders','ShowDetails','-','Zoom'] ,
['FontStyle','-','FontFormat','-','Font','-','FontSize','-','TextColor','BGColor']
] ;
config.ToolbarSets["Source"] = [
['Save','-','EditSource']
] ;
config.ToolbarSets["Accessibility"] = [
['Save','-','EditSource','-','Cut','Copy','Paste','-','SelectAll','RemoveFormat','-','Link','RemoveLink','-','Image','Rule','-','About'] ,
['FontStyle','-','Bold','Italic','Underline','-','InsertOrderedList','InsertUnorderedList','-','Undo','Redo']
] ;
TBI.prototype.Save = new TBButton("Save" , lang["Save"] , "doSave()" , TBCMD_CUSTOM) ;
function doSave()
{
oLinkedField = parent.document.getElementsByName(URLParams['FieldName'])[0] ;
var oForm = oLinkedField.form ;
oForm.submit();
}
This will work in all languages.
Best
Steen
RE: Custom save button
To do this, so far, I have built a button, next to save, which opens a new window with the required page template, and embedded a JavaScript function which I was hoping would call back to the opener page and pull back the HTML. Unfortunately, I can't seem to get it to work. I've tried accessing EditorDefault.value, EditorArea.value etc, but the JavaScript just can't find the information. What control is it I'm really looking for? Any ideas?
Thanks,
Lee
RE: Custom save button
Oh, it's alright... Just figured it out.
I did this; open a new window from a custom button, then in the template that opens in this window, I add a script block and entered
document.write (parent.opener.document.all.objContent.DOM.body.innerHTML) ;
which then copied all of the current HTML into the template design.
Quite easy really
RE: Custom save button
I can't find /fckeditor.custom.js in version 1.6
Would you please tell me where i can find it.and
Are the code you write above all placed in /fckeditor.custom.js ?
thank you!