Log in or register to post comments
Last post
How to auto maximize on CKEditor 3.0
                            <script type="text/javascript">
                                function FCKeditor_OnComplete( editorInstance )
                                {
                                    var oEditor = FCKeditorAPI.GetInstance( editorInstance.Name ) ;
                                    oEditor.Commands.GetCommand(\'FitWindow\').Execute();
                                }
                            </script>


How can I change this code to run on CKEditor 3.0RC?
Re: How to auto maximize on CKEditor 3.0
Hi,

The FCK_OnComplete equivalent in v3 is the 'instanceReady' event, so you may use the following codes, we'll have APIs like this in documentation after v3 come to final release.
   CKEDITOR.on('instanceReady',
      function( evt )
      {
         var editor = evt.editor;
         ...
      });
Re: How to auto maximize on CKEditor 3.0
Thanks for the answer!

But I still can not use this option.

oEditor.Commands.GetCommand(\'FitWindow\').Execute();

How should this line be on Ckeditor 3.0?
Re: How to auto maximize on CKEditor 3.0
davidecheli wrote:Thanks for the answer!

But I still can not use this option.

oEditor.Commands.GetCommand(\'FitWindow\').Execute();

How should this line be on Ckeditor 3.0?


Very interested in this too... please provide us more information :)
Re: How to auto maximize on CKEditor 3.0
The following code appears to work for the latest build. Hope it helps.

CKEDITOR.on('instanceReady',
      function( evt )
      {
         var editor = evt.editor;
         editor.execCommand('maximize');
      });
Re: How to auto maximize on CKEditor 3.0
When I add this quote, there is a flicker. First, the un-maximized version of CKEditor appears, and then a split-second later, it maximizes. Is there a way to avoid this stutter? Thanks.

dancallaghan wrote:
CKEDITOR.on('instanceReady',
      function( evt )
      {
         var editor = evt.editor;
         editor.execCommand('maximize');
      });
Re: How to auto maximize on CKEditor 3.0
Thanks for the comments, the flicking issue is there, so it's under the radar now:
http://dev.fckeditor.net/ticket/4509
Re: How to auto maximize on CKEditor 3.0
i tried this code

CKEDITOR.on('instanceReady',
function( evt )
{
var editor = evt.editor;
editor.execCommand('maximize');
});


with the latest version of ckeditor and got the following error:

Microsoft JScript runtime error: '_' is null or not an object

happening at
K=q.element.getDocument().getById(I._.id)


I tried setting inside the config.js and inside my html code, but no luck. any ideas?
Re: How to auto maximize on CKEditor 3.0
Is there anything one can do against the flickering that landmark described?

I tried "hide - maximize - show", but can't get it to work with the events given by CKEditor.
Re: How to auto maximize on CKEditor 3.0
The follow worked for me:
</body>

<script type="text/javascript">
    //window.onload = function () {
        CKEDITOR.replace('CKEditor1', { on: {            
            'instanceReady': function (evt) { evt.editor.execCommand('maximize'); }
        }});        
    //}    
</script>

</html>