add ckeditor to instructions

pull/99/head
Robin Moisson 2017-06-19 10:46:47 +02:00
rodzic 6458d19453
commit 03edb5c00f
1 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -145,7 +145,12 @@ Your encrypted string</pre>
integrity="sha384-lp4k1VRKPU9eBnPePjnJ9M2RF3i7PC30gXs70+elCVfgwLwx1tv5+ctxdtwxqZa7"
crossorigin="anonymous"></script>
<script src="https://cdn.ckeditor.com/4.7.0/standard/ckeditor.js"></script>
<script>
// enable CKEDIRTOR
CKEDITOR.replace( 'instructions' );
var htmlToDownload;
var renderTemplate = function (tpl, data) {
@ -193,6 +198,10 @@ Your encrypted string</pre>
document.getElementById('encrypt_form').addEventListener('submit', function (e) {
e.preventDefault();
// update instruction textarea value with CKEDITOR content
// (see https://stackoverflow.com/questions/3147670/ckeditor-update-textarea)
CKEDITOR.instances['instructions'].updateElement();
var unencrypted = document.getElementById('unencrypted_html').value;
var passphrase = document.getElementById('passphrase').value;