Convert Markdown text to HTML and to plaintext in JavaScript

Let’s create a small JavaScript module that will be able to convert formatted text in Markdown to HTML and to plaintext. I chose Marked.js as my library of choice because with this library it is very easy to modify the output. Here is our basic module to convert Markdown to HTML:

As we can […]

How to reference hidden elements in Vue.js

In Vue.js we can reference either Vue.js component or a standard DOM element by marking it with ref=”ourReferenceName” inside the HTML tag and later access this element easily inside the component with this.$refs.ourReferenceName. Let’s have a look at a simple component example:

So far so good. The problem comes when we want to […]