You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nothing happens in the UI and a JS error appears in the console: TypeError: $ is not a function
What is the expected behavior?
A link is added in the UI inside the mj-text component.
What is the current behavior?
The link is not added.
What I found out so far
I tracked the error to the GJS method: getModel().
It appears that the mj-text component does not have the el.__cashData.
Just returning the el is also not a solution as this leads to other problems: TypeError: model_1.once is not a function
But the link is added to the editor.
I assume this is related to mj-text being defined on the outside <tr> instead of the passed in <div>:
<trdata-gjs-type="mj-text" class="gjs-selected"><td><divcontenteditable="true">
Hello World
</div></td></tr>
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
adiux
changed the title
BUG: getModel() fails with: TypeError: $ is not a function
BUG: Can not add a link: getModel() fails with: TypeError: $ is not a function
Nov 29, 2023
GrapesJS version
What browser are you using?
Chrome Version 119
Reproducible demo link
https://jsfiddle.net/bj7afw63/1/
Describe the bug
How to reproduce the bug?
What is the expected behavior?
A link is added in the UI inside the mj-text component.
What is the current behavior?
The link is not added.
What I found out so far
I tracked the error to the GJS method: getModel().
It appears that the
mj-text
component does not have theel.__cashData
.Just returning the
el
is also not a solution as this leads to other problems:TypeError: model_1.once is not a function
But the link is added to the editor.
I assume this is related to
mj-text
being defined on the outside<tr>
instead of the passed in<div>
:Code of Conduct
The text was updated successfully, but these errors were encountered: