chore: add helper to clear vditor cache

This commit is contained in:
Tim
2025-08-03 17:33:48 +08:00
parent 67910317e8
commit c3e377ca3c
4 changed files with 21 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
export function clearVditorStorage() {
Object.keys(localStorage).forEach(key => {
if (key.startsWith('vditoreditor-') || key === 'vditor') {
localStorage.removeItem(key)
}
})
}