1. #1
    Ext GWT Premium Member
    Join Date
    Oct 2008
    Posts
    72
    Vote Rating
    5
    elirov is on a distinguished road

      0  

    Default CKEditor-GWT FitLayout

    CKEditor-GWT FitLayout


    When adding a CKEditor object to a LayoutContainer with a FitLayout, the CKEditor only takes up about 300px height-wise no matter how tall the available LayoutContainer is.

    Has anyone been able to get CKEditor to use up 100% of the height of its container under GXT?

  2. #2
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    867
    Vote Rating
    1
    micgala is on a distinguished road

      0  

    Default


    What is a CKEditor?
    Maybe in this CKEditor code, the height is manually set to 300px?
    It is really hard to tell what is the problem without some code...

  3. #3
    Ext GWT Premium Member
    Join Date
    Oct 2008
    Posts
    72
    Vote Rating
    5
    elirov is on a distinguished road

      0  

    Default


    It's a rich text editor control with a lot more options than the stock GXT rich text editor.
    http://ckeditor.com/

    There's a wrapper library for GWT:
    http://code.google.com/p/gwt-ckeditor/

    Here's my code:
    Code:
    package com.espoc.vericle.gwt.xdoc.client.ui;
    
    import com.axeiya.gwtckeditor.client.CKConfig;
    public class XDocTemplateEditorWindow extends Window {
    
      private CKEditor cke = new CKEditor(CKConfig.full);
    
      public XDocTemplateEditorWindow() {
        setLayout(new FitLayout());
        add(cke);
        cke.setWidth("100%");
        cke.setHeight("100%"); // tried with and without the setHeight/setWidth functions and also tried absolute pixels.  It always sets to the max width and about 300px height or so.
        layout();
      }
    
      @Override
      public void show() {
        setSize(RootPanel.get().getOffsetWidth() - 40, RootPanel.get().getOffsetHeight() - 40);
        super.show();
        layout(true);
      }
    }

  4. #4
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    867
    Vote Rating
    1
    micgala is on a distinguished road

      0  

    Default


    cke.setWidth("100%") and setHeight("100%") should not be called, since the layout is already set to FitLayout.

    The problem must be with your CKEditor. It must be configured internally with a width of "about" 300px.
    Please check the rendered page with FireBug, for example, and try to check where is this set.
    Or, you would need to analyse the CKEditor code and look for it.

    Regards,
    Michel.

  5. #5
    Ext GWT Premium Member
    Join Date
    Oct 2008
    Posts
    72
    Vote Rating
    5
    elirov is on a distinguished road

      0  

    Default


    Yeah.. My first try was without the setHeight/Width, hoping it would just work. I'll give Firebug a try. I was just hoping someone already ran into this or could suggest a good rich text editor (with table and image support) that would just work with GXT.

    I'll keep the group posted! Thanks for the suggestion.

Similar Threads

  1. CKEditor Extension
    By iosoftgame in forum Ext 3.x: User Extensions and Plugins
    Replies: 40
    Last Post: 24 Feb 2014, 12:48 AM
  2. CkEditor and (Sencha) Extjs
    By russall1985 in forum Community Discussion
    Replies: 0
    Last Post: 10 Feb 2011, 7:15 AM
  3. Initialize panel as disabled with embedded ckeditor
    By ChrisR in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 10 Jan 2011, 1:44 PM
  4. TabPanel with FitLayout
    By franck971 in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 21 Aug 2009, 4:52 AM

Thread Participants: 1