From 9be486dd3f1f310e18bd400fb78257ab587e92e8 Mon Sep 17 00:00:00 2001 From: alex-ds13 <145657253+alex-ds13@users.noreply.github.com> Date: Sat, 6 Dec 2025 13:55:06 +0000 Subject: 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. --- examples/markdown/src/main.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples/markdown') 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) -- cgit v1.2.3