Dear all,
Our lab was frequently running into problems regarding the design and readibility of online-instructions. Especially, colored highlighting inline words were problematic using several independent textComponents, styling them depending on condition etc… One Option is often to use Images of e.g. PPTX to display instructions but this does not really work for instructions that need to be partially edited depending on conditions/experiment block.
After another long fight with TextComponents and TextBoxes I decided to use HTML for simple instruction routines yesterday. Inspired by @wakecarter 's “Demographics - Code”, Ive built a small conversion “addin” (js/html-file combination), that can be used to write HTML/CSS/JavaScript directly in a TextComponent and use a single JS-function to convert it to a routine-integrated iframe.
That escalated quickly to: HTMLinstructions [PsychoPy] (Not Mobile-Ready, may be sensitive to different screen resolutions)
This code is still highly experimental and I have major concerns regarding responsive layout/ some JS code and unforseen experiment breaking behaviour. But for now it works and using it in instruction-only routines seems fine.
I am not a CSS expert, so I decided to share the code in an early phase (I started 24h ago) and If someone is interested, the code can be adapted and extended (feel free to fork and make pull requests (or share another repository)). I will continue adding changes in the future, after some small-scale testing “in the wild”. A stable version of this or similar code may help a lot.
Code: Luke Boelling / HTMLInstructionsDemo · GitLab
You can find a minimal documentation in the readme.
Best,
Luke