Feature request: Add support for inline placeholders
Absolutely love this library and it's API.
The only big feature that is missing IMHO, is support for (inline) placeholders that can be custom rendered. This would allow for rendering images, controls or anything custom you may want to draw.
The placeholders just have a size and (baseline) alignment, and possibly an event that is fired to render it.
The Unicode Object Replacement Character (U+FFFD) can be used to represent the placeholder in the text.
See Flutter's ParagraphBuilder.addPlaceholder method for possible API.
Hi @erikvanbilsen
Glad you're enjoying RichTextKit :)
I've definitely considered support for this but just haven't implemented it because I haven't had the need for it myself. You're right in that it's probably a reasonably easy thing to add and I'll look into it.
(I'm about to start building a text editor using RichTextKit so I'm sure I'll be doing some work on it over the coming weeks - I'll see if I can squeeze it in - no promises though).
Brad
Thanks for looking into it when you have some time. Of course I understand you can't promise. Good luck with the text editor!
Just found this issue and I guess that would help me with my requirement. Unfortunately it is quite old and it seems there hasn't happened anything yet.
Hey @toptensoftware!
I would need this feature and am happy to help. If you are not able to implement this on your own for the time begin - could you guide me on how I could achieve it? For my case it would be totally good to add some kind of "ImageParagraph" and render an image instead of text with a certain height. But maybe there is an easier/better solution using the Unicode Objtect Replacement Character above? Having something to include custom rendering stuff at a specific location would be a highly helpful addition!
Thanks for considering that addition!
I needed one for my custom editor too. Currently, I am able to find the workaround for paragraph way by modifying the editor code. However, I still cannot really find a way for a custom inline. The difference here is that the paragraph way will add images separately, but for the inline, the image can be in the middle of the text on the same line. I do have an idea of how to quickly workaround this, but that requires modifying the source code directly and because the workaround is not perfect, I don't think it is suitable for a PR.