Skip to content
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 replaceValue method to work with with strings #63

Open
chrisleesch opened this issue Nov 13, 2015 · 0 comments
Open

Allow replaceValue method to work with with strings #63

chrisleesch opened this issue Nov 13, 2015 · 0 comments
Milestone

Comments

@chrisleesch
Copy link

Hi again,

I am using your plugin with a .NET Script Service. These expect their parameters as a stringified JSON object, like this:

data: JSON.stringify({ 'pattern': '{{{q}}}' })

While the request itself works fine that way, the plugin fails to replace {{{q}}} in there. I worked around that like this:

if (typeof (this.options.data) == 'string')
    this.options.data = this.options.data.replace('{{{q}}}', this.plugin.query);
else
    this.plugin.replaceValue(this.options.data, '{{{q}}}', this.plugin.query);

I would be very thankful if you would integrate this possibility into your replaceValue() function.

Thank you,

Christophe

@chrisleesch chrisleesch changed the title Hi again this.plugin.replaceValue with string Nov 13, 2015
@truckingsim truckingsim added this to the 2.0.0 milestone May 7, 2017
@markhalliwell markhalliwell changed the title this.plugin.replaceValue with string Allow replaceValue method to work with with strings Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants