Custom widget implements ReactWidget,how to save the file?

custom editor widget implements ReactWidget.
when file close,how to save the file?
or how to implements SaveableSource?

@hyy thank you for the question, your custom widget should implement SaveableSource as you pointed out:

You can look at the implementations of EditorWidget and CustomEditorWidget for inspiration as they both implement SaveableSource:

@vince-fugnitto, Thank you for your help! The problem is resolved.