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

Support using a function instead of a plain string for urlText #61

Open
nogweii opened this issue Jul 20, 2015 · 2 comments
Open

Support using a function instead of a plain string for urlText #61

nogweii opened this issue Jul 20, 2015 · 2 comments

Comments

@nogweii
Copy link

nogweii commented Jul 20, 2015

I'd like to expand the syntax used for markdown in the urlText, like by specifying the height & width (an extension to normal markdown):

![file_name)(/imgs/123456789.png =120x60)

Though I don't want to hard-code a default size, and instead customize it based on data returned from the server. My thought is that a function could be set for urlText that will be passed in the data returned from the server. The function is expected to return a string that will be placed literally into the textarea (so if you opt to use the function, you must make sure to include the attachment's name in the string).

@Rovak
Copy link
Owner

Rovak commented Aug 11, 2015

I'll add another hook for it, i think it can be added to the onFileUploadResponse response and add another parameter in which the resulting text can be modified that will be inserted in the textarea

@zilkey
Copy link
Contributor

zilkey commented Mar 23, 2016

Here's one way it can be done: #70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants