Skip to content

Added autocomplete and image upload support to compose#77

Merged
elliotBraem merged 6 commits intoNEARBuilders:mainfrom
Megha-Dev-19:update-compose
Jan 23, 2024
Merged

Added autocomplete and image upload support to compose#77
elliotBraem merged 6 commits intoNEARBuilders:mainfrom
Megha-Dev-19:update-compose

Conversation

@Megha-Dev-19
Copy link
Copy Markdown
Collaborator

Resolves #61

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gateway ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2024 6:35pm

@elliotBraem
Copy link
Copy Markdown
Contributor

@Megha-Dev-19 Could this be configured to work with the existing Markdown editor? Was there any specific motivation to use SimpleMDE?

Screenshot 2024-01-23 at 12 06 24 AM

I think we could copy the pattern from mob.near/widget/MainPage.N.Compose.Common -- notice how this Common "wrapper" is able to take in a custom markdown editor (our current) from props, and then passes these functionalities to it.
Feel free to fork this pattern.

For context, the goal is that we can use these features in whatever editor we plan to swap it out for. The implementation should be style agnostic. Also see #83 and #82

@Megha-Dev-19
Copy link
Copy Markdown
Collaborator Author

hey @elliotBraem, the reason I moved to SimpleMDE, the current editor doesn't capture the change in text when it's done outside it's scope, so if I update the post (by using autocomplete), the state is updated but not visible in markdown, since it takes the state only in initial render, but now if I think about it I believe I can move certain things from SimpleMDE code to the existing one to make it work.
do you want to have the editor similar to near.social without the icons for the markdown.?
or do you want to keep them as is?

@elliotBraem
Copy link
Copy Markdown
Contributor

@Megha-Dev-19 Ahhh I see, ya I think this is a similar issue @itexpert120 is running into for #81.

If it's not too much work, I think it's worth the exploration. Ideally, we should be able to swap between the two editors (any editor) with no change in the behavior or extra configuration. Being able to update content would solve #78, too

do you want to have the editor similar to near.social without the icons for the markdown.?

On near.social, there's this special icon that gets clicked and shows the "advanced" markdown editor.

Screenshot 2024-01-23 at 11 42 59 AM

We can keep the editor as it is now, but I like the pattern in mob.near/widget/MainPage.N.Common.Compose; you can swap out whichever editor you use via a widgetSrc in props and it'll work the same

@Megha-Dev-19
Copy link
Copy Markdown
Collaborator Author

Megha-Dev-19 commented Jan 23, 2024

@elliotBraem I have forked the mob.near/widget/MarkdownEditorIframe and made some changes to it to show changes to content when it's done from outside it's own component, it works now, let me know if there is any other change required
cc: @itexpert120, this should unblock your issues as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Compose: AccountId Autocomplete & Attach Image

2 participants