Anyone know how to insert text at cursor in a rich text editor?

Greetings, community! Looking for a way to insert tags/text into Bubble’s rich text editor. I found this really helpful solution (link) for normal inputs/multi-line inputs, but this doesn’t work for rich text editors.

Anyone have a brilliant idea on how to achieve this? Figure it likely just involves a slight modification to the code.

Try the Insert at cursor plugin. Select the contenteditable action

Hey @Jici! Thanks for the suggestion. I had considered that, but the problem I’ve found with that plugin is it adds content to ANY element. Since the plugin doesn’t include the option to scope to one element, it gets a bit out of hand.

Have you found any sort of solution on that?

hey @eLPDev!
I wrote a tutorial once on adding tags to cursor point to richtext and normal input fields. here you go: https://medium.com/a-song-of-art-science/how-to-change-input-value-based-on-action-in-bubble-io-1c8e97316430
it dies not use any plugins though. Hope it helps!

Thanks for the reply, @hanan1! Unfortunately, this doesn’t quite achieve the desired result as this doesn’t insert anywhere in the text but only appends content to the end.

For example, I’m hoping to find a solution that lets me insert #low-code into the following sentence in a rich text editor at the point marked in bold italics:

I love low-code solutions! —> I love #low-code solutions.

This topic was automatically closed after 70 days. New replies are no longer allowed.