That's really helpful information BJ, but I've finally isolated what I want 
to do - I want to put a section of code to change the way tiddlywiki 
renders html tags, but I have no idea where - the script below takes h3 
tags and appends a link floating to the right of them:

function appendH3() {
   var a = document.createElement('a');
   a.appendChild(linkText);
a.href = "#tw-href000";
a.style.float = "right";
  var linkText = document.createTextNode("[Top]");
  var x = document.querySelectorAll("h3");
  var arr = [];
  
for(var i = x.length; i--; arr.unshift(x[i]));
for (var i = arr.length - 1; i >= 0; i -= 1) {
var clone = a.cloneNode(true);
arr[i].appendChild(clone);
}
}

Consulting the dev tiddlywiki, tiddlywiki refreshes its contents, but where 
do I put it?

On Thursday, October 5, 2017 at 3:00:30 PM UTC-7, BJ wrote:
>
> Have at look at this thread
>
> https://groups.google.com/forum/#!msg/tiddlywiki/NwOI-QER2ig/lSLS3XolwDoJ
>
> all the best 
>
> BJ
>
> On Thursday, October 5, 2017 at 4:32:16 AM UTC+1, K wrote:
>>
>> Ok, Ive written a function...
>> Where do I put it?
>>
>>
>> function appendH3() {
>>     var my_elem = document.getElementsByTagName(h3);
>>
>> var appender1 = document.createElement(a);
>> appender1.href = "#tw-href000";
>> appender1.style.float='right';
>> appender1.textContent = '[Top]';
>>
>> my_elem.parentNode.insertBefore(appender1, my_elem);
>> }
>>
>> --- 
>>
>> The above function didnt work due to me having no knowledge in javascript.
>>
>> After fiddling around, I managed to create a correct script, but I still 
>> don't know where to put it....
>>
>> function appendH3() {
>>    var a = document.createElement('a');
>>   a.appendChild(linkText);
>> a.href = "#tw-href000";
>> a.style.float = "right";
>>   var linkText = document.createTextNode("[Top]");
>>   var x = document.querySelectorAll("h3");
>>   var arr = [];
>>   
>> for(var i = x.length; i--; arr.unshift(x[i]));
>> for (var i = arr.length - 1; i >= 0; i -= 1) {
>> var clone = a.cloneNode(true);
>> arr[i].appendChild(clone);
>> }
>> }
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" 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/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f5b768a0-7df6-445b-bc1b-8452ac18ddc5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to