Skip to content

Commit

Permalink
ts.ajax.attach if window.ts is not undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
lenadax committed Feb 11, 2025
1 parent 49a8125 commit 39dd682
Show file tree
Hide file tree
Showing 9 changed files with 1,067 additions and 371 deletions.
4 changes: 4 additions & 0 deletions js/src/bootstrap5/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ export class TiptapWidget {
this.editor.on('update', this.on_update);
this.on_selection_update = this.on_selection_update.bind(this);
this.editor.on('selectionUpdate', this.on_selection_update);

if (window.ts !== undefined) {
ts.ajax.attach(this, elem);
}
}

/**
Expand Down
4 changes: 4 additions & 0 deletions js/src/default/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export class TiptapWidget {
this.editor.on('update', this.on_update);
this.on_selection_update = this.on_selection_update.bind(this);
this.editor.on('selectionUpdate', this.on_selection_update);

if (window.ts !== undefined) {
ts.ajax.attach(this, elem);
}
}

destroy() {
Expand Down
3 changes: 3 additions & 0 deletions src/yafowil/widget/tiptap/resources/bootstrap5/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,9 @@ var yafowil_tiptap = (function (exports, $, bootstrap) {
this.editor.on('update', this.on_update);
this.on_selection_update = this.on_selection_update.bind(this);
this.editor.on('selectionUpdate', this.on_selection_update);
if (window.ts !== undefined) {
ts.ajax.attach(this, elem);
}
}
destroy() {
this.unload_all();
Expand Down

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/yafowil/widget/tiptap/resources/default/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,9 @@ var yafowil_tiptap = (function (exports, $) {
this.editor.on('update', this.on_update);
this.on_selection_update = this.on_selection_update.bind(this);
this.editor.on('selectionUpdate', this.on_selection_update);
if (window.ts !== undefined) {
ts.ajax.attach(this, elem);
}
}
destroy() {
this.unload_all();
Expand Down
2 changes: 1 addition & 1 deletion src/yafowil/widget/tiptap/resources/default/widget.min.js

Large diffs are not rendered by default.

777 changes: 574 additions & 203 deletions src/yafowil/widget/tiptap/resources/tiptap/tiptap.dist.bundle.js

Large diffs are not rendered by default.

641 changes: 476 additions & 165 deletions src/yafowil/widget/tiptap/resources/tiptap/tiptap.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/yafowil/widget/tiptap/resources/tiptap/tiptap.min.js

Large diffs are not rendered by default.

0 comments on commit 39dd682

Please sign in to comment.