0

当我在微型 mce 编辑器中更改字体大小或字体样式并点击保存并查看我的页面时,它会在表单上显示正确的字体大小和样式。
当我再次打开编辑器时,编辑器不会显示正确的字体大小或样式。(仅 IE9 问题)。IE9 不显示之前选择和保存的 fone 的样式和大小。Firefox 显示它正确。

HTML

            <textarea class="news-copy"
                        data-bind="
                            tinymce: Copy,
                            tinymceOptions: { 
                                plugins: 'paste,searchreplace',
                                content_css: 'Styles/ControlCSS/MainPage.css',
                                toolbar2: 'fontselect,fontsizeselect',
                                menubar: false,
                                statusbar: false,
                                browser_spellcheck: true,
                                valid_elements: '',
                                body_class: 'mainpage-container-text'
                            },                              
                            autoActivate: false">
            </textarea> 

IE9

IE9

Firefox 火狐图片 似乎一些清理实用程序正在删除 IE 中带有字体大小的 span 标签。

    <html>
<head xmlns="http://www.w3.org/1999/xhtml">
<meta content="IE=7" http-equiv="X-UA-Compatible">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<link rel="stylesheet" type="text/css" href="http://localhost/myapplication/Scripts/tiny_mce/themes/advanced/skins/o2k7/content.css">
<link rel="stylesheet" type="text/css" href="http://localhost/myapplication/Styles/ControlCSS/MainPage.css">
</head>
<body dir="ltr" id="tinymce" onload="window.parent.tinyMCE.get('mce_0').onLoad.dispatch();" class="mceContentBody mainpage-container-text" contentEditable="true">
<p>Hello Test &nbsp; &nbsp; Test1
</p>
</body>

火狐——萤火虫

<html>
<head xmlns="http://www.w3.org/1999/xhtml">
<meta content="IE=7" http-equiv="X-UA-Compatible">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<link href="http://localhost/myapplication/Scripts/tiny_mce/themes/advanced/skins/o2k7/content.css" rel="stylesheet" type="text/css">
<link href="http://localhost/myapplication/Styles/ControlCSS/MainPage.css" rel="stylesheet" type="text/css">
</head>
<body contenteditable="true" onload="window.parent.tinyMCE.get('mce_0').onLoad.dispatch();" class="mceContentBody mainpage-container-text" id="tinymce" spellcheck="false" dir="ltr">
<p>Hello 
<span data-mce-style="font-size: 14pt;" style="font-size: 14pt;">Test &nbsp; &nbsp;</span> 
<span data-mce-style="font-size: 18pt;" style="font-size: 18pt;">Test1</span>
</p>
</body>

微型 MCE 配置

 tinymceOptions: {
                // Default Theme options:
                // "setup" can not be overridden instead use onBeforeTinyMCESetup and onAfterTinyMCESetup
                mode: 'none',
                theme: 'advanced',
                plugins: 'paste,searchreplace,legacyoutput',
                skin: 'o2k7',
                skin_variant: 'silver',
                content_css: '../../Styles/RadEditor_CourierNew.css',
                paste_auto_cleanup_on_paste: true,
                valid_elements: '@[align],b/strong,i/em,strike/s,u,br,p,div',
                theme_advanced_buttons1: 
                    'bold,italic,underline,strikethrough,' +
                    '|,cut,copy,paste,selectall,' +
                    '|,undo,redo,' + 
                    '|,justifyleft,justifycenter,justifyright,justifyfull,' +
                    '|,search,replace,help,spellcheck',
                theme_advanced_buttons2: '',
                theme_advanced_buttons3: '',
                theme_advanced_toolbar_location: 'top',
                theme_advanced_toolbar_align: 'left'
            },
            radSpellCheckID: null,
            onBeforeTinyMCESetup: null,
            onAfterTinyMCESetup: null,
            onTinyMCEBlur: null,
            delayEditorDisplay: true,
            htmlEncode: true,
            displayFontFamily: 'Arial, Helvetica, sans-serif',
            displayFontSize: '11px'
        };
4

1 回答 1

0
 value = ko.utils.unwrapObservable(valueAccessor());

 ed.onInit.add(function(ed) {
                           $element.tinymce().setContent(value, { format: 'raw' });
                        });
于 2013-07-18T14:09:53.990 回答