Occassionaly the need to view the raw text of a topic (as seen in edit box) has been mentioned. With the advent of
MetaDataDefinition usage, I've found even more need when testing. So, I've added the URL parameter
raw
to the
view
script. To use have
view/...?raw=on
in URL.
Note: not on TWiki.org yet.
--
JohnTalintyre - 04 Jul 2001
Sounds good. The
view
script is better then the
edit
script because authentication is not wanted just to look at the raw content.
Small suggestion: Use
raw=on
instead to make it compatible with forms.
Does that work also to look at the source of previous revisions?
--
PeterThoeny - 06 Jul 2001
Change text above to say use
on rather than 1. It does work for old revisions.
--
JohnTalintyre - 07 Jul 2001
FX: Applause!
I have frequently wanted this feature... Hope it makes it into
TWikiReleaseSpring2001, as it should have little impact on the rest of TWiki.
--
RichardDonkin - 08 Jul 2001
So, presumably this replaces the viewsource patch. Great. Also, it would be very good to have a view source button so that
TWikiUsers can use it.
--
MartinCleaver - 10 Jul 2001
Good idea. I've add a link to
view.tmpl
and also to
oopslocked.tmpl
.
With the advent of
GenericMetaDataStoreForTopics the meta tags also appear when viewing raw. I think this is the best behaviour, but it might confuse some people.
--
JohnTalintyre - 10 Jul 2001
Suggestion:
- Replace the preformatted raw text with an edit box of the size of the preferences. That way it is easier to copy and paste content.
- Add a new flag to show/remove the meta data:
-
raw=debug
to show the meta data;
-
raw=on
(or any other non empty value) has the meta data removed.
--
PeterThoeny - 10 Jul 2001
I like the debug/on idea.
The edit box also makes sense - but I would think the preferences wouldn't always be available.
--
JohnTalintyre - 10 Jul 2001
Since this is for debug it is not really necessary to have the choice in the preferences: Click on the Raw link and chnage the URL from
...?raw=on
to
...?raw=debug
.
Alternatively, add a new
VIEWRAWMODE
variable to the link in the view template, i.e.
...?raw=%VIEWRAWMODE%
.
--
PeterThoeny - 11 Jul 2001
A misunderstand there. I meant the preferences that give the size of the edit box would not always be available.
--
JohnTalintyre - 12 Jul 2001
Changed from
PRE
text to
TEXTAREA
box. Parameter
raw=debug
show the meta data;
raw=on
(or any other non empty value) does not.
In
TWikiAlphaRelease.
To do:
--
PeterThoeny - 15 Jul 2001
Is this in the most recent beta? I don't see it working from here and i'm running the one from just before the one that Peter released on 7/14.
TWikiAlphaRelease suggests keeping track of
AlphaNews, but that hasn't been updated since the flood (ok, May anyway).
--
DavidLeBlanc - 15 Jul 2001
See also
ViewRaw which is related, but not the same.
--
DavidLeBlanc - 15 Jul 2001
It is in the most recennt
TWikiAlphaRelease and
TWikiBetaRelease, 15 Jul 2001. See
DevelopersNews for latest news.
To do: Usability issue: There is no visual clue that you are viewing a raw topic, and the topic specific links can be confusing if you look at a raw content. Probably better to spin off an oops dialog that has the raw text window and an OK link to go back to the normal view.
--
PeterThoeny - 16 Jul 2001
Now clear as a
textarea
is used.
--
JohnTalintyre - 29 Aug 2001
I'm going to have to hack in a "very raw" option that just dumps the contents (without metadata) directly to the browser (possibly with a certain content type). The idea was that I use an in-house hacked skin for
my site that has a variable that defines the URL for the style sheet. I'd like to put the style sheet into TWiki itself. I could (of course) do this as an attachment, but I'd rather not (because I wouldn't be able to do diffs or be able to edit it in the browser). I suppose I could do it as a page itself (provided that I don't put anything in the
CSS that could confuse TWiki or use a verbatim block). However, this whole mess would have some performance costs as each page view with that skin would in turn view another page (the
CSS).
--
DavidAndersen - 29 May 2003
You could take the
FlexibleSkin approach and define the css in a topic. You would need to use something like:
<verbatim>
%STARTINCLUDE%
<pre>
#mysite {style-rules:3ex;}
.classy {color:too-cool;}
</pre>
%STOPINCLUDE%
</verbatim>
there might be performance issues. And the stylesheet becomes an embedded one rather than a linked one, which is unfortunate. There might be a way around that though.
cool. nested verbatim
elements work. I didn't know that. Also follow up should be moved to a new topic, as this is off-topic.
--
MattWilkie - 30 May 2003
After looking at this topic,
ViewRawTopic, and
TextFileExport I still can't see that there is a consensus or an existing option to dump a raw topic out, "raw". Viewing the raw topic in an html forms textarea is nice for a human, but I had a different idea that requires the topic output in plain text without metadata.
I've tried to make
GraphViz, specifically Webdot work with TWiki for a while now, and currently have a hack to grab the raw text of a topic without metadata on my local TWiki. Its not suitable for real use.
If there were an option to the standard view cgi that would dump the raw topic without metadata as plain text (no html at all!), then I could just feed a properly formatted URL of a TWiki topic containing a textual
GraphViz diagram to Webdot, and it would do the rest without modification to Webdot or TWiki.
Did I miss something, and there is an existing way to do this?
--
RussellAdams - 16 Nov 2004
Write this:
This is not well documented but should.
--
PeterThoeny - 16 Nov 2004
Thanks Peter! Based on that I got it working.
Only minor difficulty was the perl version of Webdot couldn't handle parsing cgi parms in the target url, so I had to hack it to escape them.
I'll post the solution to
WebDOTPlugin.
--
RussellAdams - 07 Dec 2004