Skip to content

Instantly share code, notes, and snippets.

@Daniel-Mietchen
Forked from mistermboy/YASHE.md
Last active April 7, 2020 23:17
Show Gist options
  • Save Daniel-Mietchen/885c1822427334cb81184ba8a4156a2f to your computer and use it in GitHub Desktop.
Save Daniel-Mietchen/885c1822427334cb81184ba8a4156a2f to your computer and use it in GitHub Desktop.
#YASHE: How to use YASHE

This example shows how to use YASHE in your own project.

You can initialize YASHE via its constructor, or via the command fromTextArea.

In the html files shown below, you will see how to initialize YASHE both ways.

<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>YASHE constructor</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<!-- I M P O R T A N T -->
<!-- REMIND TO INCLUDE YASHE CSS AND JS FILES-->
<link href='https://cdn.jsdelivr.net/npm/[email protected]/dist/yashe.min.css' rel='stylesheet' type='text/css'/>
<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/yashe.bundled.min.js'></script>
</head>
<body>
<div id=showcase></div>
<script type="text/javascript">
var yashe = YASHE(document.getElementById('showcase'));
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>YASHE fromTextArea</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<!-- I M P O R T A N T -->
<!-- REMIND TO INCLUDE YASHE CSS AND JS FILES-->
<link href='https://cdn.jsdelivr.net/npm/[email protected]/dist/yashe.min.css' rel='stylesheet' type='text/css'/>
<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/yashe.bundled.min.js'></script>
</head>
<body>
<textarea id=showcase></textarea>
<script type="text/javascript">
var yashe = YASHE.fromTextArea(document.getElementById('showcase'));
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment