Building a Universal Drafts System in a VS Code Extension — Part 2: Sync, UI & Remote Drafts
In Part 1, we built the Draft type, DraftsService, and the save/upsert flow. Now for the interesting...
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3563889) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } freerave Posted on Apr 28 Building a Universal Drafts System in a VS Code Extension — Part 2: Sync, UI & Remote Drafts #vscode #typescript #opensource #webdev In Part 1, we built the Draft type, DraftsService, and the save/upsert flow. Now for the interesting parts: loading a draft, keeping the Markdown editor in sync, pulling remote drafts from Dev.to, and building the UI.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV Community.