gdpr audit implemented, email log, vollmachten, pdf delete cancel data privacy and vollmachten, removed message no id card in engergy car, and other contracts that are not telecom contracts, added insert counter for engery
This commit is contained in:
+75
@@ -0,0 +1,75 @@
|
||||
// src/code.ts
|
||||
import { Mark, markInputRule, markPasteRule, mergeAttributes } from "@tiptap/core";
|
||||
var inputRegex = /(^|[^`])`([^`]+)`(?!`)$/;
|
||||
var pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g;
|
||||
var Code = Mark.create({
|
||||
name: "code",
|
||||
addOptions() {
|
||||
return {
|
||||
HTMLAttributes: {}
|
||||
};
|
||||
},
|
||||
excludes: "_",
|
||||
code: true,
|
||||
exitable: true,
|
||||
parseHTML() {
|
||||
return [{ tag: "code" }];
|
||||
},
|
||||
renderHTML({ HTMLAttributes }) {
|
||||
return ["code", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
||||
},
|
||||
markdownTokenName: "codespan",
|
||||
parseMarkdown: (token, helpers) => {
|
||||
return helpers.applyMark("code", [{ type: "text", text: token.text || "" }]);
|
||||
},
|
||||
renderMarkdown: (node, h) => {
|
||||
if (!node.content) {
|
||||
return "";
|
||||
}
|
||||
return `\`${h.renderChildren(node.content)}\``;
|
||||
},
|
||||
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 [
|
||||
markInputRule({
|
||||
find: inputRegex,
|
||||
type: this.type
|
||||
})
|
||||
];
|
||||
},
|
||||
addPasteRules() {
|
||||
return [
|
||||
markPasteRule({
|
||||
find: pasteRegex,
|
||||
type: this.type
|
||||
})
|
||||
];
|
||||
}
|
||||
});
|
||||
|
||||
// src/index.ts
|
||||
var index_default = Code;
|
||||
export {
|
||||
Code,
|
||||
index_default as default,
|
||||
inputRegex,
|
||||
pasteRegex
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
Reference in New Issue
Block a user