+export function insertBlockBeforeItem(blockType, options) {
+ const command = insertBlockBefore(blockType);
+ const passedOptions = {
+ run: command,
+ enable(state) { return command(state) },
+ active(state) {
+ return false;
+ }
+ }
+ for (const prop in options) passedOptions[prop] = options[prop]
+ return new MenuItem(passedOptions);
+}
+