Skip to content

Instantly share code, notes, and snippets.

@branflake2267
Last active November 20, 2019 02:35
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 branflake2267/3522f3bd1071909aff3040bc988e82ca to your computer and use it in GitHub Desktop.
Save branflake2267/3522f3bd1071909aff3040bc988e82ca to your computer and use it in GitHub Desktop.
Froala editor example using requirejs.
<!DOCTYPE html>
<html>
<head>
<title>Froala Editor JavaScript Demo</title>
<!-- 1. Include Froala Editor style -->
<link href='https://cdn.jsdelivr.net/npm/froala-editor@3.0.6/css/froala_editor.pkgd.min.css' rel='stylesheet'
type='text/css' />
<!-- 1. Include Froala Editor -->
<script src='https://cdn.jsdelivr.net/npm/froala-editor@3.0.6/js/froala_editor.pkgd.min.js'></script>
</head>
<body>
<style>
#editor {
margin: 50px;
}
</style>
<script>
window.addEventListener('DOMContentLoaded', (event) => {
// 3. Render the editor when the DOM is ready
new FroalaEditor('#editor');
});
</script>
<!-- 2. Declare where the editor will render -->
<div id='editor'></div>
</body>
</html>
@branflake2267
Copy link
Author

Screen Shot 2019-11-16 at 3 54 02 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment