How to wrap text in Streamlit data_edit?

I have read this posts.
How to display long text in Streamlit dataframes with automatic line breaks?

However, this post uses dataframe, and I want to know how to use the data_editor to wrap text.

This is my code.

    new_data = rename_data.drop(columns=["account", "id"])

    st.data_editor(
        new_data.to_html(escape=False),
        key="my_key",
        column_config={
               "回饋類型": st.column_config.SelectboxColumn(
                   help="choose the reason",
                   width="medium",
                   options=[
                       "原因A",
                       "原因B",
                       "原因C",
                       "其他原因",
                   ],
                   required=True,
               ),
        },
       disabled=["問題類型", "問題內容", "機器人回覆內容", "最後更新時間"],
       hide_index = True,
    )
    change_btn = st.button("確認變更")

    if change_btn:

        edit = st.session_state["my_key"]['edited_rows']

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.