0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-06-22 07:08:40 +00:00

crude basic animation and button

This commit is contained in:
Víctor Losada Hernández
2026-05-13 21:55:53 +02:00
parent 7c30380ca6
commit 0540479e09
6 changed files with 66 additions and 9 deletions
+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)=>{