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.