首页 文章

如何从Monaco Editor发布数据?

提问于
浏览
-2

我是这个领域的新人 . 这就是我想要编码的内容 .

使用post方法在服务器上保存编辑器数据 . 有人可以指导我如何实现这一目标吗?

脚本动态填充Monaco编辑器 . 我正在努力弄清楚如何将这些数据发布到服务器?

我正在看这段代码:https://github.com/Microsoft/monaco-editor-samples/tree/master/sample-editor

1 回答

  • 0

    您可以将编辑器绑定为表单域 . 看看这篇文章here

    function save() {
       // get the value of the data
       var value = window.editor.getValue()
       saveValueSomewhere(value);     
    }
    

相关问题