2013-01-22 46 views
1

由於某種原因,當我使用按鈕創建項目符號列表時,由於某種原因,Wordpress中的所見即所得編輯器會自動添加帶樣式的跨度類。這非常令人討厭,因爲我希望我的文本具有一定的大小,但span類會對樣式進行硬編碼,並且會使尺寸變大。Wordpress所見即所得編輯器自動添加樣式的跨度類

有誰知道如何去除這個自動添加span類?

這個網站是針對客戶,他/她不知道如何使用HTML,這就是爲什麼這必須與所見即所得編輯器一起工作。

非常感謝。謝謝。

+0

當我在WordPress所見即所得編輯器中創建項目符號列表時,我沒有得到相同的行爲 - 只是一個標準的,乾淨的無序列表。你能給我們更詳細的信息嗎? –

回答

0

我有同樣的問題,我不是抄襲,每個I創建列表時,編輯器中的代碼添加:

文本

到列表的文本。

我該如何擺脫這個?


我剛纔發現,在該職位對我來說有效的解決方案: http://wordpress.org/support/topic/strange-behaviour-making-lists-in-the-visual-editor

如果您使用子主題,只需添加此功能,您的functions.php文件:

/** 
* I want to use the basic 2012 theme but don't want TinyMCE to create 
* unwanted HTML. By removing editor-style.css from the $editor_styles 
* global, this code effectively undoes the call to add_editor_style() 
*/ 
add_action('after_setup_theme', 'foobar_setup', 11); 
function foobar_setup() { 
    global $editor_styles; 
    $editor_styles = array(); 
}