1
我使用TinyMCE的编辑对我的Laravel应用程序的HTML代码。一切工作正常,但当我更改任何文本的颜色或背景颜色时,会出现一些问题。TinyMCE的编辑器生成的文字颜色和背景颜色变化,但不发送
tinymce.init({
selector: '#description',
extended_valid_elements : 'span',
verify_html: true,
height: 400,
theme: 'modern',
plugins: [
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
'searchreplace wordcount visualblocks visualchars code fullscreen',
'insertdatetime media nonbreaking save table contextmenu directionality',
'emoticons template paste textcolor colorpicker textpattern imagetools codesample toc'
],
toolbar1: 'undo redo | insert | styleselect | fontselect fontsizeselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
toolbar2: 'print preview media | forecolor backcolor emoticons | codesample | mybutton',
image_advtab: true,
image_title: true,
image_caption: true,
relative_urls: false,
theme_advanced_buttons1: "forecolor,backcolor,fontselect,fontsizeselect",
templates: [
{ title: 'Test template 1', content: 'Test 1' },
{ title: 'Test template 2', content: 'Test 2' },
],
});
如果您检查与DOM查看器的文本,并在HTML具有正确的内嵌样式属性呢?或者是一个处理规则的CSS样式表? – Ohgodwhy
是的,它生成内联的CSS。但是当我提交它时,它跳过了内联CSS。我正在更新我的问题。请看截图。 –
如果您使用TinyMCE的API来获取数据,它是否显示这种方式?类似'window.tinymce.get('myTextEditorID')。getContent()' – Ohgodwhy