You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How would I change the following code to take the text from TinyMCE editor, and add the formatted GPT3 output into the same TinyMCE editor instead of an <input></input> box?
I could not come up with or find a solution to this for the past week, and any help would be much appreciated.
I made the following function to activate when a button is clicked, and <input></input> box contains the input content, in which GPT3 output goes into the TinyMCE editor only after clicking the button twice which is not something I want.
It would be best to have the output appear after GPT3 outputs which could take a couple of seconds depending on how big the input was.
When outputting the GPT3 output into the tinymce editor, the format in which the output was in, is removed which I do not know how to fix it, although when it is outputted into a <input></input> box, the format stays the same.
E.g.
Incorrect format put into TinyMCE Editor.
Hello,Are there any spots left? My son was able to secure a grant through his school for the program. I need to know the exact total and how to pay for it Jane
Correct format that is put into the <input></input> box.
Hello,
Are there any spots left? My son was able to secure a grant through his school for the program. I need to know the exact total and how to pay for it
Jane
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
How would I change the following code to take the text from TinyMCE editor, and add the formatted GPT3 output into the same TinyMCE editor instead of an
<input></input>
box?I could not come up with or find a solution to this for the past week, and any help would be much appreciated.
For reproduction, the following link contains the GitHub repository.
https://github.com/harish-garg/nextjs-reactjs-gpt-3/blob/main/pages/index.js
I made the following function to activate when a button is clicked, and
<input></input>
box contains the input content, in which GPT3 output goes into the TinyMCE editor only after clicking the button twice which is not something I want.It would be best to have the output appear after GPT3 outputs which could take a couple of seconds depending on how big the input was.
I could always add the following
wait
function, but that is not what is needed, something like aisLoading ?
would be better.When outputting the GPT3 output into the
tinymce editor
, the format in which the output was in, is removed which I do not know how to fix it, although when it is outputted into a<input></input>
box, the format stays the same.E.g.
Incorrect format put into
TinyMCE Editor
.Correct format that is put into the
<input></input>
box.Beta Was this translation helpful? Give feedback.
All reactions