RTFM WikiText Format Toolbar

Wanted to integrate a simple way to format the “WikiText” Custom field in RTFM.

Copy: /opt/rt3/share/html/Elements/EditCustomFieldWikitext to
/opt/rt3/local/html/Elements/EditCustomFieldWikitext
Edit: /opt/rt3/local/html/Elements/EditCustomFieldWikitext

Add before “% while”:

% my $wiki_textarea_value = $NamePrefix .$CustomField->id .’-Values’;

% my $wiki_format_toolbar = qq(
%


%
%
%
%
%
%
%
%
%

% );

% print $wiki_format_toolbar;

Add in both “textarea” tags:

<textarea … id="<%$NamePrefix%><%$CustomField->Id%>-Values">…

Copy: /opt/rt3/share/html/RTFM/Article/Edit.html to
/opt/rt3/local/html/RTFM/Article/Edit.html

Add before “form”:

Miguel Rivera

Hello all,

In my quest to achieve RTFM nirvana I came across this post:

Has anybody achieved this in RT 3.8.2/RTFM 2.4.1?

Regards, Jim

Jim Tambling wrote:

Hello all,

In my quest to achieve RTFM nirvana I came across this post:
Carbon60: Managed Cloud Services

Has anybody achieved this in RT 3.8.2/RTFM 2.4.1?

I have had it in my test RT instance and it works. People don’t have to
remember that == means H2 etc. The drawback is that the WikiText CF is
still very limited, by design, what it can do.
In trying to extend its possibilities I removed some of the restrictions
that are in the code, ScrubHTML component, and tried to implement new
rules in Text::WikiText(?) but had more problems then I wanted to solve
and had time for. Out of curiosity I installed the FireFox WriteArea
extension, implements fckeditor for textareas, and disabled the use of
Text::WikiText formating. After editing a RTFM article with WriteArea
you’re left with lots of HTML code in your CF but after submitting it
and viewing it shows up very nice. Tables, pictures, even attachments
directly referenced from tickets. Biggest problem: possible abuse by
cross site scripting if your instance is open to the public. Ours is a
closed instance so I might use this in production.

Greetings,

Joop

Hi Daniel,

Thanks for the reply. I don’t have
/opt/rt3/local/plugins/RT-FM/html/Elements, my path looks like this
instead;

/opt/rt3/local/plugins/RT-FM/html/RTFM/Elements/ so I copied
EditCustomFieldWikitest there instead but I cant get it to work.

Also can you clarify this for me? In the post it says;

Add in both “textarea” tags:

<textarea ... id="<%$NamePrefix <http://wiki.bestpractical.com/view/NamePrefix> %><%$CustomField <http://wiki.bestpractical.com/view/CustomField> ->Id%>-Values"...

Is this in addition to what is already there? Or in place of?

Many thanks, Jim-----Original Message-----
From: Daniel Farst [mailto:daniel.farst@case.edu]
Sent: 29 April 2009 14:37
To: Jim Tambling
Subject: Re: [rt-users] RTFM WikiText Format Toolbar

I was able to.

Some of the file names have changed, essentially everything else was the
same as in the other post:

  •       Use
    

/opt/rt3/local/plugins/RT-FM/html/Elements/EditCustomFieldWikitext
http://wiki.bestpractical.com/view/EditCustomFieldWikitext instead of
/opt/rt3/local/html/Elements/EditCustomFieldWikitext
http://wiki.bestpractical.com/view/EditCustomFieldWikitext

  •       Edit
    

/opt/rt3/local/plugins/RT-FM/html/RTFM/Article/Edit.html instead of
/opt/rt3/local/html/RTFM/Article/Edit.html

Daniel Farst

IT Support Coordinator

College of Arts and Sciences

Case Western Reserve University

daniel.farst@case.edu mailto:daniel.farst@case.edu

Tuesday, April 28, 2009, 10:27:54 AM, you wrote:

Hello all,

In my quest to achieve RTFM nirvana I came across this post:

http://www.gossamer-threads.com/lists/rt/users/70588#70588

Has anybody achieved this in RT 3.8.2/RTFM 2.4.1?

Regards, Jim

Jim,

I don’t recall if I had an /opt/rt3/local/plugins/RT-FM/html/Elements directory or if I had to add it manually, but that is where my EditCustomFieldWikitext is living. I also have the /opt/rt3/local/plugins/RT-FM/html/RTFM/Elements folder, but I didn’t change anything inside of it.

Regarding the textarea tags, the section id=“…-Values” needs to be added to the 2 existing textarea tags. For me they were on lines 66 and 69 of the EditCustomFieldWikitext file. I inserted the id section after Rows and before Name.

  • Dan
    Daniel Farst
    IT Support Coordinator
    College of Arts and Sciences
    Case Western Reserve University

daniel.farst@case.edu
Wednesday, April 29, 2009, 9:55:10 AM, you wrote:

Hi Daniel,

Thanks for the reply. I don?t have /opt/rt3/local/plugins/RT-FM/html/Elements, my path looks like this instead;
/opt/rt3/local/plugins/RT-FM/html/RTFM/Elements/ so I copied EditCustomFieldWikitest there instead but I cant get it to work.
Also can you clarify this for me? In the post it says;

Add in both “textarea” tags:

<textarea ... id="<%$NamePrefix%><%$CustomField->Id%>-Values"...

Is this in addition to what is already there? Or in place of?

Many thanks, Jim-----Original Message-----
From: Daniel Farst [mailto:daniel.farst@case.edu]
Sent: 29 April 2009 14:37
To: Jim Tambling
Subject: Re: [rt-users] RTFM WikiText Format Toolbar

I was able to.

Some of the file names have changed, essentially everything else was the same as in the other post:

· Use /opt/rt3/local/plugins/RT-FM/html/Elements/EditCustomFieldWikitext instead of /opt/rt3/local/html/Elements/EditCustomFieldWikitext
· Edit /opt/rt3/local/plugins/RT-FM/html/RTFM/Article/Edit.html instead of /opt/rt3/local/html/RTFM/Article/Edit.html

Daniel Farst
IT Support Coordinator
College of Arts and Sciences
Case Western Reserve University

daniel.farst@case.edu
Tuesday, April 28, 2009, 10:27:54 AM, you wrote:

Hello all,

In my quest to achieve RTFM nirvana I came across this post: Carbon60: Cloud Consulting - Services and Solutions

Has anybody achieved this in RT 3.8.2/RTFM 2.4.1?

Regards, Jim

Hi Dan,

Many thanks, creating the folder and moving the file did the trick :slight_smile:

Thanks again

Jim-----Original Message-----
From: Daniel Farst [mailto:daniel.farst@case.edu]
Sent: 29 April 2009 16:24
To: Jim Tambling
Cc: rt-users@bestpractical.com
Subject: Re: [rt-users] RTFM WikiText Format Toolbar

Jim,

I don’t recall if I had an /opt/rt3/local/plugins/RT-FM/html/Elements
directory or if I had to add it manually, but that is where my
EditCustomFieldWikitext is living. I also have the
/opt/rt3/local/plugins/RT-FM/html/RTFM/Elements folder, but I didn’t
change anything inside of it.

Regarding the textarea tags, the section id=“…-Values” needs to be
added to the 2 existing textarea tags. For me they were on lines 66 and
69 of the EditCustomFieldWikitext file. I inserted the id section after
Rows and before Name.

  • Dan

Daniel Farst

IT Support Coordinator

College of Arts and Sciences

Case Western Reserve University

daniel.farst@case.edu mailto:daniel.farst@case.edu

Wednesday, April 29, 2009, 9:55:10 AM, you wrote:

Hi Daniel,

Thanks for the reply. I don’t have
/opt/rt3/local/plugins/RT-FM/html/Elements, my path looks like this
instead;

/opt/rt3/local/plugins/RT-FM/html/RTFM/Elements/ so I copied
EditCustomFieldWikitest there instead but I cant get it to work.

Also can you clarify this for me? In the post it says;

Add in both “textarea” tags:

<textarea ... id="<%$NamePrefix <http://wiki.bestpractical.com/view/NamePrefix> %><%$CustomField <http://wiki.bestpractical.com/view/CustomField> ->Id%>-Values"...

Is this in addition to what is already there? Or in place of?

Many thanks, Jim

-----Original Message-----

From: Daniel Farst [mailto:daniel.farst@case.edu]

Sent: 29 April 2009 14:37

To: Jim Tambling

Subject: Re: [rt-users] RTFM WikiText Format Toolbar

I was able to.

Some of the file names have changed, essentially everything else was the
same as in the other post:

  •       Use
    

/opt/rt3/local/plugins/RT-FM/html/Elements/EditCustomFieldWikitext
http://wiki.bestpractical.com/view/EditCustomFieldWikitext instead of
/opt/rt3/local/html/Elements/EditCustomFieldWikitext
http://wiki.bestpractical.com/view/EditCustomFieldWikitext

  •       Edit
    

/opt/rt3/local/plugins/RT-FM/html/RTFM/Article/Edit.html instead of
/opt/rt3/local/html/RTFM/Article/Edit.html

Daniel Farst

IT Support Coordinator

College of Arts and Sciences

Case Western Reserve University

daniel.farst@case.edu mailto:daniel.farst@case.edu

Tuesday, April 28, 2009, 10:27:54 AM, you wrote:

Hello all,

In my quest to achieve RTFM nirvana I came across this post:

http://www.gossamer-threads.com/lists/rt/users/70588#70588

Has anybody achieved this in RT 3.8.2/RTFM 2.4.1?

Regards, Jim