Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Getting the calculated height for canvasitem

    Hi,

    Is there a way to get the calculated actual height available for CanvasItem in pixels ? I'm trying to integrate YUI toolkit's rich text editor to a dynamic form as a CanvasItem.

    I've followed for the tricks explained here for FCKEditor and I've got it kind of working except for vertical sizing. I have a Canvas with custom getInnerHTML-method to produce a appropriate div for yui and initializing the editor with GWT's DeferredCommand. Now it seems that yui replaces the (getInnerHTML-) div with two separate divs: first one contains the toolbar for the rich text editor and the second one contains the actual editable text. It seems that the error I'm seeing comes from the fact that the yui sizes the second editable text div to the size I'm giving for the form (canvas-) item. If I set the CanvasItem's height to a fixed 200px the actual height yui renders the editor is 200px for the text content and extra something for the toolbar which screws up the layout. If I set the CanvasItem's height to "100%" the editable text div of the rich text editor gets all the space available in the dynamic form's layout and the extra height of the toolbar bleeds over below.

    Now what I would like to do is to get the actual height in pixels available for the editor (CanvasItem) in the DeferredCommands execute-method so I could fix the yui editor's height to a proper size. Or are there any better alternatives ?

    br,
    Marko
Working...
X