With Xojo 2025r2.1, I want to be able to Save / Open Styled Text either created in a Xojo application or Pasted from macOS TextEdit.
Xojo 2025r2.1
macOS 26.1
With Xojo 2025r2.1, I want to be able to Save / Open Styled Text either created in a Xojo application or Pasted from macOS TextEdit.
Xojo 2025r2.1
macOS 26.1
A change may be coming in the next release to address the slowness of handling StyledText paragraph alignment. I’m hoping that also fixes the slowness of StyledText RTF handling. If it does, then I’d feel better about using the built in RTF routines to save and load StyledText.
There is a technique to save and load StyledText here: Retrieving the styled text in saved DBKit.TextArea inputs
Do you have a ticket number for this? I have a project that’s holding off on the next release because of Liquid Glass, but RTF improvements would be something we’d consider.
In the old time, I used a Declare from … a macOS declare project (I forgot its name).
And I do not found it in the Xojo.com web.
Someone ?
PS: not having a rule is a high loss in that case (set Tabs).
I thought this had been assigend a Milestone: https://tracker.xojo.com/xojoinc/xojo/-/issues/78634
but it does not appear to have been after all or…
I may have been looking at this issue, which has a milestone: https://tracker.xojo.com/xojoinc/xojo/-/issues/64636
It looks like is one of those that the milestone just gets changed to the next version, since 2023r1.
It was changed to 2025r3 4 months ago and is not fixed yet. If they plan to release 2025r3 this year it may not make it.
It’s a shame that in my 20+ years of Xojo use StyledText hasn’t improved any. RTF support has been so poor….
this is a good alternative: switch to html editor
(post deleted by author)
This may be a technique to save and load a multi-style DesktopTextArea in its entirety. It works on my Mac so far. Have also been able to save and load random RTF documents
It relies on the System Clipboard however, so user clipboard contents and DTArea selection need to be preserved. Maybe there is another way to access these resources?
The idea is to copy some or all of the area using DTArea.copy and
Var ClipString As String=cp.RawData(“public.rtf”)
which places that raw data into a string.
The string can be reused, saved to disk or database record (not tested) and reloaded to a DesktopTextArea using cp.RawData(“public.rtf”)=ClipString and DTArea.paste.
See the attached project as a proof of concept.
Methods to create and to use the string.
ClipString=DTA_ToClipString(inDTA As DesktopTextArea)
DTA_FromClipString (DTA As DesktopTextArea, ClipString As String)
StyledText_ClipMethod.zip (11.2 KB)
I’ve been frustrated with the fact that Xojo does not have a true cross platform rich text control for desktop. By cross platform I mean Windows, MacOS, and Linux. I looked at the FormattedTextControl on GitHub but it was API 1.0 and didn’t convert to API 2.0 nicely. I finally decided to make my own using the DesktopHtmlViewer and Pell javascript that I extended for the additional features RTF needed. I also built an HTML to RTF converter in Xojo for it. You can try KCG Rich Text out at HTTP://KCG-Software.com to see how it has come along. Ultimately I would like to turn it into a control and even better a plugin. That’s if I can figure out how to do that. Since Pell is open source on GitHub, I figure it will only make sense to put it there as open source when it seems useful to others. This is the ramblings of an old retired developer.
KCG Rich Text is now on GitHub.
Got a really weird error when trying to run the project as is: https://tracker.xojo.com/xojoinc/xojo/-/issues/81546
Exception: The project could not be built, but the error reporter did not report back an error as expected
I built the Windows and macOS versions on Windows with no issue. I don’t own a Mac so I lease on HostMy Apple for testing the compiled macOS version. I did not run into any issue compiling in Windows 11 in Xojo 2026r1.6 and it ran fine on Tahoe Version 26.5.1 (25F80). I don’t compile on HostMy Apple because it has very limited memory and ssd space. If you have any ideas as to what I can do to help with this let me know.
Got the issue solved: Xojo doesn’t like to have a codesign identity missing. Removing the name wasn’t enough. I had to select my own identity and then I got the app running. I’ll update the ticket.
Cool ![]()