kotlin-playground
kotlin-playground copied to clipboard
Add offline mode
This PR adds an ability to opt out of any communications with server.
Possible usecases are: strict content security policy, user data protection, offline support
Hi! Thanks for your help =)
We already have "offline mode". Just use data-highlight-only attribute. So, if u want to prevent all request to server just forbid all requests in web-demo-api file when data-highlight-only is true.
Just use
data-highlight-onlyattribute
It sets codemirror to readonly mode
Do you want to edit code without runnable? What is your point? U can just use plain Codemirror library instead of kotlin-playground.
So, we can add offline attribute and prevent all request to server just forbid all requests in web-demo-api file
just use plain Codemirror library instead of kotlin-playground.
I use the //sampleStart///sampleEnd feature
Okay! Let's patch file with requests instead of adding a lot of conditions in several files) What do u think?
@AlexanderPrendota
patch file with requests
You mean, pass offline option to each of the functions in https://github.com/JetBrains/kotlin-playground/blob/master/src/webdemo-api.js ? That wouldn't remove Run button and autocompletion override
remove Run button
Just add a condition to .monk file
autocompletion
why do you need to override completion method?
Just add a condition to .monk file
Done already
why do you need to override completion method?
I need the contrary: avoid overriding default CM autocomplete when it's known to be useless. Same for shortcuts
Hey! I put a9bb058. So, we dont add editor hints and other options in readonly mode.