VisualEditor: Surface should be able to inherit commands and toolbar from other surface
Closed, ResolvedPublic8 Story Points

Description

Right now, we have to do the following in ve.ui.MWReferenceDialog and ve.ui.MWMediaDialog to set up the sub-editor's surface correctly:

this.referenceSurface.addCommands( ve.init.mw.ViewPageTarget.static.surfaceCommands );

Instead of accessing ve.init.mw (and assuming all surfaces with MW*Dialogs will be instantiated by ve.init.mw.ViewPageTarget), we should just be able to say "initialize this new surface based on this existing surface".


Version: unspecified
Severity: enhancement

bzimport set Reference to bz49439.
Catrope created this task.Jun 11 2013, 3:33 PM

Stylesheets should be inherited as well (and be loaded by the surface rather than the dialog) so we don't have to do things like

ve.ui.MWReferenceDialog.static.addLocalStylesheets( [
've.ce.Node.css',
've.ce.Surface.css',
've.ui.Surface.css',
've.ui.Context.css',
've.ui.Tool.css',
've.ui.Toolbar.css'
] );

Not just inherit, but also block from inheritance for specific instantiations (e.g. the caption of an image inside a reference can't take a reference - bug 58270).

Jdforrester-WMF closed this task as "Resolved".Nov 28 2014, 6:15 PM
Jdforrester-WMF assigned this task to Esanders.
Jdforrester-WMF set Security to None.

Add Comment