Using Quill text editor for my Streamlit app - the Editor keeps disappearing

The code for Quill text editor is below, the app generates response when user clicks “submit” button, but the response and quill text editor both disappears within few seconds.

if submit:
        # This below code is for Generating the Response: Used get_LLM_response function for the same
        # input parameters used 1.prompt  2.context   3.vector_store   4.content_type 
        context = " ".join([doc.page_content for doc in documents])
        response = get_LLM_response(prompt, context, vector_store,content_type)
        st.write(response)


        # The below code is for Text Editor component: Used Quill for the text editor
        edited_text = st_quill(value=response, placeholder="Edit the generated content here...", key='textEditor')

        # Save the edited text in session state
        if st.button("Save"):
            st.session_state['textEditor'] = edited_text

        # Display the saved text from session state if available
        if 'textEditor' in st.session_state:
            st.write(st.session_state['textEditor'])

Expected Behaviour : display both the response as well as the text editor with value=response
Actual Behaviour : The response and text editor disappears as the app runs