Skip to content

Instantly share code, notes, and snippets.

@mistermboy
Last active March 23, 2022 09:30
Show Gist options
  • Save mistermboy/843d5633e5408d7d79a37b890da167f3 to your computer and use it in GitHub Desktop.
Save mistermboy/843d5633e5408d7d79a37b890da167f3 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 method 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 -->
<!-- DON´T FORGET 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 -->
<!-- DON´T FORGET 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