crude basic animation and button

This commit is contained in:
Víctor Losada Hernández committed 2026-05-13 21:55:53 +02:00
1 parent 7c30380ca6
commit 0540479e09
6 files changed
+66 -9

No files matched your search

+17 -7
View File
@@ -12,14 +12,24 @@ export async function formatCSS(view) {
parser : 'css',
plugins : [postcssPlugin]
});
if(formatted === code) return;
view.dispatch({
changes : {
from : 0,
to : view.state.doc.length,
insert : formatted
}
});
const dom = view.dom;
dom.classList.add('cm-flash');
setTimeout(()=>{
dom.classList.remove('cm-flash');
view.dispatch({
changes : {
from : 0,
to : view.state.doc.length,
insert : formatted
}
});
}, 500);
}
const indentLess = (view)=>{