Opened 12 years ago

Closed 11 years ago

#4070 closed enhancement (fixed)

Editor: if placed inside a layout widget, have the iframe area take up available space.

Reported by: Tom Trenka Owned by: liucougar
Priority: high Milestone: 1.2
Component: Editor Version: 0.9
Keywords: mail Cc:
Blocked By: Blocking:

Description

If a dijit.Editor is placed inside a layout widget, we'd love for the editable area to take up as much space as possible...similar to the way you can assign layoutAlign="client" on a child pane within a LayoutContainer?.

Attachments (2)

test_Editor_resize.html (1.0 KB) - added by Bryan Forbes 11 years ago.
Drop this in dijit/tests in trunk.
RichEditBC.patch (5.6 KB) - added by guest 11 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 12 years ago by bill

Component: DijitEditor
Summary: dijit.Editor: if placed inside a layout widget, have the iframe area take up available space.Editor: if placed inside a layout widget, have the iframe area take up available space.

This amounts to having a resize(size) method that gives the toolbar 20px (or however much space it needs) and gives the remaining space to the iframe.

comment:2 Changed 12 years ago by bill

Keywords: mail added

comment:3 Changed 12 years ago by dylan

Milestone: 1.11.2

mass move of editor issues to 1.2.

comment:4 Changed 11 years ago by bill

See also #6703.

Changed 11 years ago by Bryan Forbes

Attachment: test_Editor_resize.html added

Drop this in dijit/tests in trunk.

comment:5 Changed 11 years ago by liucougar

Resolution: fixed
Status: newclosed

add height="100%" to the editor, and it should work just fine

comment:6 Changed 11 years ago by liucougar

Resolution: fixed
Status: closedreopened

forgot to mention: in order for that to work, you need to manually add a toolbar to the "top" region, and pass that toolbar to the editor (this is a bit hard to do in markup though)

alternatively, editor may be changed to use a bordercontainer to do the layout of the editing area and the toolbar (then the editor needs to propogate startup/layout calls to the underlying bordercontainer). Bill, what do you think?

comment:7 Changed 11 years ago by bill

So, first of all, I don't want to force developers using dijit to put the Toolbar in a separate pane, etc.... that should be builtin to Editor the same way that TabContainer puts the tab labels on the top of the available space.

As per making editor use a BorderContainer internally, it sounds like overkill to me... all that is really needed is that when Editor.resize({w: 500, h: 500}) is called, give whatever height is needed to the toolbar, and then give the remaining height to the contentEditable div.

comment:8 Changed 11 years ago by liucougar

Owner: changed from alex to liucougar
Status: reopenednew

Changed 11 years ago by guest

Attachment: RichEditBC.patch added

comment:9 Changed 11 years ago by guest

You are welcome to use any of my diffs to make RichEditor? use a BorderContainer?. Probably needs cleaning up and a regression test, which I don't have time to make, sorry. I have a Dojo CLA under "Laurence A. Lee".

-lalee

comment:10 Changed 11 years ago by liucougar

Resolution: fixed
Status: newclosed

(In [13901]) fixes #6734: remove thick border for editor when no iframe is used fixes #4070: make editor play nicely within an layout widget. added a test case test_Editor_resize simplified one line code in _LayoutWidget

Note: See TracTickets for help on using tickets.