Hei all,
just learning how input fields work and how to call Hype functions from innerHTML. So have a guess... anagram
anagram.zip (45.9 KB)
Just noticed - it looks fine in Safari and Chrome, letters are shifted in Firefox... any ideas?
Hei all,
just learning how input fields work and how to call Hype functions from innerHTML. So have a guess... anagram
anagram.zip (45.9 KB)
Just noticed - it looks fine in Safari and Chrome, letters are shifted in Firefox... any ideas?
hint: the new attributes-part even offers a simple way to add ‘contenteditable’ : true as key value pair -> https://www.w3schools.com/tags/att_global_contenteditable.asp
Ok - got it… This would make things much easier…
Hi all,
due to silly season... I´ve got some time to work on projects for our children´s editorial group. The example above doesn´t work (anymore ) for any reason. So here´s a complete rebrush of the anagram file - still beta.
The overall concept was:
So, if you like - please have a look.
anagram.zip (69.2 KB)
Cool!
I suspect the problem you're hitting with the other document is this bit of hard code in init()
:
docName = "anagram";
myHypeDocument = HYPE.documents[docName];
The docName must be anagram
and in an export situation this can change or in a preview situation this is always index
. Using something like Object.values(HYPE.documents)[0]
is a better general way to get this if you know there will only be one Hype document in the .html page. You also had access to the hypeDocument
variable itself, so could have just used:
myHypeDocument = hypeDocument;
However, your new code is much more streamlined and works really well :-D.
Yep This is three years ago! And I learned a lot, especially here in the forum.
Completely new approach here…