I have a django model with a text box. I use a rich text editor (nicEdit) on the admin site so that the client can easily enter markup in the field. I would like to process the contents of the field and perform a few actions before anything is inserted into the database.
For example, I want to delete garbage generated by MS Word, font tags, etc. I hope this part should be simple, but I'm not sure what needs to be redefined or hooked to make it work.
I also want to detect deleted links, load the local copy in MEDIA_ROOT and forward img src to the local image. I'm not quite sure what to do with the remote image; I thought it django.Storagemight help, but it seems like it cannot extract content from the remote URL.
Any suggestions?
source
share