swish icon indicating copy to clipboard operation
swish copied to clipboard

Added the option to download the code stored in a notebook

Open damianoazzolini opened this issue 5 years ago • 3 comments

I've added a button to download the prolog code of a notebook in a file called program.pl

damianoazzolini avatar Jan 19 '20 21:01 damianoazzolini

Thanks. Looks useful, but I think it is a little broken. See comment.

JanWielemaker avatar Jan 20 '20 09:01 JanWielemaker

Do you have an example where the code does not work as expected?

damianoazzolini avatar Jan 20 '20 11:01 damianoazzolini

Not directly, but fetching the rendered code seems asking for trouble. The CodeMirror editor works from a pure JavaScript object representation of the text. Getting the rendered text may both get too much and too little. Having to delete leading line numbers is already an indication.

JanWielemaker avatar Jan 20 '20 11:01 JanWielemaker