###1An internal copy/paste buffer23MOTIVATION: There is no way to sync with the official operating system copy/paste buffer,4due to security restrictions. However, for some platforms (iPad, I'm looking at you!),5it's still very useful to have our own internal copy/paste buffer. This is it.6It stores a string right now. Who knows, maybe someboday it'll do interesting7richer content too.8###910buffer = ''1112exports.get_buffer = ->13return buffer1415exports.set_buffer = (s) ->16buffer = s ? ''17try18# https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand19# NOTE: there is probably no context in CoCalc where thi will actually work...20document.execCommand('copy')21return222324