diff --git a/app/static/css/editor.css b/app/static/css/editor.css index 7ef3201..9c39e0b 100644 --- a/app/static/css/editor.css +++ b/app/static/css/editor.css @@ -51,16 +51,24 @@ position: absolute; left: 0px; width: auto; + min-width: 30vw; white-space: nowrap; text-align: left; right: inherit; - background-image: none; - background-color: #161819; - border-color: #3a3f42; - border-radius: .4rem; + background: var(--background-hover); + border: var(--border); + color: var(--text); padding: .2rem; top: 3.2rem; z-index: 100; list-style-position: initial; list-style-type: none; +} +.editor .modal > div { + margin: 0.8rem; + margin-top: 0.4rem; + margin-bottom: 1rem; +} +.editor .modal > div label { + margin-top: 0.4rem; } \ No newline at end of file diff --git a/app/static/css/form.css b/app/static/css/form.css index 1597f03..5c40203 100644 --- a/app/static/css/form.css +++ b/app/static/css/form.css @@ -23,6 +23,7 @@ .form input[type='date'], .form input[type='password'], .form input[type='search'], +.form input[type='url'], .form textarea, .form select { display: block; @@ -38,6 +39,7 @@ .form input[type='date']:focus, .form input[type='password']:focus, .form input[type='search']:focus, +.form input[type='url']:focus, .form textarea:focus, .form select:focus { border-color: var(--border-focused); @@ -48,6 +50,7 @@ .form input[type='date']:focus-within, .form input[type='password']:focus-within, .form input[type='search']:focus-within, +.form input[type='url']:focus-within, .form textarea:focus-within, .form select:focus-within { outline: none; diff --git a/app/static/less/editor.less b/app/static/less/editor.less index 484b834..4317849 100644 --- a/app/static/less/editor.less +++ b/app/static/less/editor.less @@ -64,19 +64,29 @@ position: absolute; left: 0px; width: auto; + min-width: 30vw; white-space: nowrap; text-align: left; right: inherit; - background-image: none; - background-color: rgb(22, 24, 25); - border-color: rgb(58, 63, 66); - border-radius: .4rem; + background: var(--background-hover); + border: var(--border); + color: var(--text); padding: .2rem; top: 3.2rem; z-index: 100; list-style-position: initial; list-style-type: none; + + & > div { + margin: 0.8rem; + margin-top: 0.4rem; + margin-bottom: 1rem; + + label { + margin-top: 0.4rem; + } + } } } diff --git a/app/static/less/form.less b/app/static/less/form.less index fa76a8f..6673f7a 100644 --- a/app/static/less/form.less +++ b/app/static/less/form.less @@ -32,6 +32,7 @@ input[type='date'], input[type='password'], input[type='search'], + input[type='url'], textarea, select { display: block; diff --git a/app/static/scripts/editor.js b/app/static/scripts/editor.js index a1f916b..6ad3524 100644 --- a/app/static/scripts/editor.js +++ b/app/static/scripts/editor.js @@ -112,13 +112,16 @@ function editor_clear_modals(event, close = true) { for (const i of modals) {i.style.display = 'none'}; } -function editor_insert_link(event, link, text = "", image = false) +function editor_insert_link(event, link_id, text_id, image = false) { const [editor, button, ta] = editor_event_source(event); ta.focus(); let indexStart = ta.selectionStart; let indexEnd = ta.selectionEnd; + const link = document.getElementById(link_id).value; + const text = document.getElementById(text_id).value; + editor_clear_modals(event); let [start, end] = editor_replace_range(ta, indexStart, indexEnd, diff --git a/app/templates/widgets/editor.html b/app/templates/widgets/editor.html index d9798bb..010e4ba 100644 --- a/app/templates/widgets/editor.html +++ b/app/templates/widgets/editor.html @@ -115,7 +115,7 @@
- Valider + Valider Annuler
@@ -132,7 +132,7 @@
- Valider + Valider Annuler