I have a dialog with a scrollbox containing and htmlBox which displays a pretty vanilla html file. The text in the dialog is not selectable. How can I make it selectable?
Hi Jonathan,
you can enable text selection in any UI component using user-select CSS property.
- Create theme extension using Studio
- Set stylename attribute of a component from Studio (or XML or programmatically) to some-selectable-style (your name of selectable style).
- Define some-selectable-style in halo-ext.scss file located in web/themes/halo//:
.some-selectable-style {
// just syntax sugar for user-select: text for all browsers
@include user-select(text);
}
Then you can start your application and try to select text in the component with stylename some-selectable-style.
Thanks. That worked well.