forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-09-19 19:20:46 +02:00
parent 868f37af5f
commit 2f200aa8b1
1 changed files with 9 additions and 2 deletions

View File

@ -238,17 +238,24 @@
// markdown
function fugggg() {
var input = document.getElementById('post-text').value;
console.log('fug')
var input = document.getElementById('post-text').value;
console.log(input)
var emojis = Array.from(input.matchAll(/:(.{1,30}?):/gi))
if(emojis != null){
for(i = 0; i < emojis.length; i++){
input = input.replace(emojis[i][0], "<img height=30 src='/assets/images/emojis/" + emojis[i][1] + ".webp'>")
}
}
console.log(input)
document.getElementById('preview').value = 'fugggg'
console.log('biggq')
}
</script>