diff --git a/src/content/blog/02.good-ux-and-giving-birth.md b/src/content/blog/02.good-ux-and-giving-birth.md index 4a35a3fb..ad0345fc 100644 --- a/src/content/blog/02.good-ux-and-giving-birth.md +++ b/src/content/blog/02.good-ux-and-giving-birth.md @@ -14,7 +14,7 @@ Over the last few days my wife and I have been enjoying him and discovering what We had a home birth; he was born under the cosy light of our Christmas tree. My wife opted not to have pain relief, instead focusing on relaxing and letting her body take the lead. -### Introducing Freya +## Introducing Freya A game-changing moment was when we fired up [Freya](https://apps.apple.com/gb/app/freya-surge-timer/id1447509164). Freya is one of many iOS and Android apps for support in labour. But I think it's head-and-shoulders above the rest. @@ -24,7 +24,7 @@ Their mission is to empower women and their birth partners. That resonated with ![The Positive Birth Company video still](/img/pbc.jpg) -### Aesthetics and purpose +## Aesthetics and purpose I mention Freya because I think its interface is noteworthy. diff --git a/src/content/blog/04.building-your-own-vue-rich-text-component.md b/src/content/blog/04.building-your-own-vue-rich-text-component.md index 83eb7c0c..007dcb42 100644 --- a/src/content/blog/04.building-your-own-vue-rich-text-component.md +++ b/src/content/blog/04.building-your-own-vue-rich-text-component.md @@ -12,7 +12,7 @@ If you're like me, when you're building a web application, you'll often come to For example, you might need touch events for a carousel, or a quick tooltip, or to be notified when an element changes size. There are great libraries to do all of these things. But without noticing it, you might find your bundle size is increasing disproportionate to the functionality you need. So, for example, if you're using [hammerjs](https://hammerjs.github.io/) just to enable mobile touch events - don't! There's a [great API](https://developer.mozilla.org/en-US/docs/Web/API/Touch_events) that is just as simple to engage with. -### The problem: heavy rich-text components +## The problem: heavy rich-text components However, this really came alive for me recently. As part of our functionality with [Parent Scheme](https://parentscheme.com), we allow users to save answers to coaching questions embedded throughout the site. And at some point, rather than using a basic autosizing `textarea`, we decided to allow rich text, and grabbed the fantastic [tiptap](https://github.com/scrumpy/tiptap), a beautifully designed, renderless rich-text editor for Vue.js that wraps [Prosemirror](https://prosemirror.net/). @@ -22,7 +22,7 @@ It worked fantastically well, and we were able to roll out a great user experien That might have been worth it for an app more centred around the editor experience, but it wasn't for us. So we started looking for alternatives. -### Pell - a tiny rich text editor +## Pell - a tiny rich text editor There are other libraries, like Quill, Squire, and so on. Most have a pretty heavy dependency chain, and those that are lighter tend not to have the functionality we wanted - such as the ability to use Markdown shortcuts. @@ -35,7 +35,7 @@ It renders something like this: Vue makes it very easy to pull in a library with a custom wrapper component, and there are packages that do that with Pell. But, to be honest, that's probably the wrong thing to do. The base library is so simple that it's a great foundation for building your own rich text editor Vue component. And I wanted to make sure we supported Markdown shortcuts -- automatically creating bulleted lists after typing `*`, for example. So this is a good example of when it's best to re-implement functionality directly in Vue. -### Building our own rich text editor +## Building our own rich text editor So, how might you build your own Vue rich text component using the techniques Pell does?