Browser-like text display
Moderator: Klaus
-
- Posts: 21
- Joined: Sat Apr 08, 2006 10:19 am
Browser-like text display
I'd like to have text capabilities close to the behavior of HTML with respect to:
1. Paragraph-linked (rather than total-text-box) text format controls
2. Numbered and unnumbered lists
3. Text wraparound for inserted graphics
4. CSS display rules
1. Paragraph-linked (rather than total-text-box) text format controls
2. Numbered and unnumbered lists
3. Text wraparound for inserted graphics
4. CSS display rules
Most people want a real text editor field, the problem is that it might get slower, or buggy with too many features... at least that's what i fear.
Thus i would want this in an additional Object, instead of a modified text field, and I want it in the engine, so to avoid another table field fiasco.
Thus i would want this in an additional Object, instead of a modified text field, and I want it in the engine, so to avoid another table field fiasco.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
I second Jerry's request. I too would like just a little more in the
HTMLText.
And I would add to that the ability to use HTML comments within the
HTMLText. Besides adding comments, it would allow us to set markers
in the code. I use the comment tags a lot when generating and reading
html code to let my programs know where to produce or read specific
information.
-Garrett
HTMLText.
And I would add to that the ability to use HTML comments within the
HTMLText. Besides adding comments, it would allow us to set markers
in the code. I use the comment tags a lot when generating and reading
html code to let my programs know where to produce or read specific
information.
-Garrett
-
- VIP Livecode Opensource Backer
- Posts: 11
- Joined: Sun Apr 09, 2006 6:36 am
I too would like it all. But I wonder if I would like the solution if it were delivered. Apple's TextEdit app, which may contain the minimum of expected text formatting features weighs in at over 8 MB. Browsers that offer full CSS display features are much larger than that.
Also, we use text fields for both text editing and text display. Yet I know of no app that combines text editing and CSS.
I suspect we may have to trim down our wish list. In the short term, I'd happily settle for being able to apply current field attributes to individual paragraphs. But how much in application file size would I be willing to trade? 500 KB perhaps.
Also, we use text fields for both text editing and text display. Yet I know of no app that combines text editing and CSS.
I suspect we may have to trim down our wish list. In the short term, I'd happily settle for being able to apply current field attributes to individual paragraphs. But how much in application file size would I be willing to trade? 500 KB perhaps.
-
- Posts: 21
- Joined: Sat Apr 08, 2006 10:19 am
If overhead is an issue, I'll use HTML output and display in a browser. I'm going for a simple-syntax markup in text, with output filters for Rev textcontrol (Hobbit HTMLtext) and standard HTML file. File-save format is the text markup version. Kind of like a poor-man's XML, borrowed from WikiWriter (http://hytext.com/iwiki/markup.htm). The filter can be tinkered to match whatever format options Rev comes up with in the future.
My creative engine is still stuck in the nroff and PC-Write side-track from the 80's.....
My creative engine is still stuck in the nroff and PC-Write side-track from the 80's.....

-
- Livecode Opensource Backer
You can indeed implement some very html 2 wiki conversion using a simplified regexp notation.Jerry Muelver wrote:I'm going for a simple-syntax markup in text, with output filters for Rev textcontrol (Hobbit HTMLtext)
Code: Select all
put field "html" into twiki
put the number of lines in trules into nbLines
repeat with x = 1 to nbLines
put item 1 of (line x of trules) into tfrom
put item 2 of (line x of trules) into tto
put replacetext(twiki, tfrom, tto) into twiki
end repeat
put replacetext(twiki, "[ \t]*¬", cr) into twiki
Code: Select all
<h1>,¬!
<h2>,¬!!
<h3>,¬!!!
<hr>,¬-----
</?ul>,
<li>,¬*
<p>,¬
</?u>,''
</?em>,__
</?i>,__
</?strong>,''
</?b>,''
Note: In the preciding ? stands for present or not, * stands for any number of the previous character, ¬ stands for cr
In fact, what is missing is a way to define a set of simple styles and apply them easily (like the wiki markup you refer to). It seems to me it should be possible to have a relatively lightweight solution if we could have a "style" tag to any html tag .
For instance: <p style="quote">a paragraph</p>
With the possibility to define somewhere a style["quote"] variable that contains a set of formating to apply on this paragraph
style["quote"] = "textcolor=gray;textsize=14;textstyle=italic,bold,textshift=-2"
that has for effect to set the props of the corresponding objects or selectedtext to the new values.
Could be a great addition and still require less than a 500K increase in size for the engine.
-
- VIP Livecode Opensource Backer
- Posts: 11
- Joined: Sun Apr 09, 2006 6:36 am
I agree it would be a nice addition, but until the Rev text field object can support paragraph level formatting, I don't think it takes us very far forward. The formatting I'm thinking of are things such as indents, text alignment, tabstops, tab alignment, and paragraph spacing. I wouldn't be willing to place bets on how much of that can be done in 500K.With the possibility to define somewhere a style["quote"] variable that contains a set of formating to apply on this paragraph
style["quote"] = "textcolor=gray;textsize=14;textstyle=italic,bold,textshift=-2"
that has for effect to set the props of the corresponding objects or selectedtext to the new values.
Could be a great addition and still require less than a 500K increase in size for the engine.
I can't say I have any idea what the overhead would be for all those features, but on the other hand i use to have a version of MS Word which would fit in less than a 800k diskette, back in the dark ages. Maybe not impossible to add features in 500-1000K...Dave Cragg wrote:I agree it would be a nice addition, but until the Rev text field object can support paragraph level formatting, I don't think it takes us very far forward. The formatting I'm thinking of are things such as indents, text alignment, tabstops, tab alignment, and paragraph spacing. I wouldn't be willing to place bets on how much of that can be done in 500K.With the possibility to define somewhere a style["quote"] variable that contains a set of formating to apply on this paragraph
style["quote"] = "textcolor=gray;textsize=14;textstyle=italic,bold,textshift=-2"
that has for effect to set the props of the corresponding objects or selectedtext to the new values.
Could be a great addition and still require less than a 500K increase in size for the engine.
Well,
the Revolution development team might have a look at Tk's text widget. It has all features required to setup a styled-text editor, a (simple) web browser (with editable contents, of course) etc. With full scripting support, of course - otherwise I would not mention it!
It's stable since a long time, the source is available...I don't think that resource requirements and the fear of potential bugs are real arguments.
The free Tcl/Tk has styled text since years - it's really astonishing that the expensive Revolution Studio does not have anything comparable yet
the Revolution development team might have a look at Tk's text widget. It has all features required to setup a styled-text editor, a (simple) web browser (with editable contents, of course) etc. With full scripting support, of course - otherwise I would not mention it!
It's stable since a long time, the source is available...I don't think that resource requirements and the fear of potential bugs are real arguments.
The free Tcl/Tk has styled text since years - it's really astonishing that the expensive Revolution Studio does not have anything comparable yet
Kind regards,
Andreas Rozek
Andreas Rozek
Especially potential bugs are perhaps no real arguments but definitely realistic arguments. I prefer Revolution to do well what it does now rather than have new features.rozek wrote:Well,
the Revolution development team might have a look at Tk's text widget. It has all features required to setup a styled-text editor, a (simple) web browser (with editable contents, of course) etc. With full scripting support, of course - otherwise I would not mention it!
It's stable since a long time, the source is available...I don't think that resource requirements and the fear of potential bugs are real arguments.
The free Tcl/Tk has styled text since years - it's really astonishing that the expensive Revolution Studio does not have anything comparable yet
That aside, I would love to see a true html field object built into Revolution. Since there is altBrowser already, I don't expect a feature like this to get much priority from the RunRev Ltd.
I think this dsicussion justfies an enhancement request in BugZilla. I have created one at http://support.runrev.com/bugdatabase/s ... gi?id=3804 and you are free to add your comments. Maybe it is a good idea to discuss ideas here before adding them to BugZilla.
Best regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode