Trying to make a rich editor plugin with @tiptap/extension-invisible-characters

Followed the doc. I have no console errors and the js is imported. But it looks like the plugin is not loaded. The commands don't exist in the editor $getEditor()?.commands.toggleInvisibleCharacters() Uncaught TypeError: $getEditor(...)?.commands.toggleInvisibleCharacters is not a function Any idea ?
4 Replies
awcodes
awcodes2w ago
Can you provide a reproduction repo?
Fabien K.
Fabien K.OP2w ago
Yes: here it is. https://github.com/FDT2k/richeditor-plugin-test the build script is in bin/build.js like the example in the docs.
GitHub
GitHub - FDT2k/richeditor-plugin-test
Contribute to FDT2k/richeditor-plugin-test development by creating an account on GitHub.
Fabien K.
Fabien K.OP2w ago
for what I could dig up, the build script shown in the doc does not work. When loading the extension, (in getExtensions) the import default is "undefined"
awcodes
awcodes2w ago
yea, i think it has something to do with the platform: 'browser' in your build step, as best I can tell. My custom extensions in a plugin I'm working on are working fine with platform: 'neutral'

Did you find this page helpful?