Tags:
archive_me1Add my vote for this tag create new tag
, view all tags
Hello, all. I'm looking to change the Wiki style that creates bold, italics, code, and underline formnatting, as well as possibly disable traditional WikiWord linking style. I cannot seem to find where TWiki has this defined. It is not in the "view" or "viewfile" scripts, nor in the DefaultPlugin or TWiki.pm file. I'm stumped.

Also, any tips on how to alter these things? Tricks on unobvious functions I may have to comment out in order for TWiki to work properly, etc. And perhaps to save myself some trouble, anyone know if a simple Plugin (one that I could create) can alter the text formatting without me touching the core TWiki sources directly?

Thanks.

-- AdamTheo - 30 Nov 2002

Have a look at getRenderedVersion in CVS:lib/TWiki.pm. You should avoid changing this, as it is likely to change very soon in the TWikiAlphaRelease due to InternationalisationEnhancements. Fortunately you can just write a plugin - the DefaultPlugin is the normal place to put small enhancements like this. The plugin runs before the core code, so you can convert (say) *foo* into *<nop>foo* in the plugin, preventing it from being recognised as Wiki markup in the core code.

Also, there is a plugin doing something like this - search for 'richer' over in Plugins.WebHome.

-- RichardDonkin - 30 Nov 2002

I've been playing around with the TWiki.pm file, making some modifications to the headings (turning "---!!" and "---%%" into headings instead of "---++" and "---##"), lists (making definitions lists as "<3 spaces>$term:definition"), and your WebNameAsWikiName patch. Now I'll try implementing these changes into a custom plugin that will convert my custom formattings into the standard TWiki formattings, so I can keep upgrading without constantly making the changes to the TWiki.pm file. I'll let you know how it goes, although I am expecting trouble from the definitions lists since the current way does not support spaces or wikisyntaxes like bold and italics. I hope BetterLists will make its way into the core soon, although I really hope all this WikiSyntax will be moved to a plugin to make it easier to alter or replace them.

-- AdamTheo - 13 Dec 2002

---!! instead of ---++ doesn't buy you much and conflicts with SpecificHeadingsExcludedFromTOC. At any rate, I prefer more email type formatting. Found a good solution at MoinMoin:

= h1 line =
== h2 line ==
=== h3 line ===
Now, this makes sense even without rendering it. If you like it, add this to your DefaultPlugin/commonTagsHandler:
    # support MoinMoin style headlines...
    $_[0] =~ s/^=\s(.*)\s=+\r*$/---+ $1/gm;
    $_[0] =~ s/^==\s(.*)\s=+\r*/---++ $1/gm;
    $_[0] =~ s/^===\s(.*)\s=+\r*/---+++ $1/gm;
    $_[0] =~ s/^====\s(.*)\s=+\r*$/---++++ $1/gm;

2c PeterKlausner - 20 Jan 2003

A problem with these headings is the conflicting information: the visual impact of the heading in plaintext increases as the heading decreases in importance. I always have to do a reverse interpretation in my head to counteract this effect.

-- MattWilkie - 20 Jan 2003

True -- and the same as with ---+ ---++ ---+++. That's why I cheated with the regex: it allows for this:

= This is a H1 =======================================
== And this a H2 ===================
=== And a small H3 ===
-- PeterKlausner - 20 Jan 2003
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2004-08-22 - SvenDowideit
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.