Comments (7)
The issue seems to be with the way Tippy.js is bundled (Tippy is a dependecy of "@tiptap/extension-bubble-menu") Strapi uses esbuild as a bundler, and it seems to think Tippy is an es6 compliant module (it is not).
For the moment i'm using this "fix" in the webpack config file for strapi:
config.plugins.push(new webpack.NormalModuleReplacementPlugin(
/^tippy\.js$/,
'tippy.js/dist/tippy-bundle.umd.min.js'
))
However this is not the ideal solution which I think should be:
- make Tippy.js esModule compliant
- update the entire dependency tree
I haven't opened an issue on Tippy.js or @tiptap/extension-bubble-menu though.
from strapi-tiptap-editor.
The issue seems to be with the way Tippy.js is bundled (Tippy is a dependecy of "@tiptap/extension-bubble-menu") Strapi uses esbuild as a bundler, and it seems to think Tippy is an es6 compliant module (it is not).
For the moment i'm using this "fix" in the webpack config file for strapi:
config.plugins.push(new webpack.NormalModuleReplacementPlugin( /^tippy\.js$/, 'tippy.js/dist/tippy-bundle.umd.min.js' ))
However this is not the ideal solution which I think should be:
- make Tippy.js esModule compliant
- update the entire dependency tree
I haven't opened an issue on Tippy.js or @tiptap/extension-bubble-menu though.
I can also confirm that this completely fixes the issue!
I will update the readme to reflect this.
from strapi-tiptap-editor.
In watchmode I get when clicking into the editor to focus on it
TypeError
tippy_js__WEBPACK_IMPORTED_MODULE_2__ is not a function
Call Stack
BubbleMenuView.createTooltip
webpack-internal:///9353:661:22
BubbleMenuView.updateHandler
webpack-internal:///9353:608:18
BubbleMenuView.update
webpack-internal:///9353:683:18
eval
webpack-internal:///9353:584:35
from strapi-tiptap-editor.
Same issue as #61 I think. @giu1io, how did you debug it to find out that it is Tippy.js? (wondering out of curiousity as I tried to debug it myself aswell)
from strapi-tiptap-editor.
Same issue as #61 I think. @giu1io, how did you debug it to find out that it is Tippy.js? (wondering out of curiousity as I tried to debug it myself aswell)
I've launched Strapi in --watch-admin
mode, that way you can debug the exact point in the code where the crash happens.
from strapi-tiptap-editor.
@giu1io is there any solution to this editor problem at this moment?
from strapi-tiptap-editor.
@giu1io is there any solution to this editor problem at this moment?
I'm using the solution that I detailed in my previous comment
from strapi-tiptap-editor.
Related Issues (20)
- [question/suggestion] How to add highlight extension? HOT 1
- [question/suggestion] Inline-code, Image caption, Raw HTML...
- Not working with strapi v4.5.6 HOT 5
- RangeError: Adding different instances of a keyed plugin (plugin$) HOT 5
- Not working with strapi 4.6.0 HOT 2
- Editor is not detecting changes when typing HOT 11
- [BUG] Missing dep @tiptap/pm on version "^0.7.3" and up HOT 4
- Tiptip not focusable HOT 4
- [suggestion] Add text color to underline HOT 1
- How hide settings entry for no admin users? HOT 1
- how to add video
- editor adds nofollow atribute to all links created
- Table of contents HOT 1
- Warning with Node.js 20 (latest LTS) HOT 3
- TypeError: webpack.NormalModuleReplacementPlugin is not a constructor HOT 2
- How to paste html to editor correctly ?
- How to remove red asterix when marked as required false. HOT 1
- Support for Strapi v5
- Clone of this project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strapi-tiptap-editor.