<%
const companyName = await tp.system.prompt("Geben Sie den Firmennamen ein:");
const searchText = "Beispiel-Unternehmen GmbH";
const files = app.vault.getMarkdownFiles();

for (const file of files) {
    let content = await app.vault.read(file);
    if (content.includes(searchText)) {
        const updatedContent = content.replace(new RegExp(searchText, 'g'), companyName);
        await app.vault.modify(file, updatedContent);
        console.log(`Ersetzt in: ${file.path}`);
    }
}
%>
