如何在wordpress编辑器中删除

时间:2016-10-21 09:59:29

标签: php html wordpress editor

为什么我进入wordpress编辑器,当我从MS Word复制并粘贴文本时。 怎么解决? 我尝试使用str_replace它不工作?

它在手机上显示时看起来很难看。 这是截图。

enter image description here

2 个答案:

答案 0 :(得分:0)

从此处enter image description here删除
标签 在df之前做退格; lkgmjkdflgdf`和; ldfgkhd; f
我希望这会让你感到高兴。

答案 1 :(得分:0)

您可以使用以下任一解决方案:

$content = preg_replace( '/\s+/', ' ', get_the_content() );

echo $content;

或者

$content = str_replace(' '," ",get_the_content());

$content = preg_replace( '/\s+/', ' ', $content );

echo $content;

如果尚未创建子主题,请创建它。然后复制粘贴发生这种情况的页面的源文件(如single.php),并将get_the_content()替换为上述之一。根据实际问题。

Original source

编辑:我同意其他人的意见,最好向客户解释为什么如果他们不使用Word或者如果他们这样做会更好,他们会先将它粘贴在记事本上以删除样式。< / p>