🤌 Rich text editor with real-time collaboration (Tiptap)

Hi @rico.trevisan I’ve been playing with collaborative editing. It looks really promising :+1:
One problem I keep having : when I open a tiptap with content that already exists on my app, it starts blank (I’m using auto-binding). I guess it has to do with the tiptap.dev API when you register a ā€˜document’. I have also tried to use ā€˜set content’ triggered when ā€˜tiptap is ready’ when I initiate the tiptap but it sometimes doubles the content (same text twice), usually when the doc is already registered (but I can’t seem to find the reason it happens).
Maybe one way around it would be to be to allow the user to set the content of the doc when it is initiated?
Any thoughts? Thanks

When using collab, don’t use Bubble’s autobinding nor initial content. Collab is a better version of autobinding. If you need to save them in Bubble, use the Tiptap webhooks / APIs.

1 Like

OK thanks @rico.trevisan. But then how would you go around objects that already have content on my app?
From what I understand, you wouldn’t even save the content in Bubble ? What if I need to show a static version of the content, without having to call Tiptap ?
What I’ve done so far that seems to be working is that I use the Tiptap API to register my docs first and then show them to the user. But I’m still using autobinding.
Thanks.

Hi @rico.trevisan,
Any plans on adding AI features to this plugin?
Something like notion-ai I mean.

Hey Rico, thank you for adding the image resizing update. I was playing around with it today to test it out…

These errors are thrown up in the dev console since the image resizing update. Do you know what’s causing them/ if it’s related to the resizing issues?

And some other notes:
1/ Similar to the issue you called out, an image resize isn’t recognised unless it’s between paragraphs, and if it’s already saved it won’t save the resize unless there’s a change in either of those paragraphs.

2/ Saved images bypass the ā€œinput disabledā€ rule so TipTap ignores the unchecked ā€œthis input is enabledā€ setting, allowing for unintended resizing. I can block it with the ā€œpointer-events: none;ā€ CSS but is there a way to add this natively?

3/ The image can be dragged beyond 100% width/ exceed the container width. I can add a CSS workaround (max-width: 100%) to stop it, but could this also be enforced natively?

Hi Rico, I love this plugin.
I have one issue with it and this could be user error on my part . I am using ā€œcontent is updatedā€ to save the updated text at HTML. However, at the end of the save, the cursor shifts to the end of the entire content instead of staying in the current position.
Is there anyway to keep the cursor in the same position as where the user was typing?

Hi Rico,
Great plugin :+1:
I switched all my text blocs a few weeks ago and really happy about it.
I’m just wondering, it seems to be acting up a bit when it’s in a floating group or a popup…
Could it be that the menus are ā€˜hidden’ on page load but then when the element appears, it can’t find them ?
I have this error :


Cheers,
Arthur

Hey @rico.trevisan
Is there a way to disable dropping items into a TipTap editor?

In my app, I have some draggable items, and if they’re accidentally dropped into the TipTap editor, they get inserted as raw HTML or JSON. I’d like to prevent that behavior if possible.

Thanks!

Hi Everyone!

I have scoured this post but cannot find the answer to this and might be a noob question. I am using the Tiptap editor to create HTML to send emails. Essentially what I am wondering, is using find&replace what I am supposed to do to format TipTap’s Content (HTML) saved as a text in the database for emails?

  1. For example H1 has styles attached in the tiptap but when the HTML is saved there is only the <h1>This is an h1</h1> tag rather than <h1 style="size: 4rem; color:#111111; font-weight:900; margin 3rem 0">This is an h1</h1> should I be doing a find&replace for <h1> and replace with <h1 style="size: 4rem; color:#111111; font-weight:900; margin 3rem 0"> after the HTML is saved as as text thing in my database?

  1. When I hit enter in the tiptap, the HTML creates a new paragraph element rather than a <br> so right now I can find&replace<p></p> in the HTML and replace with <br> but is clunky for a user when they paste some text with paragraphs in it because it looks like each line should have a <br> but it is a new <p> which means the resulting HTML will not have an empty row between each paragraph but in the tiptap it looks like it should (not WYSIWYG). So should I find </p><p> and replace with </p><br><p> when saving the HTML to create an actual new line? Am I doing this right or does someone have a better way?

Hey Everyone,

Has anyone had trouble with the initial content being a bit temperamental? I’ve got two text editors set up in the same way. They both have their initial content set up based on a field in the database. One works perfectly and the other doesn’t display any initial content, even when I change the initial content to text. The bizarre thing is that the working and non working text editors alternate in terms of which one is working.

Has anyone had similar issues or know a workaround?

Hmm… that doesn’t sound good. Share some details on how this is set up? Which version are you using?

In any case, it had been months since I last used Tiptap in production hence the lack of updates. However, since a few weeks I’ve been using it a lot. I realize the whole initial content, auto-binding, and updating non-autobound content is not good. It’s jerky, very error prone, moves the cursor around.

I’ll wait for v3 to be stable and then do an upgrade of the plugin.

1 Like

Hey Rico,

Great news about an updated version and upgrade. I’m on version 3.22.0

Here’s a breakdown of how it is set up

Data feed
I have a data table called ā€˜idea’. An idea contains a ā€˜Title’ and ā€˜Context’
ā€˜Context’ is a text type field.
The tiptap content is recorded as JSON.

Content to be displayed
The initial content of the tiptap is the context of the idea which has been selected.
The selected idea is stored in a custom state
The title follows the same logic as above, but uses a single-line input field. This works as expected.

Expected behaviour
The tiptap content reflects whatever idea is selected. If no idea is selected or the idea doesn’t heve context then the field should be empty

Actual behaviour
Sometimes the tiptap doesn’t load any content at all
Sometimes the tiptap loads the content of the current idea, unless the current idea has no content, in which case it displays the content from the last idea.

Neither of the above two behaviours are reliable, it switches between the two

Final note
I have a similar setup for a data table called ā€˜Problem’. That one had the same issues, and the Idea approach was fine, and then they switched. So now, the problem tiptap works most of the time and the Idea setup doesn’t

heyy! Nice plugin, im using it to build a screenplay editor using custom styles for headers. The collab mode works incredible… But there is a way that you add the page breaks feature? i think will be awesome to who is building printable documents like me so user can see where ends each page. Thanksss

You mean this extension: GitHub - adityayaduvanshi/tiptap-pagination-breaks: A Tiptap extension for pagination ?

yes!!! i have not used it so i dont really know how it looks like but i think that fits

i just saw there is also a extension called tiptap-pagination-plus , can work too.

This one can edit page headers and numbers.

@rico.trevisan Any chance of embedding videos hosted on Bubble or external URLs? b2b clients object to posting corporate videos on YouTube and then embedding them on TipTap.

Release 3.22.2 - bubble and floating menus float over any item

I realized there was a setting to fix it.

Give it a try and let me know if it fixes your problem.

2 Likes

Plugin action generate JWT key error:
Error: Cannot find module ā€˜jsonwebtoken’
Require stack:

  • /var/task/plugin_api_v4_alpha.js
  • /var/task/harness.js
  • /var/task/index.js
  • /var/runtime/index.mjs
    at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
    at Module._load (node:internal/modules/cjs/loader:981:27)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at eval (eval at build_function (/var/task/util/util_harness.js:37:12), :11:26)
    at eval (eval at build_function (/var/task/util/util_harness.js:37:12), :47:8)
    at /var/task/plugin_api_v4_alpha.js:197:35
    at harness (/var/task/harness.js:115:21)
    at /var/task/harness.js:152:70
    at withGlobalHandlers (/var/task/harness.js:66:41)

Thanks for the report, fixed it.