diff options
author | Martin Green <martin.speleo@gmail.com> | 2022-06-26 14:16:42 +0100 |
---|---|---|
committer | Martin Green <martin.speleo@gmail.com> | 2022-06-26 14:16:42 +0100 |
commit | f1fcef2a6f9c78ceaf7a831ee07ad355d728cf69 (patch) | |
tree | a0a1190441bbe86a6a6f73e54013cd2e1a9f0569 /templates/widgets | |
parent | 8f0ea8ed8217a2dc4da318af59ecb49b238606ac (diff) | |
download | troggle-f1fcef2a6f9c78ceaf7a831ee07ad355d728cf69.tar.gz troggle-f1fcef2a6f9c78ceaf7a831ee07ad355d728cf69.tar.bz2 troggle-f1fcef2a6f9c78ceaf7a831ee07ad355d728cf69.zip |
Refactorising CodeMirror HTML editor, with an ultimate aim to make it reusable. However more work if required...
Diffstat (limited to 'templates/widgets')
-rw-r--r-- | templates/widgets/HTMLarea.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/templates/widgets/HTMLarea.html b/templates/widgets/HTMLarea.html new file mode 100644 index 0000000..9837327 --- /dev/null +++ b/templates/widgets/HTMLarea.html @@ -0,0 +1,32 @@ +<!--Creates the add image popup--> +<div><div class="add-image-popup popup-overlay"> + <div class="add-image-popup popup-content"> + <h2>Select Image</h2> + <p id="image_popup_content"> Loading ...</p> + <button onclick="new_image_popup()">Upload Image</button> + <button class="close" onclick="$('.add-image-popup').removeClass('active');">Close</button> + </div> +</div> + +<!--Creates the new image popup--> +<div class="new-image-popup popup-overlay"> + <div class="new-image-popup popup-content"> + <h2>New Image</h2> + <p id="new_image_popup_content"> Loading ...</p> + <button class="close" onclick="$('.new-image-popup').removeClass('active');">Close</button> + </div> +</div> +{% include "django/forms/widgets/textarea.html" %} +<iframe id=preview></iframe> +<button type="button" onclick="addTag('i', '')">italic</button> +<button type="button" onclick="addTag('b', '')">bold</button> +<button type="button" onclick="addTag('h2', 'id="tophead"')">top heading</button> +<button type="button" onclick="addTag('h1', '')">heading 1</button> +<button type="button" onclick="addTag('h2', '')">heading 2</button> +<button type="button" onclick="addTag('h3', '')">heading 3</button> +<button type="button" onclick="addTag('h4', '')">heading 4</button> +<button type="button" onclick="addTag('a', 'href=""')">hyperlink</button> +<button type="button" onclick="addTag('p', '')">paragraph</button> +<button type="button" onclick="add_image_popup()">image</button> +<button type="button" onclick="addStr('<hr/>')">horizontal line</button> +</div> |