You can use froala sdk for the rich editor in python. Please checkout this repo : https://github.com/froala/wysiwyg-editor-python-sdk?tab=readme-ov-file
Alternatively, you can use JS editor like quill. https://quilljs.com/docs/quickstart