4513echo
https://i.gyazo.com/a018ba192e5ff222e12f89eff8f94faf.jpg
各種リンク
code:script.js
scrapbox.PopupMenu.addButton({
title: 'format',
// 選択したテキストのインデントをTabにそろえる
onClick(text) {
return text.split("\n")
.map((line) => line.replace(/^\s+/g, (s) => s.replace(/\s/, "\t")))
.join("\n");
},
});
scrapbox.PopupMenu.addButton({
title: 'sort',
onClick(text) {
return text.split("\n").sort().join("\n");
},
});