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?
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!
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
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.
Hi @raelyn, you can open a bug ticket on 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.
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 so we can priorise it.
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.