aboutsummaryrefslogtreecommitdiff
path: root/examples/markdown
diff options
context:
space:
mode:
authoralex-ds13 <145657253+alex-ds13@users.noreply.github.com>2025-12-06 13:55:06 +0000
committerPolesznyák Márk <contact@pml68.dev>2025-12-30 18:36:11 +0100
commit9be486dd3f1f310e18bd400fb78257ab587e92e8 (patch)
tree0ec6dfe0b28bc0c78f9b190564eb1779568d14a2 /examples/markdown
parentfix(selectable): prevent clash with other's custom operations (diff)
downloadiced_selection-9be486dd3f1f310e18bd400fb78257ab587e92e8.tar.gz
fix(examples): add selectable to examples
- Adds the `selectable` to the rich and markdown examples. - Remove debug code from name example and make it simpler without the `selectable` so users know that the `selectable` is optional.
Diffstat (limited to 'examples/markdown')
-rw-r--r--examples/markdown/src/main.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/markdown/src/main.rs b/examples/markdown/src/main.rs
index 4963792..ce5a58b 100644
--- a/examples/markdown/src/main.rs
+++ b/examples/markdown/src/main.rs
@@ -1,6 +1,6 @@
use iced::widget::{operation, row, scrollable, text_editor};
use iced::{Element, Fill, Font, Theme, highlighter};
-use iced_selection::markdown;
+use iced_selection::{markdown, selectable};
fn main() -> iced::Result {
iced::application(State::new, State::update, State::view)
@@ -65,7 +65,10 @@ impl State {
row![
editor,
- scrollable(preview).spacing(10).width(Fill).height(Fill)
+ scrollable(selectable(preview))
+ .spacing(10)
+ .width(Fill)
+ .height(Fill)
]
.spacing(10)
.padding(10)