Vue + WordPress

Sign in with your oxdeer.com account to edit this post right here in your browser.

The meat and potatoes for this is in src->components->dashboard if you want to poke around. I’m using the following stuff:

WordPress

– Handling authentication using JWT Authentication for WP REST API

Vue App

– Webpack starter project spun up via Vue-cli

Axios for xhr requests

Vue2-medium-editor to get the rich editing functionality
(replaced with straight up MediumEditor.js due to discovered limitations).

lodash because it has useful things like _debounce() for saving

Cool Things

– The ability to bold, italicize, and underline is enable out of the box (including keyboard shortcuts).

– It’s easy to customize the toolbars for the editor. I’ve disabled the toolbar entirely for post titles and also disabled the ability to use the return key on them.

– There was an option in the Medium Editor to enable the auto-linking of URLs typed into the post content.

– I’m using Vuex to break state and supporting business logic into modular pieces. I can then map (using the ES6 spread operator) those actions into a Vue component. At this point there are modules for `user` and `posts`.

Not Cool Things

– I had to pause cloudflare on oxdeer.com since too many rapid requests (saving the post while editing, even with a 600ms debounce) would lead to getting a 403 with CloudFlare wanting my API requests to solve a captcha. Doh! At this point that means I’m effectively just using cloudflare as a DNS service. It seems like the ability to completely shut off their firewall is a paid feature…

One thought on “Vue + WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *