-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to configure a proxy to fetch the snippets #12
base: master
Are you sure you want to change the base?
Conversation
I'm not sure I understand the purpose of this feature and what it's enabling that the current thing doesn't. Could you please try explaining again? |
It is a specific use case. The snippets in my presentation are PHP unit tests. They are tasks for the attendees to solve (using a wireless keyboard that goes around). The IDE is configured to treat this as a web project and knows/has a PHP executable. If I now start the IDE built-in webserver the plugin is not able to get the source code directly. The webserver will execute the PHP (only class definitions so nothing happens) and return an empty response. Here is not an configuration in the IDE to disable the PHP executable just for the webserver. Renaming the files or disabling PHP would mean loosing IDE features. Here are two solutions originally. Opening the The configuration option can depend on the used URL. This way I can use the presentation directly from the IDE and publish it without any change. Example: sampler: {
proxyURL: document.location.href.match(/http:\/\/localhost/) ? 'task.php?file=' : ''
} |
8158adb
to
dc6e33f
Compare
Ah, I understand better. Two questions:
|
dc6e33f
to
a1b3e16
Compare
a) proxyURL as string with placeholders, allow to transfer information from the data attributes. Maybe we should move that to a feature request issue and discuss it. It could be useful for some users and does not sound to difficult to implement. |
I am using sampler with PHP snippets, but my webserver (local inside the IDE) support PHP. So I only get empty responses. :-)
A small proxy script allows to fetch the source of the PHP files.
This branch includes the changes for the indentation behavior. Both read options, so they might conflict otherwise.