Color me skeptical, but I couldn’t not share this after our discussion last month: http://htmltowordpress.io
Does anyone actually use this plugin on sites and care about updates? Please leave a comment if you use it so I can know to keep sharing updates here.
This morning, I noticed that the TinyMCE modifications I make to all client sites were incompatible with the new Distraction Free Writing Mode in WordPress 4.1.
Happy New Year everyone!
Hi Everyone, Mark here.
As I mentioned at the last meetup, WordPress 3.9 comes with TinyMCE 4.0 which breaks the old plugin I had distributed to the group to modify the editor.
Since most of my client sites use that plugin (or just code), I’ve gone out and figured out how to make similar changes in a new plugin. TinyMCE 4.0 works a little differently, so the formats dropdown takes a minute to get used to. As best I can tell, there is no way around this.
I’ve posted the new plugin on GitHub with a gist which is also embedded below.
That includes a:
- Base Plugin
- Filter example
Here’s how it looks in action:
A Few More Notes
As I posted on Twitter recently:
I don’t have much patience for “creative” formatting, so I’ve gone quite far in that direction by removing even more buttons including all alignment buttons. I also moved blockquote and strikethrough to the format drop down as I think they both make more sense there.I also personally don’t use the More tag so I’ve stripped that out. For certain client sites, I’ll probably add the horizontal rule button with the
mrw_mce_style_formats filter. I’m not opposed to formatting text, but the only way I’m willing to do it is with custom Text Styles defined by me.
Once I did that, there was space to move all the remaining buttons to the top row of the editor. I love that!
Finally, you’ll notice in the example filter that I use a
"selector" attribute so that the style can only be applied to links. This is AWESOME and solves a big headache I’ve previously run into where you can’t be sure if a class to make a button gets put on the
<p> tag or the
Since WordPress can embed gists, I might as well!
Throughout last month, I put a lot of work into my custom fork of the _s theme that I use for development. I had two new projects to develop so I’ve been using those to clarify the changes I make at the start of most projects. I thought I’d share it for anyone who wants to take a look.
- Adding SASS (including the Compass and Breakpoint libraries and the “Frameless” responsive columns technique).
- Switching in a normalize css sheet instead of a reset.
- Adding some mu-plugins to handle post types, taxonomies, WordPress customizations etc.
If anyone has ideas or thoughts, feel free to respond in the comments or over on GitHub.