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
preProcess like facility, or specific event, at saving? #418
Comments
Super easy with an event. Here is an example from ARIA: if (respecEvents) { Basically, just subscribe to the save event, then in the event handler Hope this helps. On Mar 29, 2015 3:50 AM, "Ivan Herman" notifications@github.com wrote:
|
Ah! These are the infos I did not have: that this save event is raised and that there is even a respec utility to add a callback. Thanks, I can certainly take it from here. (Is that documented somewhere and I missed it?) Thanks I. Ivan Herman (Written on mobile, sorry for brevity and misspellings...)
|
Yes. It is in the RepSpec documentation at On Sun, Mar 29, 2015 at 12:42 PM, Ivan Herman notifications@github.com
Shane McCarron |
I will need a new pair of glasses... Thanks |
On the technical level: is it possible and, if yes, how; if not, would it be possible to have a
preProcess
-like feature when saving to HTML? I.e., I could add some simple jQuery function that would be executed before generating the final (X)HTML (and of course the script would then be removed from the output)? Alternatively, is there an event that is raised when save happens, in which case a handler to that event could be added through the currentpreProcess
?Here is the use case we ran into: we have (on github, but that is a detail I guess) a family of specs we develop in parallel. These documents have tons to cross references to one another. As long as the documents are on the repo, the good approach is to use the github.io links for this, i.e., the editors' drafts would work as expected. However, when saving the files into HTML these cross references should be exchanged against their /TR equivalents.
It is relatively straightforward to write a jQuery function to change the
href
values, especially when we talk about 3-4 editors' drafts only. However, this function should be executed only when the file is dumped into HTML; hence my original question.Of course, if the use case can be solved directly through some other means, that would be great, but I have the impression that there might be other use cases as well.
Thx.
/Cc @gkellogg
The text was updated successfully, but these errors were encountered: