Solution I wrote to create a read more functionality inside a WordPress Elementor text area. I chose to write it in Javascript as it allows me to rapidly embed the code inside the website, without the need of creating/editing a widget in elementor.
This code demonstrates the use of DOM manipulation, as well as use of of recursive programing.