PHP 8.2.30
Preview: index.umd.js Size: 2.17 KB
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@tiptap/extension-code/dist/index.umd.js

(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/core')) :
  typeof define === 'function' && define.amd ? define(['exports', '@tiptap/core'], factory) :
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/extension-code"] = {}, global.core));
})(this, (function (exports, core) { 'use strict';

  const inputRegex = /(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;
  const pasteRegex = /(?:^|\s)((?:`)((?:[^`]+))(?:`))/g;
  const Code = core.Mark.create({
      name: 'code',
      addOptions() {
          return {
              HTMLAttributes: {},
          };
      },
      excludes: '_',
      code: true,
      exitable: true,
      parseHTML() {
          return [
              { tag: 'code' },
          ];
      },
      renderHTML({ HTMLAttributes }) {
          return ['code', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
      },
      addCommands() {
          return {
              setCode: () => ({ commands }) => {
                  return commands.setMark(this.name);
              },
              toggleCode: () => ({ commands }) => {
                  return commands.toggleMark(this.name);
              },
              unsetCode: () => ({ commands }) => {
                  return commands.unsetMark(this.name);
              },
          };
      },
      addKeyboardShortcuts() {
          return {
              'Mod-e': () => this.editor.commands.toggleCode(),
          };
      },
      addInputRules() {
          return [
              core.markInputRule({
                  find: inputRegex,
                  type: this.type,
              }),
          ];
      },
      addPasteRules() {
          return [
              core.markPasteRule({
                  find: pasteRegex,
                  type: this.type,
              }),
          ];
      },
  });

  exports.Code = Code;
  exports["default"] = Code;
  exports.inputRegex = inputRegex;
  exports.pasteRegex = pasteRegex;

  Object.defineProperty(exports, '__esModule', { value: true });

}));
//# sourceMappingURL=index.umd.js.map

Directory Contents

Dirs: 1 × Files: 6

Name Size Perms Modified Actions
packages DIR
- drwxr-xr-x 2026-02-28 00:27:44
Edit Download
1.68 KB lrw-r--r-- 2026-02-28 00:26:36
Edit Download
3.12 KB lrw-r--r-- 2026-02-28 00:27:14
Edit Download
1.58 KB lrw-r--r-- 2026-02-28 00:26:46
Edit Download
3.05 KB lrw-r--r-- 2026-02-28 00:27:26
Edit Download
2.17 KB lrw-r--r-- 2026-02-28 00:26:54
Edit Download
3.13 KB lrw-r--r-- 2026-02-28 00:27:34
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).