Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0 rewrite #447

Open
Ionaru opened this issue May 17, 2022 · 14 comments
Open

3.0 rewrite #447

Ionaru opened this issue May 17, 2022 · 14 comments

Comments

@Ionaru
Copy link
Owner

Ionaru commented May 17, 2022

Is your feature request related to a problem? Please describe.
Current codebase of the editor contains a lot of legacy code, is difficult to maintain and depends on a toolchain that is no longer optimal anno 2022.

This is basically my wish list for v3.0.

Describe the solution you'd like
A complete rewrite of the codebase, split code over multiple files, written in TypeScript and SCSS.

Describe alternatives you've considered

  • Keep the editor as it is, difficult to maintain and improve, I don't think this is feasible long-term.
  • Slowly migrate to more modern code by rewriting parts, chance of being stuck inbetween legacy and modern code is high. Also difficult to keep the editor working like it did with the old code.

Additional context

Progress

You can follow progress on the https://github.com/Ionaru/easy-markdown-editor/tree/v3 branch.

@vanillajonathan
Copy link
Contributor

Part of the modern toolchain could also be Vite.

npm create vite@latest easy-markdown-editor -- --template vanilla-ts
cd easy-markdown-editor
npm install
npm run dev

This makes it easy to develop with hot reload.

@Ionaru
Copy link
Owner Author

Ionaru commented Jun 16, 2022

I agree and is something I'm considering, it does seem to be more focused on web applications and less on packages like easymde. Also it uses Rollup under the hood anyway.

A build command that bundles your code with Rollup, pre-configured to output highly optimized static assets for production.
https://vitejs.dev/guide/

@Ionaru
Copy link
Owner Author

Ionaru commented Aug 7, 2022

Maybe the new version of the editor should be a custom Web Component? The editor could be built using Vue and exported to run anywhere.

Edit 2022-11-16: I've looked into this, if the editor were a Web Component, providing options and other JavaScript API features would be difficult for any user of the editor.

@Vintagewally
Copy link

would be nice to have the possibility to toggle the spell-checker on and off while writing

@vanillajonathan
Copy link
Contributor

would be nice to have the possibility to toggle the spell-checker on and off while writing

I think the spellchecker should be removed since browsers already come with built-in spellcheckers anyways.

@Ionaru
Copy link
Owner Author

Ionaru commented Jan 26, 2023

would be nice to have the possibility to toggle the spell-checker on and off while writing

I think the spellchecker should be removed since browsers already come with built-in spellcheckers anyways.

I can still see some use for it with for forms in languages that a browser would not be set to. But maybe off by default?

@vanillajonathan
Copy link
Contributor

I can still see some use for it with for forms in languages that a browser would not be set to. But maybe off by default?

In that case it is arguably useful. On the other hand it would arguably be nice to drop the dependency too tho which would result in less code, reduced bundle size and a smaller API.

@ThatXliner
Copy link

image

@umajho
Copy link

umajho commented Mar 13, 2023

Hello. I tried to migrate the current codebase to rollup, and managed to pass all the tests.

Although the changes are not extensive, since this involves replacing a build system, it requires careful planning. I think my causal work is not sufficient to make a pull request.
Instead, I think it is better to put what I have done here, which may provide some useful insights.

@Ionaru
Copy link
Owner Author

Ionaru commented Apr 28, 2023

I've now pushed the https://github.com/Ionaru/easy-markdown-editor/tree/v3 branch with the current (incomplete) state of the rewrite.

@dwjohnston
Copy link

dwjohnston commented Aug 29, 2023

Can I recommend documentation for how to test as a first class concern?

I'm currently facing an issue where due to our various customisations, the keyboard shortcuts have broken, so I'm currently going through and writing tests. But writing tests for this library is difficult with React Testing Library as JSDOM doesn't behave particularly well (eg jsdom/jsdom#3002 jsdom/jsdom#1937).

So basically, the ask is for documentation that advises about how to test code that uses this library.

I'm happy to help, this is something I'm passionate about.

@velezh
Copy link

velezh commented Mar 15, 2024

I've now pushed the https://github.com/Ionaru/easy-markdown-editor/tree/v3 branch with the current (incomplete) state of the rewrite.

Hello @Ionaru !
You doing great work.
Could you please share any updates on it? Any status or progress of 3.0

Thanks a lot

@Viktor-Ivliev
Copy link

I've now pushed the https://github.com/Ionaru/easy-markdown-editor/tree/v3 branch with the current (incomplete) state of the rewrite.

Hello @Ionaru ! You doing great work. Could you please share any updates on it? Any status or progress of 3.0

Thanks a lot

It's starting to look like another abandoned library =(

@Ionaru
Copy link
Owner Author

Ionaru commented Jun 21, 2024

Not abandoned.

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

No branches or pull requests

8 participants