text-selectable? and DefaultDocument - Printable Version +- Curl Global Community (https://communities.curl.com) +-- Forum: Blogs (https://communities.curl.com/forumdisplay.php?fid=17) +--- Forum: Tech blog (https://communities.curl.com/forumdisplay.php?fid=18) +---- Forum: Robert blog (https://communities.curl.com/forumdisplay.php?fid=20) +---- Thread: text-selectable? and DefaultDocument (/showthread.php?tid=335) |
text-selectable? and DefaultDocument - RobertShiplett - 11-05-2011 The Curl Documentation only lists some of the options that you might choose to set for a Document using {set-document-properties }. Only yesterday did it dawn on me to set text-selectable?=false at the top level using {set-document-properties text-selectable?=false} The effect is not what I had expected: the option has no effect on the URL links in the document – they remain active. There is one nasty side-effect: the Curl FIND menu (CTRL-F) finds text but cannot highlight that text. If found, that text has scrolled into view, but where? (My preferred editor keeps "current line" hi-lite distinct from "current selection" hi-light but that may not be do-able in a Curl TextFlowBox.) For presenting complex text which a user is not intended to copy, this is still excellent. Also needed is {disable-inspection-gesture} || suppress CTRL-right-click popup menu But is there a technique for the final task which is simpler than starting a document with: {TextFlowBox {on ae:AttachEvent do set ae.root-frame.context-menu-for-view = null }} || suppress popup menu Tip: In a large text document, don't rely on the default {heading SomeText} use {heading level=1, SomeText} When you have to search quickly, the default is not your friend. An alternative for level 1 headings is to use the name attribute: {heading name="book01", Some Complicated Book Title Repeated in the Text} To use that 'name' as a {destination } link, I suggest: {destination name="dbook01", } || empty, but useful to position the following {heading name="book01", Some Complicated Book Title Repeated in the Text} and then a later link in the text will land the user with that heading visible, e.g., {link href={url "#dbook1"}, First Book} The happy LCurlr |