|
|
@ -62,7 +62,7 @@
|
|
|
|
const output = document.getElementById("output");
|
|
|
|
const output = document.getElementById("output");
|
|
|
|
const copyButton = document.getElementById("copy");
|
|
|
|
const copyButton = document.getElementById("copy");
|
|
|
|
input.addEventListener("keyup", e => {
|
|
|
|
input.addEventListener("keyup", e => {
|
|
|
|
output.value = `<span lang="ja">${input.value.replace(/\[([^\]]*)]{([^\}]*)}/g, "$1<rp>(</rp><rt>$2</rt><rp>)</rp>")}</span>`;
|
|
|
|
output.value = `<span lang="ja">${input.value.replace(/\[([^\]]*)]{([^\}]*)}/g, "<ruby>$1<rp>(</rp><rt>$2</rt><rp>)</rp></ruby>")}</span>`;
|
|
|
|
copyButton.innerHTML = "Copy";
|
|
|
|
copyButton.innerHTML = "Copy";
|
|
|
|
});
|
|
|
|
});
|
|
|
|
copyButton.addEventListener("click", e => {
|
|
|
|
copyButton.addEventListener("click", e => {
|
|
|
|