[TW5] How to disable automatic wikilinking?

310 views
Skip to first unread message

Christian de la Serna

unread,
Jul 9, 2015, 4:40:13 AM7/9/15
to tiddl...@googlegroups.com
Hello,

I've been trying to search for ways to disable automatic wikilinking CamelCase words in TW5. Searched the group and found a macro but it does not seem to work for me. 

\define tw-wikilinks() no

Using TW 5.1.9.

Thanks, 

Birthe C

unread,
Jul 9, 2015, 6:42:38 AM7/9/15
to tiddl...@googlegroups.com
The macro you used will only work in the tiddler, you put it in.

If you want to avoid all internal links except for links with square brackets, you can edit $:/core/modules/parsers/wikiparser/rules/wikilink.js. Open the tiddler and edit it deleting the content and removing the field module-type, save the tiddler and refresh your TiddlyWiki. If this is not what you are after, you will just have to delete that tiddler again.


Birthe

PMario

unread,
Jul 9, 2015, 6:45:44 AM7/9/15
to tiddl...@googlegroups.com
Hi, 

Just open this tiddler $:/core/modules/parsers/wikiparser/rules/wikilink.js  in advances search: http://tiddlywiki.com/#%24%3A%2FAdvancedSearch   Shadows  tab

Edit it. .. There is a warning, that you'll overwrite a system tiddler. ... This is OK
If you mess something up. just delete this tiddler and the core default will be restored.

change the type field from : type: wikirule   to type: wikirule-disabled

If you want to restore the old behaviour, just delete this tiddler
,  so the core will take over again.

hope this helps
mario

Eric Shulman

unread,
Jul 9, 2015, 6:46:44 AM7/9/15
to tiddl...@googlegroups.com
Some time ago (5.1.5?) the various "tw-***" definitions were renamed to "tv-***" for variable, "tc-***" for CSS classes, "tm-***" for messages, etc.

In this instance, use "tv-wikilinks".

enjoy,
-e
Eric Shulman
ELS Design Studios
TiddlyTools - "Small Tools for Big Ideas!"
InsideTiddlyWiki: The Missing Manuals

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:

PMario

unread,
Jul 9, 2015, 6:47:46 AM7/9/15
to tiddl...@googlegroups.com
Hi Christian,

If you want to disable it for just one tiddler, then insert this code into the first line.

\rules except wikilink


-mario

Eric Shulman

unread,
Jul 9, 2015, 6:56:25 AM7/9/15
to tiddl...@googlegroups.com
On Thursday, July 9, 2015 at 3:42:38 AM UTC-7, Birthe C wrote:
The macro you used will only work in the tiddler, you put it in.

If you want to avoid all internal links except for links with square brackets, you can edit $:/core/modules/parsers/wikiparser/rules/wikilink.js. Open the tiddler and edit it deleting the content and removing the field module-type, save the tiddler and refresh your TiddlyWiki. If this is not what you are after, you will just have to delete that tiddler again.

Note: it is not necessary to delete the tiddler content.  Just change the module-type to any unrecognized value (e.g., blank or, as Mario suggested, "wikirule-disabled") and it will prevent that code from being loaded.

-e

Christian de la Serna

unread,
Jul 9, 2015, 1:34:50 PM7/9/15
to tiddl...@googlegroups.com
Thanks this worked perfectly! And thank you everyone for helping. 

Is there a way to make this into a global macro? Just curious...
 \rules except wikilink


PMario

unread,
Jul 10, 2015, 5:56:36 AM7/10/15
to tiddl...@googlegroups.com
On Thursday, July 9, 2015 at 7:34:50 PM UTC+2, Christian de la Serna wrote:
Thanks this worked perfectly! And thank you everyone for helping. 

Is there a way to make this into a global macro? Just curious...
 \rules except wikilink


Good question :)
I did create a feature request at github: https://github.com/Jermolene/TiddlyWiki5/issues/1875   but it's not doable out of the box.

Disabling the core function may be a workaround, till we have something better. See my first post.

-m

Robert Chen

unread,
Oct 26, 2015, 3:33:27 PM10/26/15
to tiddl...@googlegroups.com
Mario's fix worked for me in previous versions of TiddlyWiki but it doesn't seem to work anymore in version 5.1.9.

What did work now is opening up $:/core/modules/parsers/wikiparser/rules/wikilink.js and replacing this block of code:

    return [{
        type: "link",
        attributes: {
            to: {type: "string", value: linkText}
        },
        children: [{
            type: "text",
            text: linkText
        }]
    }];


with this:

    return [{type: "text", text: linkText}];

Make sure to make a backup copy of your wiki first as making this change incorrectly can break the wiki. You may need to save and reload the wiki before the changes take effect.

-robert
Reply all
Reply to author
Forward
0 new messages