Get started with wysihtml CDN
Stable version
Copied!
How to start using wysihtml CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with wysihtml CDN - cdnhub.io</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<script src="https://cdn.cdnhub.io/wysihtml/0.5.5/wysihtml.min.js"></script>
<style>
#editor { width: 800px; height: 600px; border: 1px solid #ccc; }
</style>
</head>
<body>
<div class="container mt-5">
<h1 class="mb-3">WYSIHTML Example</h1>
<textarea id="editor"></textarea>
<button class="btn btn-primary mt-3" id="save">Save</button>
</div>
<script>
// Initialize WYSIHTML editor
var editor = new wysihtml.Editor("editor", {
toolbar: { "bold": true, "italic": true, "underline": true, "strikethrough": true, "list": true, "link": true },
stylesheets: ["https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"]
});
// Save button event
document.getElementById("save").addEventListener("click", function() {
var html = editor.getValue();
console.log(html);
});
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
All versions
0.2.0
0.3.0
0.4.0
0.4.0-beta1
0.4.0-beta2
0.4.1
0.4.10
0.4.11
0.4.12
0.4.13
0.4.14
0.4.15
0.4.16
0.4.17
0.4.2
0.4.3
0.4.4
0.4.5
0.4.6
0.4.7
0.4.8
0.4.9
0.5.0
0.5.0-beta1
0.5.0-beta10
0.5.0-beta11
0.5.0-beta12
0.5.0-beta13
0.5.0-beta14
0.5.0-beta2
0.5.0-beta3
0.5.0-beta4
0.5.0-beta5
0.5.0-beta6
0.5.0-beta7
0.5.0-beta8
0.5.0-beta9
0.5.1
0.5.2
0.5.3
0.5.4
*** 0.5.5
0.6.0-beta
0.6.0-beta1