@threadlabs/looma 0.18.3 → 0.18.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9205,12 +9205,28 @@ function setActiveTableCellBackground(editor, backgroundColor) {
|
|
|
9205
9205
|
* Default Tiptap extension preset for Looma editor.
|
|
9206
9206
|
* Uses the Vanilla JS Tiptap API; apps provide @tiptap/core and Looma ships the preset extensions.
|
|
9207
9207
|
*/
|
|
9208
|
-
var LoomaCodeBlock = CodeBlockLowlight.extend({
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
|
|
9213
|
-
|
|
9208
|
+
var LoomaCodeBlock = CodeBlockLowlight.extend({
|
|
9209
|
+
renderHTML({ node, HTMLAttributes }) {
|
|
9210
|
+
return [
|
|
9211
|
+
"pre",
|
|
9212
|
+
mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { spellcheck: "false" }),
|
|
9213
|
+
[
|
|
9214
|
+
"code",
|
|
9215
|
+
{
|
|
9216
|
+
class: node.attrs.language ? `${this.options.languageClassPrefix}${node.attrs.language}` : null,
|
|
9217
|
+
spellcheck: "false"
|
|
9218
|
+
},
|
|
9219
|
+
0
|
|
9220
|
+
]
|
|
9221
|
+
];
|
|
9222
|
+
},
|
|
9223
|
+
addInputRules() {
|
|
9224
|
+
return [...this.parent?.() ?? [], textblockTypeInputRule({
|
|
9225
|
+
find: /^```$/,
|
|
9226
|
+
type: this.type
|
|
9227
|
+
})];
|
|
9228
|
+
}
|
|
9229
|
+
});
|
|
9214
9230
|
var StoredOnlyHighlight = Highlight.extend({
|
|
9215
9231
|
parseHTML: () => [],
|
|
9216
9232
|
addKeyboardShortcuts: () => ({}),
|