Save (2)

I read the preview of markdown. But he just renders the interface. If I want to edit it, I can control it. But if I want to save it, what should I do

[original thread by yangyangyihao]

You should use the editor to edit, you can open editor and preview side by side and changes/scrolling will be kept in sync for you.

From preview double click on text which you want to edit I think it should open the editor.

[yangyangyihao]

Thank you very much for your answer, but I really don’t know much about it. There are few documents to read. I want to know how to open the editor. Can the editor and custom rendering appear at the same time

please study https://github.com/TypeFox/theia-workshop

it shows how to provide custom editor for json file next to a code editor

[yangyangyihao]

Thank you very much for your answer. I’ve seen this example. But he just opened a codeeditor synchronously. Modify the module synchronously. No saving or real saving is in codeeditor. If I don’t want to use codeeditor to implement the function of saving, what should I do

sorry, i don’t understand, maybe you can share some mock up instead of words :slight_smile:

[yangyangyihao]

[yangyangyihao]

I want to realize the function of saving here. Instead of file saving in codeEditor.I want to save change when I Press down ‘ctrl+s’.But jsonform editor doesn’t seem to do this. Its file saving is realized through codeEditor

[yangyangyihao]

I want to monitor ‘Ctrl + s’ here. What should I do when I press’ Ctrl + s’ that run a function.

You widget should implement SaveableSource by using MonacoEditorModel.save.