Working Example of styledtext or markdown

Emile, yes I am familiar with that code, and “StyledTextEditor.xojo_binary_project” has a bug in it. It doesn’t allow the text to be saved. It also cheats as far as building information. The text is encoded and not random but the actual highlighted text is quoted out like this that code. position = text.InStr(position, “Mars”) // Start after title
This is the code:

[code]StyledTextArea.StyledText.Font( 0, 11) = “Arial”
StyledTextArea.StyledText.Size( 0, 11) = 24
StyledTextArea.StyledText.Bold( 0, 11 ) = True
StyledTextArea.StyledText.TextColor(0, 11) = &c0000ff

StyledTextArea.StyledText.Bold(13, 17) = True

StyledTextArea.StyledText.Font(31, text.Len-31) = “Times New Roman”
StyledTextArea.StyledText.Size( 31, text.Len-31) = 16

// Italicize Mars in the text
Dim position As Integer = 31
Do
position = text.InStr(position, “Mars”) // Start after title
If position > 0 Then
StyledTextArea.StyledText.Italic(position-1, 4) = True
position = position + 4
End If
Loop Until position <= 0[/code]

Another example is the TextOut project from the book “Introduction to Programming” Chapter 9. It doesn’t handle unicode, and it doesn’t even offer the option a filetype so when you save it, it doesn’t save it with an extension.
That is what I meant by working and not working.

[quote]Jean-Yves Pochez 5 hours ago Pre-Release Testers, Xojo Pro Europe (France, Besancon)
parse the original text in a database (sqlite) with one field per language.
then generate the text the way you want, the style you want, for each choosen word
you could also show the words in a listbox. the styledtext is not mandatory.[/quote]

Yes. I’m looking for an example that works, and shows how to structure the incorporating of the attributes into a list or a table. I have no problems with using SQL.

This is a class I use for an array for a hierarchical list:

daata() As String id As integer isFolder As boolean = False isOpen As boolean = False parent As Integer = -1
How do I build a similar table, list, array, dictionary or whatever for styledtext. What attributes do I need to take into account. Is there an example out there that works?

Did you make a bug report ?

Not yet. I did tell XOJO library though.

What is Xojo Libray ? And when ? (date)

Sorry, the web page title is “XOJO Library”, and I didn’t realize that wasn’t their address. It is Xdevlibrary.com

Hi Arthur,

Creating a parser for Markdown syntax (and saving/retrieving it from a DDBB or file for example) is not that hard. In fact my app Snippery has this feature among others (with some bugs here and there in the parsing… I must to admit it). I’ve checked it using your Unicode text example… and it worked too. If you need further information about how to wet your feet with this… I’ll be glad helping you.

You can view a short demo of the Markdown edition and Preview modes (render or parsing) in this video

This is done using 100% Xojo Code.

thank you. I’m very interested.
Not sure how contact info is handed out but this is my email agabhart36@cs.com
I have as I hope I’ve written no real problem is parsing, but it’s trying to figure out an appropriate way of handling lines of uhmm data.

I found my answer and I wish I had known the term StyleRun before asking my question.
It seems I can have for a TextArea all of the StyleRuns (each is a class) uhm extracted into an array of probably StyleRun.
I can then refresh my TextArea very easily.
I can also save that data as a set of Integers even to text.
For a simple term I will this a report.

What are similar processes for various other systems - HTML, XML etc.