Skip to content

Instantly share code, notes, and snippets.

@maphew
Created April 19, 2019 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maphew/3e9eddd4f76711cf54458ae4132b2831 to your computer and use it in GitHub Desktop.
Save maphew/3e9eddd4f76711cf54458ae4132b2831 to your computer and use it in GitHub Desktop.
trumbowyg editor via cdn test
<html>
<head>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.15.2/ui/trumbowyg.min.css">
</head>
<body>
<div id="editor">
$('#trumbowyg-demo').trumbowyg();
</div>
Adapted from https://alex-d.github.io/Trumbowyg/documentation/
cdn: https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.15.2/
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')</script>
<-- Import Trumbowyg -->
<script src="//cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.15.2/trumbowyg.min.js"></script>
<-- Import Trumbowyg plugins... -->
<script src="//cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.15.2/plugins/upload/trumbowyg.cleanpaste.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.15.2/plugins/upload/trumbowyg.pasteimage.min.js"></script>
<-- Init Trumbowyg -->
<script>
// Doing this in a loaded JS file is better, I put this here for simplicity
$('#my-editor').trumbowyg();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment