Hello Folks,

i didn't know if i should post this in "Bugs" or not... so i start a new Page and hope anyone Answer Me!...

I want to "disable" the surrounding P-Tags on "Comments" in the JSPWiki... i didn't found the place in the sourcecode (jsp / Java) where this tags are added...

Thanks for any Hints :)!

Matty - 23. Mar. 2007


Just a Test if its here the same ;)

--AnonymousCoward, 23-Mar-2007


Nobody's adding these tags... Edit.jsp just adds the WikiMarkup, and then it's normal rendering. Edit the source code of this page and you'll see what I mean. Empty lines create paragraphs.

--JanneJalkanen, 23-Mar-2007


Hmm i doesn't find the right line in the source code... but it doesn't matter... how can i disable these "adding" p-Tags? is it Possible?

--MartinU, 26-Mar-2007


Well, frankly, I don't even understand what you're trying to achieve here. Could you be more specific? If you disable p-tags, the end result is that all and every single page will collapse into one big paragraph...

--JanneJalkanen, 26-Mar-2007


I think you're right, i need to explain it more...

I want to "style" the Comments (not the Comment-Box!) of every WikiSite with this "Boxlayout" -> Link

So i "easily" tried to Add these line to my Comments.jsp :

 pageText.append("<div class='comment_container'><div class='innerdiv'>");
before
 pageText.append( EditorManager.getEditedText(pageContext) ); 

and after

    pageText.append("\n\nvon "+signature+", " + fmt.format(cal.getTime()));
        } 

i add:

 pageText.append("</div></div>"); 

To display this "Boxes" around every Comment... now my problem its, that the SourceCode of the WikiPage looks like:

<hr />
<p><div class='comment_container'><div class='innerdiv'>Test Comment
</p>
<p>von <a class="wikipage" href="/TestWiki/Wiki.jsp?page=MartinU">MartinU</a>, am 26.03.2007 um 09:43h</div></div>

You'll see.. the "div"-Tag cant interpreted correctly in case of the arounding p-Tags ...

perhaps you could give me a hint now? :o)

Thanks!

--MartinU, 26-Mar-2007


Well, first of all, you probably want to add %%comment-container instead of the <div> - the former is the proper way of adding CSS to a WikiPage without enabling HTML (which is very dangerous).

What you want can be accomplished by simply removing any instances of "\n" in Comment.jsp code which adds the comment. Two empty lines in a row create a paragraph.

--JanneJalkanen, 26-Mar-2007


Whoawh thanks, i understand you :)

Here i read how to use the CSSStyle on WikiPages ... but how do i mark a cssTag as "block usage" and not as "inline usage"?

Now my %comment_container Tag is rendernd as "<span" but i need a "div" ... thanks for help

Dont understand this phrase ...

Inline CSS definitions are supported on wikipages starting with JSPWiki version 2.1.38. For block usage a div tag is rendered, for inline usage a span tag. 

THANK YOU!

--MartinU, 26-Mar-2007


Put the %% -tag on its own line to get a div; otherwise you get a span.

--JanneJalkanen, 26-Mar-2007

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-10) was last changed on 17-Apr-2007 08:43 by 193.27.50.74