При редактировании текста tinymce выводит текст в своем редакторе в таком виде
<p><span style="text-decoration: line-through;">111111111</span></p>
Как решить эту проблему?
Либо, когда я меняю поле на
HTMLField
Вот код скрипта, что в HTML шаблоне:
<script>
tinymce.init({
selector: '#mytextarea',
width: 600,
height: 300,
plugins: [
'advlist autolink link image lists charmap print preview hr anchor pagebreak',
'searchreplace wordcount visualblocks code fullscreen insertdatetime media nonbreaking',
'table emoticons template paste help'
],
toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | ' +
'bullist numlist outdent indent | link image | print preview media fullscreen | ' +
'forecolor backcolor emoticons | help',
menu: {
favs: {title: 'My Favorites', items: 'code visualaid | searchreplace | emoticons'}
},
entity_encoding : "raw",
menubar: 'favs file edit view insert format tools table help',
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
});
</script>
Вот код из настроек проекта:
TINYMCE_JS_URL = os.path.join(BASE_DIR, 'notes/js/tinymce/tinymce.min.js')
TINYMCE_SPELLCHECKER = True
TINYMCE_COMPRESSOR = True
TINYMCE_DEFAULT_CONFIG = {
'theme_advanced_toolbar_location': 'top',
'theme_advanced_buttons1': 'bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,hr,|,undo,redo',
'theme_advanced_buttons2': 'cut,copy,paste,pastetext,pasteword,|,search,replace,|,link,unlink,charmap,|,visualaid,table,|,blockquote,sub,sup,|,preview,code,emotions,image',
'theme_advanced_buttons3': '',
'theme_advanced_resizing': True,
}