Discussion:
[tw] Help on Some Plugins
(too old to reply)
K
2017-10-04 15:29:58 UTC
Permalink
Raw Message
While I am not the best at coding, there are 2 minor problems that bug me
every time I use tiddlywiki:

1. In the storytabs plugin, when you switch tabs, it doesn't remember the
scroll position of the tabs you switched from. The story tabs in twc
supported this. Id like to know (1) how to implement this. I dont need
code, just a general idea of what to write.
2. In the context plugin, when you do searches, it displays html code and
;nbsp in the output; where and how would I write code to filter this output
out. (The context plugin is a search plugin designed to display context in
your searches ie. displaying a bit of what you wrote in the page).

3. (Extra) How would I modify the tiddlywiki core to add more javascript?
I've heard that this has been disabled, but since this is a personal
tiddlywiki, I want to add some more features.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/e738b41c-3c2f-4ae7-b09f-622c8f123074%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jed Carty
2017-10-04 16:33:34 UTC
Permalink
Raw Message
If you want to add javascript globally than you can write the javascript
inside a tiddler and put it inside script tags and tag the tiddler with
$:/tags/RawMarkup

Then you save and reload your wiki and the javascript should be loaded.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/721f1a29-e1b2-499c-8b63-36c887cec8c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
K
2017-10-04 22:14:29 UTC
Permalink
Raw Message
Ok thanks, I've managed to get something working, but how do I get this
jquery line to run on every page?
right;">[Top]</a>" );
Post by Jed Carty
If you want to add javascript globally than you can write the javascript
inside a tiddler and put it inside script tags and tag the tiddler with
$:/tags/RawMarkup
Then you save and reload your wiki and the javascript should be loaded.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/5c833810-33c4-4151-b855-11b9472b03d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
RichardWilliamSmith
2017-10-05 00:46:57 UTC
Permalink
Raw Message
You'd probably need to include jQuery, but I'm not sure it's a great idea.
You have no guarantees about when any individual piece of the UI will be
updated and re-drawn because of the way Tiddlywiki uses the DOM.

Instead of adding code that way, it's might be better to learn a bit more
about how Tiddlywiki actually works. Have you seen the dev
docs? http://tiddlywiki.com/dev/

If you want to add an H3, followed by a block of code, it might be better
to do that in a macro and invoke it where you need it.

Regards,
Richard
Post by K
Ok thanks, I've managed to get something working, but how do I get this
jquery line to run on every page?
right;">[Top]</a>" );
Post by Jed Carty
If you want to add javascript globally than you can write the javascript
inside a tiddler and put it inside script tags and tag the tiddler with
$:/tags/RawMarkup
Then you save and reload your wiki and the javascript should be loaded.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/fa0e2951-f651-4525-b589-e311aa3e5273%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
K
2017-10-05 02:24:54 UTC
Permalink
Raw Message
Perhaps, I would have to find the code where a page is rendered and run a
script there to put this element before the h3. Any idea what renders the
tiddler?

On Wednesday, October 4, 2017 at 5:46:57 PM UTC-7, RichardWilliamSmith
Post by RichardWilliamSmith
You'd probably need to include jQuery, but I'm not sure it's a great idea.
You have no guarantees about when any individual piece of the UI will be
updated and re-drawn because of the way Tiddlywiki uses the DOM.
Instead of adding code that way, it's might be better to learn a bit more
about how Tiddlywiki actually works. Have you seen the dev docs?
http://tiddlywiki.com/dev/
If you want to add an H3, followed by a block of code, it might be better
to do that in a macro and invoke it where you need it.
Regards,
Richard
Post by K
Ok thanks, I've managed to get something working, but how do I get this
jquery line to run on every page?
right;">[Top]</a>" );
Post by Jed Carty
If you want to add javascript globally than you can write the javascript
inside a tiddler and put it inside script tags and tag the tiddler with
$:/tags/RawMarkup
Then you save and reload your wiki and the javascript should be loaded.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/8d27bf5c-43ad-415a-9c0f-a9d3151052e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
K
2017-10-05 02:32:22 UTC
Permalink
Raw Message
It seems like I can mess aroudn with the page template to call a script to
append stuff. Would that work? (Since I have disabled the <script> tag
protection).
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/0a16e8ae-a8a9-475d-b354-0e5496c302cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
K
2017-10-05 03:32:16 UTC
Permalink
Raw Message
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);
}
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/48bd6eb5-7586-4486-b6e7-6948da85dcb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
BJ
2017-10-05 22:00:30 UTC
Permalink
Raw Message
Have at look at this thread

https://groups.google.com/forum/#!msg/tiddlywiki/NwOI-QER2ig/lSLS3XolwDoJ

all the best

BJ
Post by K
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/4eb611ae-910e-4f6d-816a-8563c73711d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
K
2017-10-06 00:16:54 UTC
Permalink
Raw Message
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?
Post by BJ
Have at look at this thread
https://groups.google.com/forum/#!msg/tiddlywiki/NwOI-QER2ig/lSLS3XolwDoJ
all the best
BJ
Post by K
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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.
BJ
2017-10-06 07:45:47 UTC
Permalink
Raw Message
Are you asking (in general) how the dom can be manipulate after tiddlywiki
has created it?

TW5 is similar to react, it creates the dom using other elements.

Tw creates its own tree, a tree of widgets, it is the result of compiling
wikitext (or markdown). A widget create dom elements and link them to the
parent domnode provided by the widgets ancestor (its parent widget).
Because of this the dom is tied to the widget tree, and so, in general,
running javascript to manipulate the dom is a bad idea as it may interfere
with the association between widgets and domnodes.

So it is better to use wikitext
Post by K
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
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?
Post by BJ
Have at look at this thread
https://groups.google.com/forum/#!msg/tiddlywiki/NwOI-QER2ig/lSLS3XolwDoJ
all the best
BJ
Post by K
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/567723c2-8ebe-495d-b950-36f5ac010b1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
K
2017-10-06 17:37:08 UTC
Permalink
Raw Message
I know that TW takes the tiddler data and renders it. Every time TW senses
a change it refreshes it. Instead of putting the code outside of the
system, what I want to do is modify how tiddlywiki renders this data. In
your words, I want to modify the widget; I just don't know which one.

I have created the html manually, but I want to decrease the amount of time
it takes
Post by BJ
Are you asking (in general) how the dom can be manipulate after
tiddlywiki has created it?
TW5 is similar to react, it creates the dom using other elements.
Tw creates its own tree, a tree of widgets, it is the result of compiling
wikitext (or markdown). A widget create dom elements and link them to the
parent domnode provided by the widgets ancestor (its parent widget).
Because of this the dom is tied to the widget tree, and so, in general,
running javascript to manipulate the dom is a bad idea as it may interfere
with the association between widgets and domnodes.
So it is better to use wikitext
Post by K
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
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?
Post by BJ
Have at look at this thread
https://groups.google.com/forum/#!msg/tiddlywiki/NwOI-QER2ig/lSLS3XolwDoJ
all the best
BJ
Post by K
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/48b468a4-f684-453b-af21-93bc2cfdc726%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jed Carty
2017-10-06 09:33:05 UTC
Permalink
Raw Message
I agree with BJ, doing this in tiddlywiki is this task that is better
suited to a wikitext than javascript. In my experience using
document.querySelectorAll(..) in a wiki leads to strange edge cases because
everything can be re-rendered individually.

Do you have existing html that you are trying to put into tiddlywiki or are
you creating it in tiddlywiki?

If you are creating it in tiddlywiki than it would be much simpler to
create a macro for the different tags and put that in places where use them
instead of the tags directly.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/3c5ef71b-4674-45d9-a157-9cbf70bd2d46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
K
2017-10-06 17:38:39 UTC
Permalink
Raw Message
Perhaps instead of doing that, if I could find where TW parses and renders
the content, I could select all the nodes/arrays and filter them to modify
what I want ie. write an if statement inside the parse loop so that it
modifies how the h3 tag is rendered.
Post by Jed Carty
I agree with BJ, doing this in tiddlywiki is this task that is better
suited to a wikitext than javascript. In my experience using
document.querySelectorAll(..) in a wiki leads to strange edge cases because
everything can be re-rendered individually.
Do you have existing html that you are trying to put into tiddlywiki or
are you creating it in tiddlywiki?
If you are creating it in tiddlywiki than it would be much simpler to
create a macro for the different tags and put that in places where use them
instead of the tags directly.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/28758877-ede0-4a0d-a7f2-a91f7cd510b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
K
2017-10-06 17:38:51 UTC
Permalink
Raw Message
Perhaps instead of doing that, if I could find where TW parses and renders
the content, I could select all the nodes/arrays and filter them to modify
what I want ie. write an if statement inside the parse loop so that it
modifies how the h3 tag is rendered.
Post by Jed Carty
I agree with BJ, doing this in tiddlywiki is this task that is better
suited to a wikitext than javascript. In my experience using
document.querySelectorAll(..) in a wiki leads to strange edge cases because
everything can be re-rendered individually.
Do you have existing html that you are trying to put into tiddlywiki or
are you creating it in tiddlywiki?
If you are creating it in tiddlywiki than it would be much simpler to
create a macro for the different tags and put that in places where use them
instead of the tags directly.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/ed54b5d0-5d3e-403d-9528-7dbb1e9f038d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
RichardWilliamSmith
2017-10-06 21:31:45 UTC
Permalink
Raw Message
Hi K,

The h3's are generated by /core/modules/parsers/wikiparser/rules/heading.js

Let us know how you get on.

Regards,
Richard
Post by K
Perhaps instead of doing that, if I could find where TW parses and renders
the content, I could select all the nodes/arrays and filter them to modify
what I want ie. write an if statement inside the parse loop so that it
modifies how the h3 tag is rendered.
Or if I find the render function, I could put the if statement there ie.
(if h3) then do this etc.
I just want to scrap the wikitext, tbh the only wikitext I use are the
prettylinks -> because ckeditor doesn't do any wonky things to them.
Compared to Ckeditor, the speed of editing using wikitext is relatively
low, I can do the same amount of work in 30 min in 10 min with html editing.
Post by Jed Carty
I agree with BJ, doing this in tiddlywiki is this task that is better
suited to a wikitext than javascript. In my experience using
document.querySelectorAll(..) in a wiki leads to strange edge cases because
everything can be re-rendered individually.
Do you have existing html that you are trying to put into tiddlywiki or
are you creating it in tiddlywiki?
If you are creating it in tiddlywiki than it would be much simpler to
create a macro for the different tags and put that in places where use them
instead of the tags directly.
@jed If I made a macro for each tag, I'd have to call it potentially
hundreds of times....not feasible imo.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/786c11ec-b610-42e8-8e8c-5f402c8bbb37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
K
2017-10-07 02:00:06 UTC
Permalink
Raw Message
Perhaps I didn't understand the problem before, due to tiddlywiki's
internal strucure, so I need to rephrase what it is exactly what I want to
do:

1. I want to change the way h? tags are rendered. That is to say, I want to
add another element right after the h tag when it is rendered. Do I have to
write a widget or is there a much more simple way to do this.

If I have to write a widget, I need to know where it will go and how it
will plug into the tw core.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/aeda42f7-3e04-484b-8751-62da9acb67c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2017-10-07 02:25:58 UTC
Permalink
Raw Message
K,

Can you explain why you want to do this?. The Reason I ask is you are
asking for a specific solution, not defining the problem. Since others are
more familiar with tiddlywiki, we may be able to solve your root problem
not the one you think you have.

Perhaps even CSS could be used?

Regards
Tony
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/9a690382-1094-4e68-9b2d-b30073e0e0a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
RichardWilliamSmith
2017-10-07 03:55:00 UTC
Permalink
Raw Message
The thing here is that you probably don't want to/need to "change the way
h3 tags are rendered" - because the whole UI is being rendered through
Tiddlywiki templates etc. there is probably a better mechanism to get at
what you want to change, rather than trying to over-ride core behaviour,
especially without properly appreciating just how complicated the core is.

If you want to change the way titles of Tiddlers are displayed, for
example, you should be looking at the relevant tiddler (
$:/core/ui/ViewTemplate/title
<http://127.0.0.1:8080/docs/twtutorials/#%24%3A%2Fcore%2Fui%2FViewTemplate%2Ftitle>)
or perhaps you want to target a different part of the wiki?

As Tony suggests, perhaps explain a little more of what you're trying to
achieve?

Regards,
Richard
Post by K
Perhaps I didn't understand the problem before, due to tiddlywiki's
internal strucure, so I need to rephrase what it is exactly what I want to
1. I want to change the way h? tags are rendered. That is to say, I want
to add another element right after the h tag when it is rendered. Do I have
to write a widget or is there a much more simple way to do this. ie. put an
<a> element right after.
So do I modify $:/core/modules/widgets/element.js? because seems to
control the rendering of elements.
If I have to write a widget, I need to know where it will go and how it
will plug into the tw core.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/84071751-85ed-40de-b067-e32ac5012745%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jed Carty
2017-10-06 18:39:56 UTC
Permalink
Raw Message
how is it any less feasible than putting in the tags themselves? You make
the macros called h3 and /h3, than instead of putting <h3> you just put
<<h3>> and instead of </h3> you put <</h3>>
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/7c4da4e2-6e56-4256-af82-24627f11215e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...