# How to have proper paragraphing for rich text editor to edit open AI output?

**URL:** <https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692>\
**Category:** How do I?\
**Created:** [May 16, 2023, 4:09am UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692 "2023-05-16T04:09:43Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [May 16, 2023, 4:09am UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/1 "2023-05-16T04:09:43Z")

</div>

I have content from open AI that displays fine when I display the data on an input form.

However, when I try to pass the same data to the “rich text editor” so that I can edit the output, all the paragraping is lost. How do I make sure the paragraphing happens properly?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/ca2bd748734ae4ee01b6ee15074ffb5246595a0b.png)

---

<div class="post-metadata">

**Author:** ![clncsports](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@clncsports](https://community.weweb.io/u/clncsports)\
**Post date:** [June 28, 2023, 3:08pm UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/2 "2023-06-28T15:08:29Z")

</div>

I’m running into the same issue with a slightly different use case. Bringing in markdown from my database that I want to edit using the rich text editor. Like you, I lose all paragraphing, which then of course effects the markdown formatting when I write it back to my DB.

@Joyce have any pointers you can share here? Thanks!

---

<div class="post-metadata">

**Author:** ![jaredgibb](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@jaredgibb](https://community.weweb.io/u/jaredgibb)\
**Post date:** [June 28, 2023, 4:59pm UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/3 "2023-06-28T16:59:58Z")

</div>

Use a gpt function call to properly format/coerce your data?! It’d allow you to return the text in a predictable format that you can expect and thus use in any environment, most of the time

---

<div class="post-metadata">

**Author:** ![mark](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mark/32/4163_2.png) [@mark](https://community.weweb.io/u/mark)\
**Post date:** [July 1, 2023, 5:21pm UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/4 "2023-07-01T17:21:38Z")

</div>

Has anyone been able to solve this yet?

This is really the only thing keeping me from building my app on WeWeb. We shouldn’t have to use GPT functions just to get simple formatting. GPT will return a completion properly, if there’s an issue displaying it only in a rich text input vs another element, that means the issue lies with WeWeb’s Rich Text element.

I’ve used multiple other No-Code and lowcode tools, they all handle this correctly without complicating things with Functions lol.

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [July 5, 2023, 1:39pm UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/5 "2023-07-05T13:39:57Z")

</div>

Hi @raelyn, you can open a bug ticket on [support.weweb.io](http://support.weweb.io) so we can allow time to improve the behavior 🙂

As a workaround, I think you need to apply the replace formula on the open ai result, to replace every `\n` occurence by `<br>` because it expect HTML for line breaks.

It works in my test project

 ![Capture d’écran 2023-07-05 à 15.38.15](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/6/6d2337c8101d5e61b0099764cba2496d71850cb6.png)  
 ![Capture d’écran 2023-07-05 à 15.37.57](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/d601e7f29d10b50ffdd0ce50a94c8da6e1bf46c0.png)

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [July 5, 2023, 1:41pm UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/6 "2023-07-05T13:41:30Z")

</div>

Sorry, markdown is not a supported format. You will need a custom rich text component. You can make a feature request on [feedback.weweb.io](http://feedback.weweb.io) so we can priorise it. 🙂

---

<div class="post-metadata">

**Author:** ![Vi56](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/vi56/32/11392_2.png) [@Vi56](https://community.weweb.io/u/Vi56)\
**Post date:** [October 20, 2023, 2:47pm UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/7 "2023-10-20T14:47:29Z")

</div>

Hello,  
@Alexis, has a solution been implemented? I am also looking for a solution to allow users to edit OpenAI-generated texts 🙂

Vivien

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [October 20, 2023, 2:51pm UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/8 "2023-10-20T14:51:48Z")

</div>

Almost! Its in QA. It should be released in the next two weeks. You will be able to toggle the output format and choose markdown instead html. The input format will be free, both will work.

A new image support will be added too.

---

<div class="post-metadata">

**Author:** ![Vi56](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/vi56/32/11392_2.png) [@Vi56](https://community.weweb.io/u/Vi56)\
**Post date:** [October 20, 2023, 3:11pm UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/9 "2023-10-20T15:11:49Z")

</div>

Awesome, can’t wait to see it 🙏

---

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [October 20, 2023, 4:50pm UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/10 "2023-10-20T16:50:23Z")

</div>

Amazing!!! Will it have the ability to change text alignment too? Thank you ☺

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [October 23, 2023, 9:24am UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/11 "2023-10-23T09:24:17Z")

</div>

It was not planned but I will add it as available component actions 🙂

---

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [October 23, 2023, 10:18am UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/12 "2023-10-23T10:18:13Z")

</div>

thank you!

---

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [November 7, 2023, 1:50am UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/13 "2023-11-07T01:50:32Z")

</div>

Hey Alexis!! Is this out yet? Can’t wait!

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [November 7, 2023, 9:02am UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/14 "2023-11-07T09:02:51Z")

</div>

Image has been released as a component action, text align and markdown support should be released tomorrow 🙂

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [November 7, 2023, 3:36pm UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/15 "2023-11-07T15:36:39Z")

</div>

I was wrong, it was released last week already @raelyn, you can find a new component action to trigger alignment too 🙂

---

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [November 8, 2023, 12:37am UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/16 "2023-11-08T00:37:29Z")

</div>

Oh! But is markdown supported already? How can I tell if it is? Haha…

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [November 8, 2023, 9:35am UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/17 "2023-11-08T09:35:40Z")

</div>

By typing markdown inside ? 😅

You also have a new option to choose the output format, if you prefer to export markdown in the component variable and in the on change event value.

---

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [November 8, 2023, 3:38pm UTC](https://community.weweb.io/t/how-to-have-proper-paragraphing-for-rich-text-editor-to-edit-open-ai-output/2692/18 "2023-11-08T15:38:11Z")

</div>

Oh yes! I see it \<3
