const { convertFileSrc, invoke } = window.__TAURI__.core; const { homeDir, join } = window.__TAURI__.path; const { readFile } = window.__TAURI__.fs; const appDataDirPath = await homeDir(); const filePath = await join(appDataDirPath, 'Pictures/wallpaper.png'); const assetUrl = convertFileSrc(filePath); let text = ""; let placeholder_path = "FILEPATH"; let path_template = convertFileSrc(placeholder_path); let textarea = document.getElementById('markdown_input'); textarea.addEventListener('input', ()=> { text = textarea.innerText; var tag_id = document.getElementById('rendered_markdown'); invoke("parse_markdown", { document: text, pathtemplate: path_template}).then( (ret)=>{ var tag_id = document.getElementById('rendered_markdown'); tag_id.innerHTML = "
".concat("", ret).concat("", "");
// tag_id.innerHTML = assetUrl.concat(" ", ' \n