Source reconstructed at patch state 1 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
| 1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta charset="utf-8" /> |
| 5 |
<title>JSON Editor WYSIWYG Example</title> |
| 6 |
<script src="../../../javascript/json-editor/jsoneditor.min.js"></script> |
| 7 |
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> |
| 8 |
<script src="//cdn.jsdelivr.net/sceditor/1.4.3/jquery.sceditor.bbcode.min.js"></script> |
| 9 |
<link rel="stylesheet" href="//cdn.jsdelivr.net/sceditor/1.4.3/jquery.sceditor.default.min.css"> |
| 10 |
<script src="//cdn.jsdelivr.net/sceditor/1.4.3/jquery.sceditor.xhtml.min.js"></script> |
| 11 |
<link rel="stylesheet" href="//cdn.jsdelivr.net/sceditor/1.4.3/themes/default.min.css"> |
| 12 |
</head> |
| 13 |
<body> |
| 14 |
<h1>JSON Editor WYSIWYG Example</h1> |
| 15 |
|
| 16 |
<p style='margin-bottom:20px;'>This example demonstrates JSONEditor's integration with SCEditor</p> |
| 17 |
|
| 18 |
<div id='editor_holder'></div> |
| 19 |
<button id='submit'>Submit (console.log)</button> |
| 20 |
|
| 21 |
<script> |
| 22 |
// Initialize the editor with a JSON schema |
| 23 |
var editor = new JSONEditor(document.getElementById('editor_holder'),{ |
| 24 |
schema: { |
| 25 |
type: "object", |
| 26 |
title: "Blog Post", |
| 27 |
properties: { |
| 28 |
title: { |
| 29 |
type: "string" |
| 30 |
}, |
| 31 |
body: { |
| 32 |
type: "string", |
| 33 |
format: "html", |
| 34 |
options: { |
| 35 |
wysiwyg: true |
| 36 |
} |
| 37 |
} |
| 38 |
} |
| 39 |
} |
| 40 |
}); |
| 41 |
|
| 42 |
// Hook up the submit button to log to the console |
| 43 |
document.getElementById('submit').addEventListener('click',function() { |
| 44 |
// Get the value from the editor |
| 45 |
console.log(editor.getValue()); |
| 46 |
}); |
| 47 |
</script> |
| 48 |
</body> |
| 49 |
</html> |