JSFiddle - React, Tailwind, and code Playground

by blowsie

HTML

<h1>Message</h1>
<p class="message">
Dear David,

We hope you can treat yourself and Anna to a few meals whilst settling into your new home.
Really looking forward to seeing the new house and the dog when we come over in July.
Miss you lots and lots.

Love always, 
Nanny & Grandad
xxx
</p>
<p class="message-length"></p>
<h1>Message base64 encoded</h1>
<p class="encoded"></p>
<p class="encoded-length"></p>

JavaScript

var $message = document.querySelector('.message')
var $messageLength = document.querySelector('.mesage-length')

var $encoded = document.querySelector('.encoded')
var $encodedLength = document.querySelector('.encoded-length')

$messageLength.innerHTML = $message.innerHTML.length