import { a as l } from "./inlineFormatting-DJ0-NZtx.mjs";
const a = (e, t) => l({
  command: "italic",
  context: t
}), n = (e, t) => {
  var i;
  typeof window != "undefined" && ((i = window.registerEditorCommand) == null || i.call(window, e, t));
}, o = () => {
  n("toggleItalic", a);
};
typeof window != "undefined" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", o) : o());
const c = () => ({
  name: "italic",
  marks: {
    italic: {
      parseDOM: [
        { tag: "i" },
        { tag: "em" },
        {
          style: "font-style=italic"
        }
      ],
      toDOM: () => ["em", 0]
    }
  },
  toolbar: [
    {
      label: "Italic",
      command: "toggleItalic",
      type: "button",
      icon: '<svg width="24" height="24" focusable="false"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8Z" fill-rule="evenodd"></path></svg>',
      shortcut: "Mod-i"
    }
  ],
  commands: {
    toggleItalic: a
  },
  keymap: {
    "Mod-i": "toggleItalic",
    "Mod-I": "toggleItalic"
  }
});
export {
  c as ItalicPlugin,
  a as toggleItalic
};
//# sourceMappingURL=ItalicPlugin.native-CmnlwFHB.mjs.map
