wordpress tinymce视觉编辑窗口没有拉伸为文本编辑

时间:2015-03-21 20:20:49

标签: tinymce

wp 4.1 tinymce advance 4.1.7

我在文本模式下将段落放在编辑区域中,没有任何HTML代码。

然后尝试查看它在视觉模式下的外观,但视觉模式不会延伸为文本编辑模式。

即使不是这样,编辑的bbpress上的前端页面,帖子和主题也按预期显示。

如何使视觉模式完全像文本模式一样拉伸?

我已经感谢那位让我知道的人了。

1 个答案:

答案 0 :(得分:0)

在codex中找到解决方案。在我的记忆中,只需将编辑器css文件放入子主题目录即可。

现在,Wordpress 4.1要求我们再做一个挂钩动作的任务。

将以下代码放入curent主题目录的functions.php中。



function my_theme_add_editor_styles() {
 add_editor_style( 'custom-editor-style.css' );
}

add_action( 'admin_init', 'my_theme_add_editor_styles' );

then, put the file, custom-editor-style.css, into same dir with scripted as below:

html .mceContentBody
{max-width:99%;}




相关问题