Hi everyone!!!
I need to change the source view for other thing !!!
I Know how put in a button in the toolbar, in the fckconfig.js in
in the FCKToolbarButton this is the function
Them in FCKothercommands.js is the action:
them in the FCK.js is the function "SwitchEditMode()"
But don´t understand where change the iframe from edit mode to plaintext "Source View", because is there where I wish change to other thing, I´m Working in a View with Highligher them I wanna change with that.
I wish to know where is definided the constants like "FCK_EDITMODE_WYSIWYG " and others
Thanks a lot for your help.
Best Regards
Daniel Rivas
I need to change the source view for other thing !!!
I Know how put in a button in the toolbar, in the fckconfig.js in
FCKConfig.ToolbarSets["Default"] =then put in fdktoolbaritem.js like as
case 'Source' : oItem = new FCKToolbarButton( 'Source' , FCKLang.Source, null, FCK_TOOLBARITEM_ICONTEXT, true, true, 1 ) ; break ;
in the FCKToolbarButton this is the function
var FCKToolbarButton = function( commandName, label, tooltip, style, sourceView, contextSensitive, icon ) { this.CommandName = commandName ; this.Label = label ; this.Tooltip = tooltip ; this.Style = style ; this.SourceView = sourceView ? true : false ; this.ContextSensitive = contextSensitive ? true : false ; if ( icon == null ) this.IconPath = FCKConfig.SkinPath + 'toolbar/' + commandName.toLowerCase() + '.gif' ; else if ( typeof( icon ) == 'number' ) this.IconPath = [ FCKConfig.SkinPath + 'fck_strip.gif', 16, icon ] ; else this.IconPath = icon ; }
Them in FCKothercommands.js is the action:
var FCKSourceCommand = function() { this.Name = 'Source' ; } FCKSourceCommand.prototype.Execute = function() { if ( FCKConfig.SourcePopup ) // Until v2.2, it was mandatory for FCKBrowserInfo.IsGecko. { var iWidth = FCKConfig.ScreenWidth * 0.65 ; var iHeight = FCKConfig.ScreenHeight * 0.65 ; FCKDialog.OpenDialog( 'FCKDialog_Source', FCKLang.Source, 'dialog/fck_source.html', iWidth, iHeight, null, null, true ) ; } else FCK.SwitchEditMode() ; }
them in the FCK.js is the function "SwitchEditMode()"
SwitchEditMode : function( noUndo ) { var bIsWysiwyg = ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) ; // Save the current IsDirty state, so we may restore it after the switch. var bIsDirty = FCK.IsDirty() ; var sHtml ; // Update the HTML in the view output to show, also update // FCKTempBin for IE to avoid #2263. if ( bIsWysiwyg ) { FCKCommands.GetCommand( 'ShowBlocks' ).SaveState() ; if ( !noUndo && FCKBrowserInfo.IsIE ) FCKUndo.SaveUndoStep() ; sHtml = FCK.GetXHTML( FCKConfig.FormatSource ) ; if ( FCKBrowserInfo.IsIE ) FCKTempBin.ToHtml() ; if ( sHtml == null ) return false ; } else sHtml = this.EditingArea.Textarea.value ; FCK.EditMode = bIsWysiwyg ? FCK_EDITMODE_SOURCE : FCK_EDITMODE_WYSIWYG ; FCK.SetData( sHtml, !bIsDirty ) ; // Set the Focus. FCK.Focus() ; // Update the toolbar (Running it directly causes IE to fail). FCKTools.RunFunction( FCK.ToolbarSet.RefreshModeState, FCK.ToolbarSet ) ; return true ; },
But don´t understand where change the iframe from edit mode to plaintext "Source View", because is there where I wish change to other thing, I´m Working in a View with Highligher them I wanna change with that.
I wish to know where is definided the constants like "FCK_EDITMODE_WYSIWYG " and others
Thanks a lot for your help.
Best Regards
Daniel Rivas