in code (source) editor of tinymce, when want add span or i element classes (for example, when want add font awesome icon) - tinymce removes classes. example, if want add:
<span class="fa fa-university"></span>
at end have just:
<span></span>
also, in source code editor tried add <i class="fa fa-university"></i>
problem same - classes deleted tinymce (<i></i>
).
i using tinymce v4.4.1 , these settings:
tinymce.init({ selector: '#body', height: 500, theme: 'modern', plugins: [ 'advlist autolink lists link image charmap preview hr anchor pagebreak', 'searchreplace wordcount visualblocks visualchars code fullscreen', 'insertdatetime media nonbreaking save table contextmenu directionality', 'emoticons template paste textcolor colorpicker textpattern codesample fontawesome noneditable' ], toolbar1: 'insertfile undo redo | formatselect fontselect fontsizeselect fontawesome', toolbar2: 'bold italic underline strikethrough forecolor backcolor removeformat superscript subscript | alignleft aligncenter alignright alignjustify | outdent indent', toolbar3: 'code preview | link unlink anchor image media | codesample | bullist numlist table blockquote hr nonbreaking | charmap emoticons | visualchars visualblocks', image_advtab: true, relative_urls: false, extended_valid_elements: 'span', content_css: '/css/all.css' // includes fontwawesome... });
try adding following tinymce configuration:
valid_elements: "*[*]"
when can add <span>
reference without issue.
Comments
Post a Comment