Wordpress WP_editor()HTML格式

时间:2017-04-19 15:14:00

标签: php html wordpress formatting

我今天在Wordpress插件上使用漂亮的WP_Editor()

工作

但是这个编辑器并没有格式化他们的HTML,每次我用编辑器添加一些html文本并将其正确保存为数据库中的帖子,一切都很好。但是当我将这个html字符串数据发布到我的WP_Editor()时,它搞砸了。

他们的解决方案是在wp_editor中使用正确的格式来查看html吗?

非常感谢!

P.S。我的代码:

$settings_desc = array(
   'textarea_name' => 'description',
   'mode' => 'specific_textareas',
   'editor_selector' => 'theEditor',
   'width' => '100%',
   'theme' => 'advanced',
   'skin' => 'wp_theme',
   'theme_advanced_buttons1' => 'bold,italic,strikethrough,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,|,link,unlink,wp_more,|,spellchecker,fullscreen,wp_adv',
   'theme_advanced_buttons2' => 'formatselect,underline,justifyfull,forecolor,|,pastetext,pasteword,removeformat,|,media,charmap,|,outdent,indent,|,undo,redo,wp_help',
   'theme_advanced_buttons3' => '',
   'theme_advanced_buttons4' => '',
   'language' => 'de',
   'spellchecker_languages' => 'English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,+German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv',
   'theme_advanced_toolbar_location' => 'top',
   'theme_advanced_toolbar_align' => 'left',
   'theme_advanced_statusbar_location' => 'bottom',
   'theme_advanced_resizing' => true,
   'theme_advanced_resize_horizontal' => false,
   'dialog_type' => 'modal',
   'relative_urls' => false,
   'remove_script_host' => false,
   'convert_urls' => false,
   'apply_source_formatting' => false,
   'remove_linebreaks' => true,
   'gecko_spellcheck' => true,
   'entities' => '38,amp,60,lt,62,gt',
   'accessibility_focus' => true,
   'tabfocus_elements' => 'major-publishing-actions',
   'media_strict' => false,
   'paste_remove_styles' => true,
   'paste_remove_spans' => true,
   'paste_strip_class_attributes' => 'all',
   'wpeditimage_disable_captions' => false,
   'plugins' => 'safari,inlinepopups,spellchecker,paste,wordpress,media,fullscreen,wpeditimage,wpgallery,tabfocus',
 );

0 个答案:

没有答案