numbas / editor-docs

Documentation for the Numbas editor
Other
3 stars 8 forks source link

No documentation on 'How to' add an svg image with variable text #18

Closed JoshuaCapel closed 5 years ago

JoshuaCapel commented 5 years ago

I have seen a few nice questions that use scalable vector graphics with text that is updated as the question is generated. Unfortunately it is not as a simple as just using the 'insert image' in TinyMCE's interface (this will insert the image, but the referenced variables in the text won't update).

I have pieced together enough information to do this myself, but I think it would be nice to be have links to examples of this in the documentation. That way interested people can copy them and also figure out how they work.

Two nice examples of this are:

These demos are publicly available, but the questions are not. So it seems copies would need to be made to a place like the how to's project.

I was originally planning to write some documentation and submit a pull request, but I couldn't find "official" Numbas examples to link to (and my particular workflow for getting this working feels like a bit of a hack).