Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Protected Text
10-11-2011, 09:17 PM, (This post was last modified: 10-12-2011, 08:41 PM by RobertShiplett.)
#1
Protected Text
I have a standard header for simple text pages that I wish to protect from copy and paste. Most often the issue is copyright outside the USA. A more complex header is needed when styles and macros are required, but ost of these texts ate wrapped in a simple {pre }. Suggestions, anyone? In the absence of additional code, there is no suspend or resume, for example.

{curl 8.0 applet}
{curl-file-attributes character-encoding="utf8"}
{applet
|| manifest = "NO-manifest.mcurl",
{compiler-directives careful? = true}
}
{document-style DefaultDocument}
{set-document-properties background= {Background.from-string "linen"}}

{title heading?=false, BROWSER TITLE }

{let inspect?:bool} || SET THIS FLAG AS NEEDED
{if-debuggable
set inspect? = true
}
{if not inspect? then
{disable-inspection-gesture}
}
|| {include "", "" }
{TextFlowBox text-selectable? = inspect?, paragraph-left-indent=8pt,
{on ae:AttachEvent do
{if not inspect? then
set ae.root-frame.context-menu-for-view = null
}
},
{paragraph
\u0020 {br}
{pre
\u0020

TEXT GOES HERE
} || pre
} || para
} || TFB
|| eof text ln nnn ------------------------------------

The forced space at the start of the {pre } ensures that, if the first line of the text is centred, the first line will display as intended. The quirk is apparent at least in Firefox 3 on Ubuntu maverick.


Note on fonts: when using {pre } it will not help to set font properties in the TextFlowBox. The following works:
{pre font-family="serif",font-size=10pt,
or to replace this with
{paragraph text-preserve-whitespace?=false,
and then control font in one place from the TextFlowBox
Robert Shiplett, Curlr
Fredericton NB

Canada


Possibly Related Threads...
Thread Author Replies Views Last Post
  Non-selectable characters amidst text RobertShiplett 1 5,065 09-09-2014, 03:16 AM
Last Post: RobertShiplett
  Curl as a markup DSL for Russian Text RobertShiplett 1 6,422 09-24-2012, 01:17 PM
Last Post: alton
  row as text-proc RobertShiplett 0 3,058 08-14-2012, 09:52 PM
Last Post: RobertShiplett
  serialization for selections from a large off-line Japanese text resource RobertShiplett 0 2,943 06-04-2012, 11:20 PM
Last Post: RobertShiplett
  text-selectable? and DefaultDocument RobertShiplett 0 3,058 11-05-2011, 12:08 AM
Last Post: RobertShiplett
  Text Markup RobertShiplett 0 3,457 10-31-2011, 06:07 AM
Last Post: RobertShiplett
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('302')