+ /**
+ * Retrieves the ID for this toolbar's main WYSIWYG toolgroup.
+ *
+ * Used to provide an abstraction for any WYSIWYG editor to plug in.
+ *
+ * @return {string}
+ * A string that can be used as the ID.
+ */
+ getMainWysiwygToolgroupId() {
+ return `quickedit-wysiwyg-main-toolgroup-for-${this._id}`;
+ },
+
+ /**
+ * Finds a toolgroup.
+ *
+ * @param {string} toolgroup
+ * A toolgroup name.
+ *
+ * @return {jQuery}
+ * The toolgroup element.
+ */
+ _find(toolgroup) {
+ return this.$el.find(`.quickedit-toolgroup.${toolgroup}`);
+ },
+
+ /**
+ * Shows a toolgroup.
+ *
+ * @param {string} toolgroup
+ * A toolgroup name.
+ */
+ show(toolgroup) {
+ const $group = this._find(toolgroup);
+ // Attach a transitionEnd event handler to the toolbar group so that
+ // update events can be triggered after the animations have ended.
+ $group.on(Drupal.quickedit.util.constants.transitionEnd, event => {
+ $group.off(Drupal.quickedit.util.constants.transitionEnd);
+ });
+ // The call to remove the class and start the animation must be started in
+ // the next animation frame or the event handler attached above won't be
+ // triggered.
+ window.setTimeout(() => {
+ $group.removeClass('quickedit-animate-invisible');
+ }, 0);
+ },
+ },
+ );
+})(jQuery, _, Backbone, Drupal);