Tags:
create new tag
view all tags

SID-00873: Getting CommentPlugin Output into scrollable area on page.

Status: Answered Answered TWiki version: 4.3.2 Perl version:
Category: CommentPlugin Server OS: Last update: 15 years ago

I have been trying to get the output of the CommentPlugin with formatting into a scrollable area on the same page without much success. Put it into a textarea like this works fine, however no formatting which was expected:

COMMENT{location="*123*"} <textarea readonly="readonly" style="width: 900px;" name="Comments" rows="20" cols="100">*123*</textarea>

Would like to use <div> but the code editor seems to strip them out. Something like this: <div style="overflow:auto; height:556px;width:564px;"> formated text here........... </div>

Any Help would be appreciated as I'm exhausted trying to solve this. I am a new user though.

John

-- JohnFrancisLundy - 2010-06-24

Discussion and Answer

Not sure I follow exactly what you'd like to do. TWiki escapes characters deemed dangerous for XSRF exploits, namely <, >, ", ' and %. That means any HTML formatting users enter on a CommentPlugin box will be escaped. You have control over that if you create a custom CommentPlugin template. Specifically, in the output template, turn off encoding of URL parameters, such as %URLPARAM{ "comment" encode="off" }%. There is a trade-off between security and functionality.

See also CommentPlugin, VarURLPARAM, VarENCODE.

See sample custom CommentPlugin template used by this support forum application, SupportCommentTemplate

-- PeterThoeny - 2010-06-24

Hi Peter

The problem I have is not with what I put in the comment box, thats fine. It's trying to get the output into a scrollable area on the same page.

if I could embed this piece of html in the page that the commentplugin is on (this creates a scroll bar) then my problem is solved. but the html page editor seems to strip it out. It didn't strip out html <textarea> tags.

<div style="overflow:auto; height:200px;width:600px;">

My comment output goes here

</div>

-- JohnFrancisLundy - 2010-06-25

Not sure but maybe I need to know how to create templates. I do not have access to file system as I do not know the password, I can only work from the browser is this ok?

-- JohnFrancisLundy - 2010-06-25

You do not need to have shell access to create CommentPlugin templates, it's done in TWiki pages.

<literal>
Enclose HTML you do not want the WYSIWYG editor to change in literal tags like this.
</literal>

-- PeterThoeny - 2010-06-25

Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the TWiki consultants if you need timely help. We invite you to get involved with the community, it is more likely you get community support if you support the open source project!

-- PeterThoeny - 2010-08-02

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Getting CommentPlugin Output into scrollable area on page.
SupportCategory CommentPlugin
TWiki version 4.3.2
Server OS

Web server

Perl version

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2010-08-02 - PeterThoeny
 
  • 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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.