[wordpress插件] Always Edit In HTML一律以HTML编辑

wordpress 插件 文章 2020-02-17 00:30 492 0 全屏看文

AI助手支持GPT4.0

评分
86
描述

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.

如果您发现自己在WordPress页面/帖子编辑器中输入HTML代码只是为了使其格式化或在可视模式下更糟地被删除,那么这里是您的解决方案。

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.

始终在HTML中编辑是一个WordPress插件,可删除页面/帖子编辑器中的“可视”选项卡,并以HTML模式打开页面或帖子,以保留HTML代码。

Why would you need this plugin?

您为什么需要这个插件?

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

WordPress页面/帖子编辑器的右上角有两个选项卡-“视觉”和“文本”。

    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. “文本”选项卡允许您在页面或帖子上输入HTML代码,并且在保存或发布帖子时,它会按照您输入代码的方式保存代码。

    3. 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.
    4. “视觉”选项卡具有所有精美的书写样式工具,但是当您保存或发布页面或帖子时,WordPress会解析并格式化内容,这可能会导致HTML代码无法使用甚至被删除。

    WordPress does not remember the tab option for each page or post.

    WordPress不会记住每个页面或帖子的选项卡选项。

    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.<

    这意味着,如果您使用“可视”选项卡编辑帖子,将其保存,然后编辑您将HTML代码输入到的页面或帖子,则该页面将在可视模式下打开,您可以松开HTML代码。

    /p>

    / p>

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

    如果只有一个插件可以为您提供始终打开页面或以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.

    注意:对于WordPress 5.x用户,在安装并启用经典编辑器插件后,该插件仍然可以使用。

    It does not work with the Gutenberg block editor.

    它不适用于Gutenberg块编辑器。

    Plugin Page

    插件页面

    >Always Edit In HTML

    >始终以HTML格式编辑

安装步骤

    1. Download the plugin zip file & unzip it
    2. 下载插件zip文件并解压缩

    3. Copy the folder always-edit-in-html into the directory /wp-content/plugins/
    4. 将“ always-edit-in-html”文件夹复制到目录/ wp-content / plugins /

    5. Activate the plugin through the ‘Plugins’ menu in WordPress
    6. 通过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.

    打开页面,发布或公开声明的自定义帖子类型,现在您将在右列看到“始终以HTML编辑”选项框。

    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.

    下次打开同一页面或发布该页面时,它将以HTML模式打开,删除“视觉”和“文本”选项卡。

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

    随时取消选中该选项即可恢复“可视”和“文本”按钮以及默认的打开行为。

下载地址
https://downloads.wordpress.org/plugin/always-edit-in-html.2.4.1.zip
-EOF-

AI助手支持GPT4.0