Moved from GitHub Issues Queue
Folks,
Following on from my speculation in dealing with cases such as the html details I would like your views on the following.
If we could find a way to support the integration of HTML with TiddlyWiki for these "primitives" I believe this would be very popular, one way maybe to have some basic functions that "emulate" common html javascript functions OR extend the way WikiText containing HTML is parsed, so that the two work better together.
Eg a way to provision the html details with a toggle value.
The idea would be to leverage the rich html environment and reduce the need for solutions to be built into tiddlywiki when they already live in the HTML5 standards. If you spend time as I have looking at HTML at https://www.w3schools.com/ you will see that on many occasions that the html demands JavaScript which will not (directly) work in tiddlywiki but more often than not this java script seems really basic, allowing a value to be set or stored on click or some other primitive operation. Or the browser contains the value the html has produced from input to states but we have no way to reference it in the wikitext.
In fact TiddlyWiki has already done as I propose with CSS allowing it to be a fully supported standard in tiddlywiki as well as permitting it to be used in response to tiddlywiki tags and other attributes.
I am not saying this is simple, but it potentially is, and I do not have the experience to implement it.
In some ways Evans formula plugin is doing this by allowing html attributes to be set using tiddlywiki variables and tiddler/fields.
What remains is I believe a need to connect HTML more closely to the tiddlywiki internals.
One slightly more complex example may be html forms and php https://www.w3schools.com/html/html_forms.asp
<form> First name:<br>
<input type="text" name="firstname"><br>
Last name:<br> <input type="text" name="lastname">
</form>
If we could only access the values above we know are stored in the browser eg firstname lastname
But I think it worthy of investigation, because it would open the world of HTML5 and related frameworks to users while reducing the need for "equivalent" widgets like this threads Details widget. It will simplify what goes into tiddlywiki while at the same time enriching its capabilities. Further once a subset of tiddlywiki/html5 "methods" are available it would be easy to translate a wealth of code from html training and support sites, and users.
Please consider deeply, the return could be massive.
Regards
Tony
<form id="frm">
First name:<br>
<input type="text" name="firstname" id="firstname"><br>
Last name:<br>
<input type="text" name="lastname" id="lastname">
</form> The idea would be to leverage the rich html environment and reduce the need for solutions to be built into tiddlywiki when they already live in the HTML5 standards.
If you spend time as I have looking at HTML at https://www.w3schools.com/ you will see that on many occasions that the html demands JavaScript which will not (directly) work in tiddlywiki
but more often than not this java script seems really basic, allowing a value to be set or stored on click or some other primitive operation. Or the browser contains the value the html has produced from input to states but we have no way to reference it in the wikitext.
Mat,Thanks for the leads, have you any examples of using this in TiddlyWiki?
I would like to see if I can access the below; especially once values are entered as a test<form id="frm">
First name:<br>
<input type="text" name="firstname" id="firstname"><br>
Last name:<br>
<input type="text" name="lastname" id="lastname">
</form>
Mavo has potential but can it be used in tiddlywiki?
Probably would require a lot of tweaking. For one thing, Mavo uses... whats-it-called... when you declare some url at the top of the html-document from where the code is fetched (cdn?). My shallow snooping around at Mavo have not found any "download-to-get-a-complete-standalone"... but possibly it's just poor snooping.
Personally, I'm curious if there are pieces of mavo that could somehow be integrated. Not least their plugins but also they might have some creative saving solutions.<:-)
<details open>
<summary>Summary</summary>
Content
</details><details open id=test><summary id=stest>Summary of this detail</summary>Content of details</details>
---
<<domtext test>>
<<domtext stest>>
Summary of this detail
Content of details
---------------------------------------------------
Summary of this detail Content of details
Summary of this detail
<form action="http://127.0.0.1:8088/Instances/TiddlyWiki5.html#">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="Submit">
</form>