|Title|Support Commenting In Wiki Content
|Date|01-Sep-2005 19:47:50 EEST
|JSPWiki version|2.2.28
|Submitter|GregorHagedorn
|[Idea Category]|MarkupIdea
|Reference|
|[Idea Status]|ConsideredIdea

Occasionally, wiki content writers find it useful to make a note to themselves that is only shown during editing. Examples are a marker how far refactoring of a page has progressed, commenting on the use of plugins for automation, etc.

I propose to overload the existing plugin syntax by defining:
{{{
[{-- comment in wiki notation, not rendered at all --}] 
}}}

I do not think it necessary to render these as html comments, but if for some reason desired I have no objections either.


-----
However, if content is rendered as HTML comment, it should contain valid wiki syntax only (or be rendered as if it was regular Wiki-Content), e.g. whoever picks up the idea should take care not to enable HTML/script injection by adding {{{ [{-- <script>alert("hello");</script> --}] }}} using this syntax... 

-- OlafKock

I think it's okay if it just gets the standard entity escaping treatment.  Putting WikiMarkup in something that never gets rendered is kinda redundant ;-)

-- JanneJalkanen

----
If you just want to hide the test, it can easily be done with CSS.
Add to your jspwiki.css file:
{{{
.invisible { display:none }
}}}

Then write your comments like this:
{{{
%%invisible
comment in wiki notation, not rendered at all 
%%
}}}
-- NascifAbousalhNeto

No I think the idea to support commenting is a good one. It's quite nice to be able to see some text when you're editing a page the readers would not. I use this for example when tables get large - trying to edit them in a browser doesn't make sense so I remind editors to use a normal editor without line wrapping for example. Yes updating the CSS does work but every time I upgrade JSPWiki it adds to the list of things that I have to forget when I deploy it.
\\
--Kwhittingham, 2009-02-02

----
without doing nothing there is the following solution that is not pretty but works:\\
{{{
[{SET comment='
this is a comment
'}]
}}}
-- DuvergerP, 2009-02-02