Title: Always Edit In HTML
Author: DeveloperWil
Published: <strong>2011 年 4 月 4 日</strong>
Last modified: 2024 年 7 月 4 日

---

搜索插件

![](https://ps.w.org/always-edit-in-html/assets/banner-772x250.jpg?rev=1434816)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/always-edit-in-html/assets/icon-256x256.jpg?rev=1434816)

# Always Edit In HTML

 作者：[DeveloperWil](https://profiles.wordpress.org/developerwil/)

[下载](https://downloads.wordpress.org/plugin/always-edit-in-html.2.4.6.zip)

 * [详情](https://cn.wordpress.org/plugins/always-edit-in-html/#description)
 * [评价](https://cn.wordpress.org/plugins/always-edit-in-html/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/always-edit-in-html/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/always-edit-in-html/#developers)

 [支持](https://wordpress.org/support/plugin/always-edit-in-html/)

## 描述

If you find yourself entering HTML code into the WordPress page/post editor only
to have it reformatted or worse removed when in Visual mode then here is the solution
for you.

Always Edit In HTML is a WordPress plugin that removes the “Visual” tab in the page/
post editor and opens up your page or post in HTML mode, preserving your HTML code.

_Why would you need this plugin?_

The WordPress page/post editor has two tabs at the top right – “Visual” and “Text”.

 1. The Text tab allows you to enter HTML code onto the page or post and when saving
    or publishing the post it preserves your code just the way you entered it.
 2. The Visual tab has all the fancy writing style tools but when you save or publish
    your page or post, WordPress parses and formats the content which may results in
    your HTML code not working or even being removed.

WordPress does not remember the tab option for each page or post. It will open up
a page or post using whichever Visual or Text tab you last used.

This means that if you were editing a post using the Visual tab, saved it and then
edited the page or post you had entered the HTML code into, that page would open
in Visual mode and you could loose your HTML code.

If only there was a plugin that gave you the option to always open up a page or 
post in HTML

Ta da! Here’s one.

Note: For WordPress 5.x users, this plugin will still work when the Classic Editor
plugin is installed and enabled. It does not work with the Gutenberg block editor.

#### 插件页面

[Always Edit In HTML](http://www.limecanvas.com/wordpress-plugins/always-edit-in-html-wordpress-plugin/)

## 屏幕截图

[⌊Always edit in HTML options box.  Check to turn on.⌉⌊Always edit in HTML options
box.  Check to turn on.⌉[

Always edit in HTML options box. Check to turn on.

[⌊Option turned on and page/post is in HTML mode.  Visual and Text tabs removed.⌉⌊
Option turned on and page/post is in HTML mode.  Visual and Text tabs removed.⌉[

Option turned on and page/post is in HTML mode. Visual and Text tabs removed.

## 安装

 1. Download the plugin zip file & unzip it
 2. Copy the folder always-edit-in-html into the directory /wp-content/plugins/
 3. 通过WordPress的“插件”菜单激活插件

Open up a page, post or publicly declared custom post type and you will now see 
the “Always Edit In HTML” option box on the right column.

Check the option and save.

Next time you open the same page or post it will open up in HTML mode, removing 
the “Visual” and “Text” tabs.

Uncheck the option at any time to get the “Visual” and “Text” buttons and default
opening behaviour back.

## 常见问题

### Does the plugin do anything else?

Nope.

## 评价

![](https://secure.gravatar.com/avatar/3055a1a1216777873b53351c78cd5baae97874e62a5c850dbd02c2523357e0eb?
s=60&d=retro&r=g)

### 󠀁[Works with WordPress 5.7.3 & PHP 7.0](https://wordpress.org/support/topic/works-with-wordpress-5-7-3-php-7-0/)󠁿

 [doctordada](https://profiles.wordpress.org/doctordada/) 2021 年 9 月 24 日

Despite WordPress’s “Add Plugin” saying that it couldn’t install this because it
doesn’t work with my version of PHP (7.0), I was able to download it as a ZIP, upload
it to my site, install it and activate it. And it works fine, in conjunction with
the Classic Editor plugin. It’s great that it works on a page-by-page/post-by-post
basis, because there are pages that I’d prefer had a visual editor for others to
edit. But for pages that WordPress wants to “mess up”, it’s great to be able to 
tell it: “Hands off!”

![](https://secure.gravatar.com/avatar/2e1090b67336e457dfef9de85722e76db94982b62b0207c9e7c846ad3662ceda?
s=60&d=retro&r=g)

### 󠀁[simple and efficient](https://wordpress.org/support/topic/simple-and-efficient-165/)󠁿

 [nickperry](https://profiles.wordpress.org/nickpergoot/) 2017 年 9 月 22 日

It does what it’s supposed to do. Who needs more ?

![](https://secure.gravatar.com/avatar/f9893959c46c71b8f3a4ac2c711edaa51910c0859d1570b8fc15a1e6102bb73f?
s=60&d=retro&r=g)

### 󠀁[Works perfectly with WP 4.8](https://wordpress.org/support/topic/works-perfectly-with-wp-4-8/)󠁿

 [dragonfly67](https://profiles.wordpress.org/dragonfly67/) 2017 年 7 月 1 日

great plugin, never loosing html code anymore. no br or p tags anymore. Great plugin,
thanks

 [ 阅读所有7条评价 ](https://wordpress.org/support/plugin/always-edit-in-html/reviews/)

## 贡献者及开发者

「Always Edit In HTML」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ DeveloperWil ](https://profiles.wordpress.org/developerwil/)

[帮助将「Always Edit In HTML」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/always-edit-in-html)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/always-edit-in-html/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/always-edit-in-html/)，或通过[RSS](https://plugins.trac.wordpress.org/log/always-edit-in-html/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/always-edit-in-html/)。

## 更新日志

#### 2.4.6

 * Tested on WordPress 6.6 with Classic Editor plugin activated
 * Added tag Requires Plugins: classic-editor

#### 2.4.5

 * Testing on WordPress 6.2 with Classic Editor plugin activated

#### 2.4.4

 * Fixed PHP fatal error in PHP 8.x

#### 2.4.3

 * Tested on WordPress 6.0 with Classic Editor plugin activated

#### 2.4.2

 * Tested on WordPress 5.6 with Classic Editor plugin activated

#### 2.4.1

 * Tested on WordPress 5.0.3 with Classic Editor plugin activated
 * Added note to readme – this plugin works on 5.0 in conjunction with the Classic
   Editor plugin

#### 2.4.0

 * Moved to minor release versioning (added extra .0)
 * Tested on WordPress 4.8.1
 * Added Requires PHP tag

#### 2.3

 * Corrected spelling mistake

#### 2.2

 * Changed PayPal donate link from Gravitational FX to Zero Point Development
 * Tested on WordPress 4.7
 * Corrected changelog version for limecanvas removal

#### 2.1

 * Added correct contributor DeveloperWil
 * Updated screen shots
 * Brand image replacement with Zero Point Development mark
 * Changed all references of “HTML tab” to “Text tab”
 * Checked compatibility with 4.5.2
 * Removed limecanvas contributor

#### 2.0

 * Checked compatibility with 4.4
 * Changed contributor to DeveloperWil

#### 1.9

 * Checked compatibility with 4.3

#### 1.8

 * Checked compatibility with 4.2.2
 * Changed some mentions of “HTML” to “Text” for the reference to the editor tabs.
 * Now supports any publicly declared custom post types

#### 1.7

 * Checked compatibility with 4.1.1
 * Modified to work with UI changes from 4.1

#### 1.6

 * Checked compatibility with 4.1
 * Added asset icon
 * Addressed PHP notice generated by not checking to see if the wpnonce exists before
   verifying in *_save_postdata

#### 1.5

 * Checked compatibility with 4.0
 * Changed getHTMLEditStatus() function name to always_edit_in_html_get_html_edit_status()

#### 1.4

 * Checks to make sure we’re in the backend Dashboard
 * Checks to make sure the global $post is set
 * Checked compatibility with 3.9.1

#### 1.3

 * Fixed the bug that opened the window in Visual mode even though the tab was missing–
   doh!
 * Checked compatibility with 3.9 RC1

#### 1.2

 * Tested with 3.5.1
 * Now works with textarea HTML attribute
 * Added language support

#### 1.1

 * Tested with 3.4 (beta 4).

#### 1.0

 * Initial release.

## 额外信息

 *  版本 **2.4.6**
 *  最后更新：**2 年前**
 *  活跃安装数量 **1,000+**
 *  WordPress 版本 ** 5.2 或更高版本 **
 *  已测试的最高版本为 **6.6.5**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/always-edit-in-html/)
 * 标签
 * [HTML Mode](https://cn.wordpress.org/plugins/tags/html-mode/)
 *  [高级视图](https://cn.wordpress.org/plugins/always-edit-in-html/advanced/)

## 评级

 4.4 星（最高 5 星）。

 *  [  6 条 5 星评价     ](https://wordpress.org/support/plugin/always-edit-in-html/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/always-edit-in-html/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/always-edit-in-html/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/always-edit-in-html/reviews/?filter=2)
 *  [  1 条 1 星评价     ](https://wordpress.org/support/plugin/always-edit-in-html/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/always-edit-in-html/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/always-edit-in-html/reviews/)

## 贡献者

 *   [ DeveloperWil ](https://profiles.wordpress.org/developerwil/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/always-edit-in-html/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BEUW6MXMN7WWE)