It’s the same on macOS 15.3 and on Windows 11
Thanx for the video, must have broken. Will fix today.
How do I insert an image into the document? Tried drag/drop but that seemed to do nothing.
Edit: OK I found an image checkbox which I ticked, and an image icon appeared in the toolbar, but clicking it did nothing, seemingly.
@Alexei_Vinidiktov1
The sticky toolbar issue is fixed. Will upload today.
@TimStreater
It is not possible to drag images at this point, hence AllowTextDragDrop
If you paste styled content into the control using Command+V / Control+V on Mac/Win, with images allowed, the images will be added to the content, however the drag & drop mechanism is routed by another path at the moment and images are not supported (via drag & drop).
OK - forgetting drag/drop for the moment, are you planning to have it so that clicking on the toolbar-button for images will bring up a select-file dialog so I can choose an image, to be inserted in the document at the insertion point?
@TimStreater Yes, precisely.
That’s on my roadmap as we need that in our main application (Eldr) which uses the control. Clicking the icon will trigger a select-file dialog. I think I will get it done mid-this-week.
A bit late for this comment but, really, the old “Hit by a bus” routine? The only time I saw an App “die” when the author died was in an old movie with George C Scott, “The Last Run”. In that movie, Scott’s car died when he did. I can assure you that should the Author of this control meet some demise, the control will continue working that day, and afterwards, just as it did the day before.
Also, no matter how extensive in-house, or “lab” testing, it can never cover all the scenarios the app will find “out in the world”. By releasing this for use, albeit encrypted, it gets real-world exposure and the author gets feedback, pluses and minuses, that can inspire further tweaking - making the control even better. To that end, the encryption adds a level of stability and assures that any reported problems emanate from the “published” control and not from a modification of the open source.
The short of it is, it seems to me the most valid response to someone who shares their work is, “Thank you.”
Updated RTEdit to 0.9.7
I’ve just updated the control to v0.9.7 addressing a few bugs reported by fellow Xojo forum members.
Fixed toolbar stickiness issue in Snow theme.
Using the Snow theme caused the toolbar to fail to remain fixed at the top of the editor when scrolling. This fix ensures that the toolbar now stays in place, even when users scroll through the content, providing a consistent and accessible toolbar experience throughout.
Credit : @Alexei_Vinidiktov1
Fixed focus issue when clicking on the control (empty state with Snow theme).
When using the Snow theme with no content loaded, clicking below a specific pixel amount resulted in the control not receiving focus.
Clicking the image icon in the toolbar now opens a file selection dialog.
The new feature allows users to click the image icon in the toolbar, which opens a file selection dialog. This enables users to browse their computer for an image file, select it, and then upload it directly into the Quill editor. Once uploaded, the image is added to the document, providing a seamless way to insert visual content into the text.
Credit : @TimStreater
Download & Details:
What I am adding:
- Allow document property to be set prior to control fully initializing.
- Image resize
- Emoji support
- Basic table support
- I noticed minor flicker of the control when it initializes on certain machines running Windows
- Export document directly to PDF
- SaveAsXML (including user variables / values / mentions)
- SaveAsJSON (including user variables / values / mentions)
@Paul_Chance Thanx mate
Sorry, but you are just wrong here. The reason Greg brought that up is that last year a long-time Xojo developer passed away unexpectedly, orphaning his commercially available classes (RubberViews). No one was ever able to contact his heirs to make arrangements to continue development, open the source, or relicense it, so this valuable resource was lost and his customers left in a limbo state.
This is a real business risk consideration and not abstract paranoia.
I will entrust @Paul_Chance with the code in case of my sudden passing.
… please end this discussion, i think all points have been heard.
Hmmm - still can’t get a dialog to appear when clicking the image button in the toolbar.
macOS Sonoma 14.7.2
IDE 2024r4.2
Working on it …
Control has been updated to version 0.9.8
New event:
- ErrorMessage
New Methods
- ExportDocumentAsJSON
- ImportDocumentFromJSON
The main addition in version 0.9.8 is the possibility to Export and Import the document to a JSON document. You can include a list of all your mentions to be saved to the document, color scheme, tags, editor properties and more, and load them all back using the ImportDocumentFromJSON. Both functions have the following parameters:
Optional IncludeTags As Boolean = True
Optional IncludeMentions As Boolean = True
Optional IncludeColorScheme As Boolean = False
Optional IncludeSettings As Boolean = False
Optional includeProperties As Boolean = False
Optional IncludeCustomCSS As Boolean = False
The root of the JSON contains multiple top-level keys, each representing a section of settings, properties, CSS styling, and more. These are the main parent elements:
"settings"
: Contains various configuration options for RTEdit, including alignment, toolbar settings, and other editing features."properties"
: Represents specific properties related to text formatting options."css"
: Defines your custom CSS rules that are applied to various elements of the editor."tags"
: Holds any metadata about the file, such as its name, ID, and author."colorScheme"
: Contains color codes for various document elements."mentions"
: Specifies different categories of mentions / variables (e.g., braces, brackets, etc.)"document"
: Contains the title and content data of the document.
The ErrorMessage can be used to catch errors when Exporting / Importing the document to JSON.
To test insertion of mentions (variables) into your document, you can type # $ % { or [ to trigger an insertion, in the demo project.
What I am working on:
- Bypassing MacOS restrictions that prevent insert image toolbar button to work (almost there).
- Support for tables.
- Improved support for Emojis
- Allow users to assign custom characters to be used for mentions.
- Image resizing
- Image compression
Download the control and demo using the GitHub link below. Happy coding!