Folks,

I may try and restate this another way.

When using TiddlyWiki we can include HTML structures and most work well 
however they do not interact with tiddlywikis variables, fields state 
tiddlers. 

The point is the values and selections made in html is stored in the 
browser, a simple example is the details object 
<https://www.w3schools.com/jsref/dom_obj_details.asp>
This works in tiddly wiki

<details open>
<summary>Summary</summary>
Content
</details>


You will see the details opens and closes and remembers the state until you 
leave the tiddler.

In a javascript permissible environment you can perform quite generic 
manipulations such as
Access a Details Object
var x = document.getElementById("myDetails"); 
Create a Details Object
var x = document.createElement("DETAILS"); 




Here is an example of some level of interaction with html objects. As I 
understand it the tool retrieves the content from the DOM
http://tobibeer.github.io/tw5-plugins/#%24%3A%2Fplugins%2Ftobibeer%2Fdom

<details open id=test>
<summary id=stest>Summary of this detail</summary>
Content of details
</details>

---

<<domtext test>>

<<domtext stest>>

returns

Summary of this detail
Content of details

---------------------------------------------------

Summary of this detail Content of details

Summary of this detail



We can use the domtext macro to retrieve a value, if we could have a macro 
to write into the same values

Further work is needed to access the input and user entry values

Basically I propose general purpose "generic" macros or widgets to access 
HTML "DOM elements?" 

This would open HTML up to further integration.

Imagine if we could make the map tag work!

https://www.w3schools.com/tags/tag_map.asp

Regards
Tony

On Tuesday, August 7, 2018 at 12:03:09 PM UTC+10, TonyM wrote:
>
> Moved from GitHub Issues Queue
>
>
> Folks,
>
> Following on from my speculation in dealing with cases such as the html 
> details <https://github.com/Jermolene/TiddlyWiki5/issues/3353> 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. 
> <https://github.com/Jermolene/TiddlyWiki5/issues/3353> 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
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/6ca45e90-8fea-49a5-994b-bed418f47625%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to