const data_get = document.getElementById("data_get"); fetch_ask("https://blog.abtmtr.link/api/collections/mtr/posts/quick-q-and-a") .then((x) => x.json()) .then((data) => { data_get.innerHTML = data.data.body .replace(/^### (.*?$)/gim, '

$1

') // h3 tag .replace(/^## (.*?$)/gim, '

$1

') // h2 tag .replace(/^# (.*?$)/gim, '

$1

') // h1 tag .replace(/\[(.*?)\]\((.*?)\)/gim, '$1') // link text .replace(/\*\*(.*?)\*\*/gim, '$1') // bold text .replace(/\*(.*?)\*/gim, '$1') // italic text .replace(/\`(.*?)\`/gim, '$1') // code text });