From 7b218b744d1544e5a6235f2c0a81e87bd057b1fe Mon Sep 17 00:00:00 2001 From: Th3NiKo Date: Sun, 19 Jan 2020 11:02:52 +0100 Subject: [PATCH] BES-6 Add new features, font color, font style, context menu. Fixed showing code sample properly --- BestNotesProject/settings.py | 3 ++- bestnotes/static/shownote.js | 2 +- bestnotes/urls.py | 4 +++- db.sqlite3 | Bin 192512 -> 192512 bytes 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/BestNotesProject/settings.py b/BestNotesProject/settings.py index c51932f..be20c1f 100644 --- a/BestNotesProject/settings.py +++ b/BestNotesProject/settings.py @@ -137,7 +137,8 @@ TINYMCE_DEFAULT_CONFIG = { 'plugins': "image,imagetools,media,codesample,link,code", 'cleanup_on_startup': True, 'menubar': False, - 'toolbar': "styleselect |undo redo | bold italic | alignleft aligncenter alignright | link image media codesample code", + 'contextmenu': "cut, copy, link, media, ", + 'toolbar': "styleselect | undo redo | bold italic underline superscript subscript| fontselect fontsizeselect forecolor backcolor | alignleft aligncenter alignright | link image media codesample code", 'image_caption': True, 'image_advtab': True, 'custom_undo_redo_levels': 10, diff --git a/bestnotes/static/shownote.js b/bestnotes/static/shownote.js index bc793fe..1369a07 100644 --- a/bestnotes/static/shownote.js +++ b/bestnotes/static/shownote.js @@ -6,7 +6,7 @@ tinymce.init({ content_css: 'dark', plugins: [ 'autoresize advlist autolink lists link image charmap print preview anchor', - 'searchreplace visualblocks code fullscreen', + 'searchreplace visualblocks codesample fullscreen', 'insertdatetime media table contextmenu paste code' ], readonly: 1, diff --git a/bestnotes/urls.py b/bestnotes/urls.py index 8d11bec..b7a18ac 100644 --- a/bestnotes/urls.py +++ b/bestnotes/urls.py @@ -16,5 +16,7 @@ urlpatterns = [ path('notes/', views.notes_name, name="notes_id"), path('create/', views.create_note, name="create_note"), path('delete_note/', views.delete_note, name="delete_note"), - path('update_note/', views.update_note, name="update_note") + path('update_note/', views.update_note, name="update_note"), + path('update_note_id/', views.update_note_id, name="update_note_id") + ] diff --git a/db.sqlite3 b/db.sqlite3 index 75ecf1a88cca3b7d755be47b32727154c5f9b57f..b30d9fa15896cd2c5581efa199963ff4d4ff6ad6 100644 GIT binary patch delta 510 zcmY+Ay)Oho7{+I25f=CE?F9vqK|&#G*ItElzM_{XlqWtyGDK zOhn-iP>6{BBs2=S;tILS?E0SKnY@$V^StjnyOq}6O6x&4em(4&!>{Knmm@|Zp((>S z!vgO4oCV9=FXY@r2Po#B$DowiU@q79XH79{;+twaR1twE1>WHasv<_o0~l(&0d-*+ z!fk@0(;R9OG$6npX@`615ehtmfO`?M$SL%8=#8kW@6%*kwq;nO#^_l5)1EkfoFb-5 z;0-|y-k>gG)1(5lQNftRBZaU5LMqf{_Aj;|vEC4f>!E`7g~^LR4M81hqHTq|K({o9 zgdTC4rv4)el4$uNh%V|oM5S_^K?K(@7+boS(T=b?avcFGI`(kU~WOpEI?GC%zRSPg~} delta 324 zcmZp8z}@hGdxA9MoryBejCVFBY}L~h6c%9CW=u*gF3HO;NiB{q$uG!E77*oU)<+U7 zE=|fxO)lYYcGBPOq|dnj11|#u10(+r2L2yF_-s3$0@G#wiH_o8Z2T+?{ET@_5cwwz z{7?9w@V(j2XTY?Qe_{YTqvphks?(p?GbwN}@_%9A{{n>Xw(~hKJ>XXWnkdA;z{*!Z*}i){ldA&&HJ4SZ