从tinymce表中删除填充

时间:2018-04-09 12:43:32

标签: asp.net-mvc tinymce

大家好我正在为后端webapp开发一个CRUD系统,我已经安装了tinymce,并在编辑页面中为它添加了脚本。

<script type="text/javascript">
        // Initialize your tinyMCE Editor with your preferred options
tinymce.init({
 selector: 'textarea',
 height: 200,
 theme: 'modern',
 plugins: 'print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount imagetools contextmenu colorpicker textpattern help',
 toolbar1: 'formatselect | bold underline italic strikethrough | backcolor forecolor | fontselect | fontsizeselect | alignleft aligncenter alignright alignjustify | table ',
 toolbar2: 'numlist bullist | outdent indent | removeformat | subscript superscript | link unlink',
 fontsize_formats: '7px 8px 9px 10px 11px 12px 13px 14px 15px 16px 17px 18px 19px 20px 21px 22px 23px 24px 25px 26px 27px 28px 29px 30px',
 image_advtab: true
});
</script>

问题出在表插件中,当我从编辑器中选择cellspacecellpadding时,它似乎正确保存,但当我进入该元素的视图页面时该表没有该属性。当我使用chrome中的开发人员工具时,我看到:

th, td {
  padding: 0
}

如果我禁用该表进入正确的维度...... 任何人都可以告诉我这是什么问题??

1 个答案:

答案 0 :(得分:0)

如果它在TinyMCE中看起来不正确,但在编辑器外部渲染时可能会导致页面的CSS导致更改。这似乎是基于您对开发工具中thtd填充的说明。