Skip to content

Commit 39dd682

Browse files
committed
ts.ajax.attach if window.ts is not undefined
1 parent 49a8125 commit 39dd682

File tree

9 files changed

+1067
-371
lines changed

9 files changed

+1067
-371
lines changed

js/src/bootstrap5/widget.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ export class TiptapWidget {
8282
this.editor.on('update', this.on_update);
8383
this.on_selection_update = this.on_selection_update.bind(this);
8484
this.editor.on('selectionUpdate', this.on_selection_update);
85+
86+
if (window.ts !== undefined) {
87+
ts.ajax.attach(this, elem);
88+
}
8589
}
8690

8791
/**

js/src/default/widget.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ export class TiptapWidget {
6464
this.editor.on('update', this.on_update);
6565
this.on_selection_update = this.on_selection_update.bind(this);
6666
this.editor.on('selectionUpdate', this.on_selection_update);
67+
68+
if (window.ts !== undefined) {
69+
ts.ajax.attach(this, elem);
70+
}
6771
}
6872

6973
destroy() {

src/yafowil/widget/tiptap/resources/bootstrap5/widget.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,9 @@ var yafowil_tiptap = (function (exports, $, bootstrap) {
622622
this.editor.on('update', this.on_update);
623623
this.on_selection_update = this.on_selection_update.bind(this);
624624
this.editor.on('selectionUpdate', this.on_selection_update);
625+
if (window.ts !== undefined) {
626+
ts.ajax.attach(this, elem);
627+
}
625628
}
626629
destroy() {
627630
this.unload_all();

src/yafowil/widget/tiptap/resources/bootstrap5/widget.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/yafowil/widget/tiptap/resources/default/widget.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,9 @@ var yafowil_tiptap = (function (exports, $) {
649649
this.editor.on('update', this.on_update);
650650
this.on_selection_update = this.on_selection_update.bind(this);
651651
this.editor.on('selectionUpdate', this.on_selection_update);
652+
if (window.ts !== undefined) {
653+
ts.ajax.attach(this, elem);
654+
}
652655
}
653656
destroy() {
654657
this.unload_all();

src/yafowil/widget/tiptap/resources/default/widget.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/yafowil/widget/tiptap/resources/tiptap/tiptap.dist.bundle.js

Lines changed: 574 additions & 203 deletions
Large diffs are not rendered by default.

src/yafowil/widget/tiptap/resources/tiptap/tiptap.js

Lines changed: 476 additions & 165 deletions
Large diffs are not rendered by default.

src/yafowil/widget/tiptap/resources/tiptap/tiptap.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)