Show Vue: Snippet Editor – a code screenshot maker built with Vue 3 and CodeMirror 6 #16181
markodenic
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Sharing Snippet Editor, a free code screenshot maker built with Vue 3 (Options API), Vite, Tailwind CSS and CodeMirror 6. Paste code, pick a theme, font, background and window style, and export a PNG or copy it to the clipboard. No account.
A few Vue details that might be useful if you build something similar:
App.vueowns all editor state in a singlesettingsobject. Child components never mutate it; they emitupdate(key, value)and the root applies it. That made persistence to localStorage (minus the code itself) and the Reset button trivial.Compartment. A watcher on the relevant setting callsview.dispatch({ effects: compartment.reconfigure(...) }), so switching a theme keeps the cursor, scroll position and undo history.Happy to hear feedback, especially on the editor UX.
All reactions