Skip to content

Commit 1048285

Browse files
authored
Added Bento Grid TipTap extension with drag-to-resize and shared grid infrastructure (#567)
1 parent bc4be0c commit 1048285

File tree

7 files changed

+1046
-201
lines changed

7 files changed

+1046
-201
lines changed

public/js/mage/adminhtml/wysiwyg/tiptap/extensions.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@
66
* @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
77
*/
88

9-
import { Editor, Node, Mark, Extension, mergeAttributes } from 'https://esm.sh/@tiptap/core@3.19.0';
10-
import StarterKit from 'https://esm.sh/@tiptap/starter-kit@3.19.0';
11-
import Image from 'https://esm.sh/@tiptap/extension-image@3.19.0';
12-
import TextAlign from 'https://esm.sh/@tiptap/extension-text-align@3.19.0';
13-
import { Table, TableRow, TableCell, TableHeader } from 'https://esm.sh/@tiptap/extension-table@3.19.0';
14-
import BubbleMenu from 'https://esm.sh/@tiptap/extension-bubble-menu@3.19.0';
15-
import DragHandle from 'https://esm.sh/@tiptap/extension-drag-handle@3.19.0';
9+
import { Editor, Node, Mark, Extension, mergeAttributes } from 'https://esm.sh/@tiptap/core@3.20.0';
10+
import StarterKit from 'https://esm.sh/@tiptap/starter-kit@3.20.0';
11+
import Image from 'https://esm.sh/@tiptap/extension-image@3.20.0';
12+
import TextAlign from 'https://esm.sh/@tiptap/extension-text-align@3.20.0';
13+
import { Table, TableRow, TableCell, TableHeader } from 'https://esm.sh/@tiptap/extension-table@3.20.0';
14+
import BubbleMenu from 'https://esm.sh/@tiptap/extension-bubble-menu@3.20.0';
15+
import DragHandle from 'https://esm.sh/@tiptap/extension-drag-handle@3.20.0';
1616
import { MahoColumns, MahoColumn, COLUMN_PRESETS } from './extensions/columns.js';
17+
import { MahoBentoGrid, MahoBentoCell, BENTO_PRESETS } from './extensions/bento.js';
1718

1819
export {
1920
Editor, Node, Mark, Extension, StarterKit, TextAlign,
2021
Table, TableRow, TableCell, TableHeader, BubbleMenu, DragHandle,
2122
MahoColumns, MahoColumn, COLUMN_PRESETS,
23+
MahoBentoGrid, MahoBentoCell, BENTO_PRESETS,
2224
};
2325

2426
const parseDirective = (directiveStr) => {
@@ -118,6 +120,7 @@ export const GlobalAttributes = Extension.create({
118120
'heading', 'paragraph', 'bulletList', 'orderedList', 'listItem', 'blockquote', 'codeBlock',
119121
'tableRow', 'tableCell', 'tableHeader', 'table',
120122
'mahoColumns', 'mahoColumn',
123+
'mahoBentoGrid', 'mahoBentoCell',
121124
],
122125
attributes: {
123126
class: {

0 commit comments

Comments
 (0)