From 1093cbf67e1a56b476ce88fe880617e103b18e79 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 6 Nov 2024 11:01:00 +0100 Subject: [PATCH] Reactive editor with side by side preview (fixes #69) --- src/frontend/components/editor.rs | 66 ++++++++++++++++------------ src/frontend/pages/article/create.rs | 2 +- src/frontend/pages/article/edit.rs | 4 +- 3 files changed, 40 insertions(+), 32 deletions(-) diff --git a/src/frontend/components/editor.rs b/src/frontend/components/editor.rs index ff55cdf..210d378 100644 --- a/src/frontend/components/editor.rs +++ b/src/frontend/components/editor.rs @@ -13,36 +13,44 @@ pub fn EditorView( let (show_preview, set_show_preview) = create_signal(false); view! { -
- - - -
-
-
- +
+ + +
+
+
+
+
+ +

+ + Markdown + + " formatting is supported" +

} diff --git a/src/frontend/pages/article/create.rs b/src/frontend/pages/article/create.rs index d0a650c..1e66ebe 100644 --- a/src/frontend/pages/article/create.rs +++ b/src/frontend/pages/article/create.rs @@ -80,7 +80,7 @@ pub fn CreateArticle() -> impl IntoView {
impl IntoView {
impl IntoView { />