diff --git a/modules/jquery.wikiEditor.toolbar.js b/modules/jquery.wikiEditor.toolbar.js
index b1d51361..aeb7748b 100644
--- a/modules/jquery.wikiEditor.toolbar.js
+++ b/modules/jquery.wikiEditor.toolbar.js
@@ -428,6 +428,16 @@
);
$select.append( $( '
' ).addClass( 'menu' ).append( $options ) );
return $select;
+ case 'element':
+ // A raw 'element' type can be {htmlString|Element|Text|Array|jQuery|OO.ui.HTMLSnippet}.
+ var $element = $( '
' )
+ .attr( { rel: id, class: 'tool tool-element' } );
+ if ( tool.element instanceof OO.ui.HtmlSnippet ) {
+ $element.append( tool.element.toString() );
+ } else {
+ $element.append( tool.element );
+ }
+ return $element;
default:
return null;
}