我无法弄清楚当从上下文菜单中单击它时如何插入一个单词,我的代码是这样的:public items:component.ts
<html>
<a> any[] = [
{
text: "hello",
items: [{ text: "Item1.1" }, { text: "Item1.2" }],
},
{
text: "Item2",
},
{
text: "hello2",
}] </a></html>
例如,我想按 hello2,它会写下我用鼠标单击的位置。