Sorry for the basic question. I'm new to coding and I've already googled "how to run code from Github" "how to use code from Github" etc. for a few hours without any real progress.
Basically, I want to create a editable div with the text editor (https://github.com/yabwe/medium-editor) and I already manually downloaded and followed the directions to inserting the code inside the editor (can be found on the GitHub page).
Here is my code for the editable div in its entirety:
<link rel="stylesheet" type="text/css" href="post.css">
<link rel="stylesheet" href="css/medium-editor.css">
<link rel="stylesheet" href="css/themes/default.css">
<div contenteditable="true" class= ".editable" id="posteditor"> <p> test words</p></div>
var elements = document.querySelectorAll('.editable'),
editor = new MediumEditor('.editable');
You need some simple html css js basics knowledge to start dealing with such code
here are some tips:
link tag in the head
script tags in before the ending of the body
try now to run this code and double tap the word you want to edit
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <link rel="stylesheet" href="//cdn.jsdelivr.net/medium-editor/latest/css/medium-editor.min.css" type="text/css" media="screen" charset="utf-8"> </head> <body> <div class="editable"><h4>hi I am editable</h4></div> <script src="//cdn.jsdelivr.net/medium-editor/latest/js/medium-editor.min.js"></script> <script>var editor = new MediumEditor('.editable');</script> </body> </html>