Trying to turn the Strikethrough feature off...

44 views
Skip to first unread message

axelm

unread,
Aug 2, 2011, 5:39:12 PM8/2/11
to tiddl...@googlegroups.com
Hello All,

I am trying to disable the Strikethrough feature.
I have pasted a lot of text into a whole bunch of text fields and they have a lot of these "---" in them.

I found and old threat here but it doesn't work.
Can someone update this:

(function() {
for (var i = 0; i < config.formatters.length; i++)
    if (config.formatters[i].name == "strikeByChar")
        break;
if (i < config.formatters.length)
    config.formatters.splice(i,1);
})();

It said to paste this into a tiddler and tag it systemConfig
but I guess it's pretty old.

axelm

PMario

unread,
Aug 3, 2011, 7:12:54 AM8/3/11
to TiddlyWiki
I created a little hack [1], which is disabled at my site :)
Copy/paste from the link, because the group may break the lines

//{{{
(function(formatters) { //# set up alias
for (var i=0; i<formatters.length; i++) {
if (formatters[i].name == "characterFormat") {
merge( formatters[i],
{match: "''|//|__|\\^\\^|~~(?!\\s|$)|\\{\\{\\{"});
} // if
} // for
})(config.formatters); //# end of alias
//}}}

the original match looks like this:
match: "''|//|__|\\^\\^|~~|--(?!\\s|$)|\\{\\{\\{"});

Since "--" also means "mdash" all "--" will be rendered as mdashes
now.

have fun!
mario

[1] http://hoster.peermore.com/recipes/TeamWork/tiddlers.wiki#RemoveStrikethroughHack

axelm

unread,
Aug 3, 2011, 12:09:56 PM8/3/11
to tiddl...@googlegroups.com
You are the best, PMario!

That worked great.

Thank you very much,

axelm


Reply all
Reply to author
Forward
0 new messages