[Building Sakai] CKEditor and Double Scrollbars fix in Sakai 2.8.x and beyond

Mike Jennings mike_jennings at unc.edu
Mon Nov 19 13:49:05 PST 2012


I wanted to post the following solution that I came up with to fix the 
double scrollbars in our Sakai 2.8.x instance.

The key bit of javascript code actually came from Adrian Fish.  He uses 
this code to resize the frame correctly for the CKEditor in the YAST 
project.


CKEDITOR.instances[textarea_id].on('instanceReady',function (e) {
             if(window.frameElement) {
                 setMainFrameHeight(window.frameElement.id);
             }
         });

So what I did was add this code to the ckeditor.launch.js file and now 
all of my double scrollbar issues have gone away.  Here is the diff...

Index: ckeditor.launch.js
===================================================================
--- ckeditor.launch.js	(revision 115412)
+++ ckeditor.launch.js	(working copy)
@@ -69,6 +69,12 @@
          ],
          resize_dir: 'vertical'
      });
+
+ 
CKEDITOR.instances[targetId].on('instanceReady',function (e) {
+            if(window.frameElement) {
+                setMainFrameHeight(window.frameElement.id);
+            }
+        });
  }

  sakai.editor.launch = sakai.editor.editors.ckeditor.launch;


Of course right after I did this, I found a different solution in the 
Sakai Jira's where they reduce the height of CKEditor from 460px to 
310px....

https://jira.sakaiproject.org/browse/SAK-22424

I just wanted to share this different solution and give a big thanks to 
Adrian for his help.

Mike Jennings

-- 
==============================================================================
Mike Jennings
Teaching and Learning Developer
University of North Carolina at Chapel Hill

Office: (919) 843-5013
Cell: (919) 698-3746
E-mail: mike_jennings at unc.edu


More information about the sakai-dev mailing list