Skip to content

Instantly share code, notes, and snippets.

@jdanyow
Created January 29, 2021 15:54
Show Gist options
  • Select an option

  • Save jdanyow/3d7b36d79e98c734909330a32d72bc89 to your computer and use it in GitHub Desktop.

Select an option

Save jdanyow/3d7b36d79e98c734909330a32d72bc89 to your computer and use it in GitHub Desktop.
Stacks Editor
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Stacks Editor</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@stackoverflow/stacks@0.59.0/dist/css/stacks.min.css" integrity="sha256-nM5uyfIHDQ7kqN0TD0xRZKZ86IKqK4unu1hS7YuedNo=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@stackoverflow/stacks-editor@0.1.1/dist/styles.css" integrity="sha256-FCWPuq+Y8jQfi1k/YibDWTBHCZ5a7dQx78VwJrHsJzI=" crossorigin="anonymous">
</head>
<body>
<div id="editor-container"></div>
<!-- highlight.js is not included in the bundle, so include it as well if you want it -->
<script src="//unpkg.com/@highlightjs/cdn-assets@latest/highlight.min.js"></script>
<!-- include the bundle -->
<script src="https://cdn.jsdelivr.net/npm/@stackoverflow/stacks-editor@0.1.1/dist/app.bundle.min.js"></script>
<!-- initialize the editor -->
<script>
new window.stacksEditor.StacksEditor(
document.querySelector("#editor-container"),
"*Your* **markdown** here",
{}
);
</script>
</body>
</html>
console.log('Hello World!');
/* todo: add styles */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment