diff --git a/bestnotes/static/shownote.js b/bestnotes/static/shownote.js new file mode 100644 index 0000000..76a0bb7 --- /dev/null +++ b/bestnotes/static/shownote.js @@ -0,0 +1,19 @@ +//activate tinyMCE +tinymce.init({ + selector: '.tmpTextArea', + menubar: false, + plugins: [ + 'advlist autolink lists link image charmap print preview anchor', + 'searchreplace visualblocks code fullscreen', + 'insertdatetime media table contextmenu paste code' + ], + readonly: 1, + toolbar: false, + height: 500, + width: 700, +}); +//get what is inside the textarea editor +var content = $('iframe').contents().find('#tinymce').contents(); +//append it in a div +$("#toAppend").append(content); +//disable edit diff --git a/bestnotes/templates/base.html b/bestnotes/templates/base.html index 2ba299c..2c5c69d 100644 --- a/bestnotes/templates/base.html +++ b/bestnotes/templates/base.html @@ -10,6 +10,8 @@ + + {% block css %} diff --git a/bestnotes/templates/note.html b/bestnotes/templates/note.html index f47b445..3eb80f0 100644 --- a/bestnotes/templates/note.html +++ b/bestnotes/templates/note.html @@ -1,6 +1,7 @@ {% extends 'base.html' %} {% load static %} {% block css %} + {% endblock %} {% block content %} @@ -16,7 +17,9 @@
-

{{ note.text }}

+ +
+
diff --git a/db.sqlite3 b/db.sqlite3 index 64438a7..0ff9835 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ