Hello hello. I wrote an article teaching how to c...
# feed
l
Hello hello. I wrote an article teaching how to create a text editor using my Writeopia SDK: https://medium.com/@lehen01/compose-multiplatform-quickly-develop-a-feature-rich-text-editor-6352687a8741. Read to learn to create a text editor with drag an drop of lines, multi selection, image support, spans (bold, italic...), import and export to markdown and many more features.
🔥 3
u
This is really informative. Can you add a feature to allow @ mentions like slack does?
l
Hey, that's a very nice suggestion. I'll put this in the issues. Thanks your the idea!
u
I’ve been looking for a pure compose based solution for this problem and unfortunately none exist. Android libraries like Spyglass are tightly coupled to EditTexts which makes them unusable really
l
When I implement, I have send you a message, then you check how it was implemented, if that's all you need, it may to have a tailor made solution. If you check the solution, if should be fine to create. If should be something like a key interceptor + dropdown menu =]
u
Right if you can keep the UI decoupled from the triggering logic it would be cool. So that users can implement their own UI solutions. Ideally the callbacks should expose simple methods for adding removing and triggering operations. Then UI can be extensible
l
@Leandro Borges Ferreira could this support latex equations? If yes, it would be HUGE
l
Well, it certainly should. I'll add this to the roadmap.
Wait wait @Lukas Anda. Do you mean to drawing the equations using canvas instead of a WebView?
That indeed would be huge, but crazy hard to do =|. I also would love that this exists for Compose Multiplataform
l
Yes that's what I meant. I know github provides a service that gives you export to png basically, but embedding images to text is another challenge
l
This is possible. The SDK supports images, no problems. If it is okay to generate an image for the equation in the backend and then just load the image, this works. You can add the image programaticaly using the SDK. An example of the editor built on top of the SDK showing images:
🤔 I'll explore how to show a latex equation by generating a image in the backend and showing to the user just the image and then offering a "edit mode"
l
One of the example links is this
<https://latex.codecogs.com/svg.latex>?\Large&space;x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
l
Hey, that's cool! I think I can use that. Give me some time and I'll update you about it
So, you need something like this? I used this page to create a png image and display it in the editor:
I pressed cmd + E to generate the equation
l
Well, almost. I want to be able to include it in the text. My usecase is that I am building an exam app that has several assignments and each of them can have several latex formatted formulas
l
Like the formula is a Spannable? Something like: [...] This is the formula
[the formula comes here]
that explains the integration in time.
l
yup something like that
l
I see. Yep, both options would be interesting. I'll polish this first approach and the take a look if it is possible to add inside the text.
l
It's in Slovak if you are fine with that but basically I want to replicate these questions: https://www2.nucem.sk/dl/6154/251447_RT_MAT.pdf
l
Hi Lukáš. I create the version 0.12.0 of the SDK, and it supports equations =D 🎉 🎉 🎉 . I'll create the documentation tomorrow, but you can check how I used in this PR: https://github.com/Writeopia/Writeopia/pull/492 Inlining equations is going to be too time consuming and I busy creating the backend of the SDK (so users can help host it). One solution would be to add an image when you need to present equations. An use A, B, C, D options vertically. To use A, B, C... options horizontally, the SDK will need a system of columns. If you would like to add support for it, I would love some help with it. If you use the SDK and you would like to suggest something about this feature, please let me know!
K 1
🤩 1
l
Amazing, great job!