Open danielo515 opened 6 years ago
@danielo515,
You can disable editing by calling editor.readOnly(true)
on an editor instance.
Regarding hot reloading, editor-widget will hot reload an open file, assuming text-buffer supports this feature, which may not be the case.
Hope that helps!
Hello @dbkaplun , thanks for your prompt response. Exactly what I needed. Thank you very much. Assuming it is not able to hot-reload a file, how could I add new content to the editor window ? Just append it at the end I mean.
Regards
I just tried and on my computer the file is hot reloaded, very cool. I think it works as long as the file descriptor opened and then closed.
Now I have to figure out how to accept text input on blessed, which is getting tricky
Stupid me, I can just use your editor for both tasks. However, I have a couple of doubts about it:
Many thanks for your support, and of course for this awesome tool
editor.textBuf
. I think there is an editor.textBuf.setText()
which will replace the entire buffer. The widget will automatically watch and render changes.
Hello,
Thanks for this gread widget. I want to use it without editing capabilities, this means just syntax highlight and scrolling. I want to control the text content programmatically. I'll be adding content to a file, I don't know if hot reload of a file is supported or If I have to feed editor-widget myself.
Thanks in advance.