SID-00873: Getting CommentPlugin Output into scrollable area on page.
| Status: |
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
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.