HTML Post Editor

HTML Post Editor

Wordpress plugin

Install on Wordpress

App Details

The plugin adds HTML editor to the default post editor. The editor is accessible through a new HTML tab. When opening the tab the editor loads the raw HTML source of the post, formats it and applies Ace Editor to the input area. So the edit area has main features from this web editor: syntax highlight, line numbers, highlight of matching tags and brackets, keyboard shortcuts.

The plugin is based on the ACE Editor for WP plugin. It’s updated for WordPress 4.1 and Ace editor 1.1.8.

Features

  • Syntax highlighting
  • Line numbers
  • Line highlighting
  • Highlight of matching tags and brackets
  • Syntax checking
  • Multicursor
  • Ace Editor keyboard shortcuts
  • Search box
  • Resizable area
  • Emmet HTML snippets
  • Full screen mode
  • Toggle word wrap option
  • Custom shortcuts
  • Options page

Usage

  1. Before switching to the HTML tab first make sure you are on the Visual tab because the script loads the data from the TinyMCE editor which is loaded only when the Visual tab activates.
  2. When you are on the Text tab the HTML tab is disabled and has a light red background so you won’t be able to switch to it until you activate the Visual tab.
  3. When the HTML tab is activated the Text tab becomes disabled so you may only switch to the Visual tab. This is done to prevent the conflicts of content which is loaded when appropriate tab is activated.
  4. If you edit some content in the HTML mode and want to save it and update the post first switch to the Visual tab so the edited HTML code loads to the TinyMCE editor. It’s required because the content synchronization is performed only after switching off the HTML tab.

Working with features

  1. Multicursor lets you edit multiple regions at the same time. You can use default shortcuts to add remove regions or select multiple blocks with mouse holding Ctrl key.
  2. Default keyboard shortcuts for the Ace editor can be found on the Ace GitHub Wiki page or on the Ace Editor Shortcuts page I created for the WordPress version of this editor. Here I selected some shortcuts and organized them by categories.
  3. The Search box gives additional functions:
    • Search All instances
    • Use of Regular expressions
    • Whole word search
    • Replace content
    • Replace All
      It shows with Ctrl+F and Ctrl+H combinations.
  4. The editor area can be resized using the bottom (southern) handle but it doesn’t remember its size after switching.
  5. Emmet snippets are used to improve code typing. The documentation:
  6. Full screen mode is not a default Ace Editor feature. I’ve taken the idea from a demo page in the Ace build package. The page is named scrollable-page.html.
    It adds a new custom shortcut to the editor which toggles the full/normal mode. So I set this function to the F11 key.
    The function extends the editor container to the Wordpess admin boundaries but doesn’t hide top and left menus. It also works if the window size is changed or the left menu is collapsed. But to fill the available space in these cases the F11 key must be pressed two times when the editor is in the full screen mode.
    If you need to change this F11 key to other write me a request and I’ll add an option to the options page.
  7. The Word Wrap checkbox appears when the HTML tab is switched to. By default the editor has word wrapping enabled. You can toggle this option with the checkbox. But it only remembers its state in the current editor session.
  8. I’ve also added some custom shortcuts:
    • Ctrl+Enter adds a new line below the current one regardless of what is the current position the cursor on the current line
    • Ctrl+R switches to the Visual tab

The Options Page

  1. Font size of the editor may be set in any CSS units (px, pt, em).
  2. Editor themes dropdown shows default Ace Editor theme list plus my custom theme Sublime which is the default theme for the plugin.
  3. The options form is submitted using Ajax so the page doesn’t reload, just wait until the save button is enabled and the success message appears at the top. Then reload the edit post page to see the editor changes.

Other Notes

  1. Emmet plugin works on the specially built package for the Ace Editor. Its source is here. And I reduced its size by removing the Underscore.js part and CSS snippets. So the final package is here.
  2. When the HTML tab is loaded the source code is first represented as one long line. So I used the JS Beautifier tool and exactly its beautify-html.js subscript to format that line so it has some readable structure. Additionally I applied my own function to have some blank lines before <hx>, <p> and <pre> tags.
  3. I’ve put only the minified version of the Ace Editor scripts to the plugin package. To get the full uncompressed files go to its GitHub repository.

Resource Links

  1. Ace Editor Main Site and GitHub repository.
  2. Ace Builds GitHub repository with sources.
  3. Ace Editor Demo Pages.
  4. Ace Editor Keyboard Shortcuts and my edition.
  5. Emmet plugin: Main Site, Documentation, List of Abbreviations.
  6. Special Emmet package for the Ace Editor.
  7. JS Beautifier.

This plugin’s GitHub repository: https://github.com/mortalis13/html-post-editor.

Detected Problems

  • When switching to the full-screen mode (F11) and the “Enable full-height editor and distraction-free functionality” Screen option is enabled the post tabbar stays on the front.
  • If cursor doesn’t match its established position (e.g., should be in the line end after the last character but displays with offset to the left) try installing Consolas fonts to the Fonts folder (this problem detected in Windows XP where no Consolas fonts installed by default). Install all 4 types of Consolas (Regular, Bold, Italic, Bold Italic). I’ve taken them from Windows 7 Fonts folder.

Pricing

Starting from $0 per month.

Check Out the LinkedIn Feed Slider Widget

By Common Ninja

LinkedIn Feed SliderTry For Free!

App Info

Rating

Reviewers

3 reviews

Tags

ace-editor
admin
html
post editor
raw

Developed By

mortalis

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

LinkedIn Feed Slider for Wordpress logo

LinkedIn Feed Slider

Show LinkedIn posts with a slider that auto updates, presents content in a smooth layout, and keeps visitors engaged.

Contact Form for Wordpress logo

Contact Form

Use a contact form so visitors can send messages, submit inquiries, and help you collect leads and improve user experience.

Social Share Buttons for Wordpress logo

Social Share Buttons

Add social share buttons so visitors share content to major networks, boost engagement, and drive more referral traffic.

Restaurant Menu Flip Cards for Wordpress logo

Restaurant Menu Flip Cards

Present dishes with restaurant menu flip cards that highlight key details, help visitors explore options easily, and support confident ordering decisions.

Consent Form for Wordpress logo

Consent Form

Create consent forms that collect signatures, save submissions, send notifications, and help you manage approvals efficiently.

Card Carousel for Wordpress logo

Card Carousel

Showcase content with a card carousel that combines images and text, improves visual design, and helps visitors explore key information.

Social Proof for Wordpress logo

Social Proof

Show social proof that displays real user activity to build trust instantly, boost credibility, and help increase conversions across your site.

Social Proof Avatars for Wordpress logo

Social Proof Avatars

Display social proof avatars that show user activity and ratings, build trust instantly, and help visitors feel confident about your credibility.

News Ticker for Wordpress logo

News Ticker

Use a news ticker to display headlines and updates that highlight key information and keep users informed in real time.

Right Click Protection for Wordpress logo

Right Click Protection

Use right click protection to prevent copying by disabling right click actions, protecting your content and reducing unauthorized reuse on your site.

Instagram Feed for Wordpress logo

Instagram Feed

Show Instagram posts in a live feed that keeps content fresh, builds social proof, and helps visitors engage with your brand.

Currency Converter for Wordpress logo

Currency Converter

Add a currency converter to your site so users can view equivalent values in their local currency for easier global access.

More plugins

plugins You Might Like

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms