Когда я использую функцию html.insert с Froala, она удаляет встроенные стили.
Использование редактора выглядит следующим образом:
$('.fr-view').froalaEditor({
// Set custom buttons with separator between them.
toolbarButtons: ['paragraphFormat', 'bold', 'italic', 'strikeThrough', 'formatOL', 'formatUL', 'clearFormatting', 'link', 'unlink', 'myButton', 'image', 'blockquote', 'html'],
paragraphFormatSelection: true,
refreshAfterCallback: true,
imageEditButtons: ['replaceImage', 'imageDisplay', 'imageAlign', 'imageRemove'],
linkEditButtons: ['linkOpen', 'linkRemove'],
linkNoReferrer: false,
htmlAllowedTags: ['.*'],
htmlRemoveTags: ['']
});
Функция вставки Html выглядит следующим образом:
$('.fr-view').froalaEditor('html.insert', '<a href="' + imgLink + '" target="_self" ><img src="' + finalImgSrc + '" style="' + imgStyle + '" alt="' + altTitle + '" title="' + altTitle + '" /></a>', true);
У кого-нибудь есть идеи, почему встроенные стили удаляются?