Update Notes with Formatting.

Quote from kevync on 2023-06-29, 2:47 pmHi
My questions is how to add formatting to the Notes field of fact (or source for that matter). Using SQL. So my question pertains to building the string to use SET. So for crude example
Set Note = '<bold>' || Surname || '</bold>'
the actually need would be a bit more complex. Not sure if the notes field is using HTML or other code.
Give the editor is a pain for this type of thing & I have found my notes have lost all their formatting going between software -- I need write a script the rebuilds them and do not want to do manually .
Hi
My questions is how to add formatting to the Notes field of fact (or source for that matter). Using SQL. So my question pertains to building the string to use SET. So for crude example
Set Note = '<bold>' || Surname || '</bold>'
the actually need would be a bit more complex. Not sure if the notes field is using HTML or other code.
Give the editor is a pain for this type of thing & I have found my notes have lost all their formatting going between software -- I need write a script the rebuilds them and do not want to do manually .

Quote from Tom Holden on 2023-06-29, 9:57 pmYou can readily determine what format codes are used by creating a note in RM with examples of each and then inspecting the corresponding field with sqlite. If it is a blob type, you can readily view it in text format by CASTing it or by using a string function on it such as TRIM or SUBSTR.
How to create or modify the Notes programmatically with formatting seems the much more difficult question.
You can readily determine what format codes are used by creating a note in RM with examples of each and then inspecting the corresponding field with sqlite. If it is a blob type, you can readily view it in text format by CASTing it or by using a string function on it such as TRIM or SUBSTR.
How to create or modify the Notes programmatically with formatting seems the much more difficult question.

Quote from kevync on 2023-06-30, 12:33 pmThe formatting seems very limited withing editor itself Maybe other options.
Unclear if more are available if used outside the editor -- force line breaks / tables and so on.
Normal
<b>Bold</b>
<i>Italic</i>
<u>Underline</u>
The formatting seems very limited withing editor itself Maybe other options.
Unclear if more are available if used outside the editor -- force line breaks / tables and so on.
Normal
<b>Bold</b>
<i>Italic</i>
<u>Underline</u>

Quote from thejerrybryan on 2023-06-30, 2:03 pmThose are the only options.
The RM note editor is basically just a plain text editor with very minor enhancements. The only enhancements are those you have noted. Tables definitely are not supported. Fonts are not supported. Indents are not supported. Etc.
Line breaks are stored in RM notes as a carriage return and line feed sequence, the same as in text files in Windows but UNIX style text files only use the carriage return if I remember correctly. You can insert line breaks from SQLite if you know where to insert them. The carriage return and line feed sequence is coded as CHAR(13) || CHAR(10) in SQLite. That probably looks a little funny, but it's the ANSI codes in decimal for carriage return and line feed. It's essentially a Ctrl-M followed by a Ctrl-J. I'm more familiar with the hex codes, i.e., 0x0d0a, but SQLite uses the CHAR function with decimal arguments, one byte at a time.
Even within those formatting restrictions, it's very difficult to see how SQLite could be used to make global formatting changes. The problem would be recognizing exactly which strings would need to be enclosed by <b>...<.b> or exactly where the CHAR(13) || CHAR(10) would be inserted.
Those are the only options.
The RM note editor is basically just a plain text editor with very minor enhancements. The only enhancements are those you have noted. Tables definitely are not supported. Fonts are not supported. Indents are not supported. Etc.
Line breaks are stored in RM notes as a carriage return and line feed sequence, the same as in text files in Windows but UNIX style text files only use the carriage return if I remember correctly. You can insert line breaks from SQLite if you know where to insert them. The carriage return and line feed sequence is coded as CHAR(13) || CHAR(10) in SQLite. That probably looks a little funny, but it's the ANSI codes in decimal for carriage return and line feed. It's essentially a Ctrl-M followed by a Ctrl-J. I'm more familiar with the hex codes, i.e., 0x0d0a, but SQLite uses the CHAR function with decimal arguments, one byte at a time.
Even within those formatting restrictions, it's very difficult to see how SQLite could be used to make global formatting changes. The problem would be recognizing exactly which strings would need to be enclosed by <b>...<.b> or exactly where the CHAR(13) || CHAR(10) would be inserted.

Quote from kevync on 2023-06-30, 7:00 pmI did programming on a PDP 11 in ~19080 -- CTRL-G rang the keyboard bell 😉 I have visual plan -- but I can accomplish the bare minimum of what I would like to to with those base formatting it basically would re-write most of the exist notes on some criteria. Thanks that was very helpful. I wish font size / indent and/or tables were possible but I can live with the basic stuff.
I did programming on a PDP 11 in ~19080 -- CTRL-G rang the keyboard bell 😉 I have visual plan -- but I can accomplish the bare minimum of what I would like to to with those base formatting it basically would re-write most of the exist notes on some criteria. Thanks that was very helpful. I wish font size / indent and/or tables were possible but I can live with the basic stuff.

Quote from Richard Otter on 2023-07-02, 12:08 amThe notes editor appears to support full HTML, but it seems to strip out all tags (except the 3 you mentioned). There are some times, maybe in 9.0.4, where you could paste in a html table from a web page and it would look just like the web page. Save it and the tags are stripped out to leave plain text.
in 9.0.5, it seems to ignore the paste command if html is on the clipboard. It all seems kind of random, I don't have time for it....
Another new behavior in 9.0.5 is the editor's use of the non-breaking space character. I haven't investigated when it substitutes nbs for sp, but it does it often.
My feeling is that this is data corruption. I want the bytes coming out to be the same as the bytes I put in.
The notes editor appears to support full HTML, but it seems to strip out all tags (except the 3 you mentioned). There are some times, maybe in 9.0.4, where you could paste in a html table from a web page and it would look just like the web page. Save it and the tags are stripped out to leave plain text.
in 9.0.5, it seems to ignore the paste command if html is on the clipboard. It all seems kind of random, I don't have time for it....
Another new behavior in 9.0.5 is the editor's use of the non-breaking space character. I haven't investigated when it substitutes nbs for sp, but it does it often.
My feeling is that this is data corruption. I want the bytes coming out to be the same as the bytes I put in.

Quote from kevync on 2023-07-02, 8:30 amThanks Richard-- I know multiple changes have been made over previous versions.
I suspect/guess at least for now they have limited (stripped to bare minimal) to reduce issues. It acts like a stripped version of MS Wordpad. Hopefully we will see more options available.
Kevin
Thanks Richard-- I know multiple changes have been made over previous versions.
I suspect/guess at least for now they have limited (stripped to bare minimal) to reduce issues. It acts like a stripped version of MS Wordpad. Hopefully we will see more options available.
Kevin

Quote from thejerrybryan on 2023-07-03, 8:44 amI described the editor as basically a plain text editor. That's mostly the way it appears to the RM user interface.
But Richard Otter is correct that the actual editor is an HTML editor and that it has been set up to strip out all HTML codes except the three that have been supported historically by RM's old plain text editor. I wonder if there are future plans to turn the full HTML support back on.
And by the way, I think we have all seen times where the actual editor in RM8/9 doesn't strip out the HTML properly and you see undesired HTML stuff in a note that you as a user didn't put there.
I described the editor as basically a plain text editor. That's mostly the way it appears to the RM user interface.
But Richard Otter is correct that the actual editor is an HTML editor and that it has been set up to strip out all HTML codes except the three that have been supported historically by RM's old plain text editor. I wonder if there are future plans to turn the full HTML support back on.
And by the way, I think we have all seen times where the actual editor in RM8/9 doesn't strip out the HTML properly and you see undesired HTML stuff in a note that you as a user didn't put there.

Quote from kevync on 2023-07-03, 8:56 amYes, agreed hyperlinks is one example that display correctly depending on situation. Full HTML support would be nice or something close to that. I suspect they encountered too many issues so they turned things off. I guess we will see something down the road. I would like to and a Census grid to my Census source/fact for example.
Yes, agreed hyperlinks is one example that display correctly depending on situation. Full HTML support would be nice or something close to that. I suspect they encountered too many issues so they turned things off. I guess we will see something down the road. I would like to and a Census grid to my Census source/fact for example.
Uploaded files:

Quote from Richard Otter on 2023-07-09, 11:48 pmI wish we knew in what direction RM was headed.
Is RM inc moving toward the editor supporting HTML or not.Right now, my census and passenger list tables are all aligned by using space chars. That was fine in RM7 where I could specify use of a monospaced font.
My source transcriptions also contain small amounts of XML I use to separate content from meta data. I'm very concerned about that as well.
I wish we knew in what direction RM was headed.
Is RM inc moving toward the editor supporting HTML or not.
Right now, my census and passenger list tables are all aligned by using space chars. That was fine in RM7 where I could specify use of a monospaced font.
My source transcriptions also contain small amounts of XML I use to separate content from meta data. I'm very concerned about that as well.