Allow greater control over inline editor buttons and rendering.
Review Request #6173 — Created July 31, 2014 and submitted
The buttons element is no longer always a
<div>
. If it's a multi-line
editor, it will appear as a<div/>
, but if it's a single-line editor, it
will appear as a<span>
. This is preferred over hard-coding a
display: inline
style on the element, and will have the same effect by
default. Custom CSS can then override it to have whatever display style
is appropriate.There are also cases where a caller may need to set some properties on
an element before actually showing the editor and triggering the layout
code. For example, an element may need to be set that would impact the
positioning of the buttons or some other aspect of the editor.To handle this, there's now a
beginEditPreShow
event that callers can
listen to. This is displayed immediately before the editor is shown.
Saw buttons appear inline, as they did before, on single-line editors.
Set some CSS to force buttons on the next line. That worked, and didn't
before due to the inline style.Set some CSS on the element before the editor was shown.
- Change Summary:
-
- Removed some lines that I had removed locally, but didn't commit. They were setting the
display: inline
. - Prepended the buttons to the form, rather than appended, in case
setupEvents
was deferred and later called (so that the order of elements wouldn't be wrong).
- Removed some lines that I had removed locally, but didn't commit. They were setting the
- Commit:
-
f3045a094341e8e02c3e3d39495254a05ad89713a786428f69ba70a3a15f35415d81fee251d6f3d2