[rt-users] Article Content not editable

Bart bart at pleh.info
Wed Nov 13 04:31:16 EST 2013


Hi,

First off, sorry for replying to an old mail.

But to answer your question, yes it's possible to create rich text custom
fields.

This wiki page explains how:
http://requesttracker.wikia.com/wiki/AddRichTextEditorToCustomField

Rough example on how to achieve this in a quick way (for RT 4.0 and 4.2),
the following is done on a debian machine:


# Copy the original EditCustomFieldText to a local place (create the local
directories if they don't exist)

cp /opt/rt4/share/html/Elements/EditCustomFieldText
/opt/rt4/local/html/Elements/EditCustomFieldText


# Edit the following file

nano -w /opt/rt4/local/html/Elements/EditCustomFieldText


# Add the following snippet above the first line with  <%INIT>

# The custom field ID that I'm using here is the specific ID that I use
inside the Articles (thus this limits to only that CF)


% if($CustomField->Id == 12) {

  <script>

    CKEDITOR.replace( '<%$NamePrefix . $CustomField->Id%>-Values' );

  </script>

% }


# now restart RT

service apache2 stop && rm -rf /opt/rt4/var/mason_data/obj/* && service
apache2 start


After having changed this, you might also want to add the following styling
to your Theme for RT 4.0.*:

/* CF ID 12 Value styling */
#CF-12-ShowRow .value {font:13px/1.231
arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table
{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
#CF-12-ShowRow .value br { content: " "; display: block; margin: 0.5em 0 0
0; line-height: 0.5em;}

/* Firefox specific rule */
@-moz-document url-prefix() {
  #CF-12-ShowRow .value br { content: " "; display: block; margin: 0.2em 0
0 0; line-height: 0.2em;}
}

Or if your now using 4.2 then adding this styling would be sufficient (at
least, i thought this was enough for 4.2):

/* CF ID 12 Value styling */
#CF-12-ShowRow .value br { display: block; margin: 5px 0 0 0; line-height:
5px; content: " ";}


Even though this is an old mail, this recently became relevant for us so I
thought I'd share this.





2013/8/28 LAW Andy <andy.law at roslin.ed.ac.uk>

>
> On 27 Aug 2013, at 17:24, Kevin Falcone <falcone at bestpractical.com> wrote:
>
> > On Tue, Aug 27, 2013 at 04:46:15PM +0100, LAW Andy wrote:
> >> I'm trying to create some new articles and I'm struggling to find how
> to actually add Content. I can seemingly create the Article and give it a
> Name, Summary and Class and assign Topic labels to it but there is just a
> big blank area next to the word Content.
> >>
> >> I *think* that I've given myself all the necessary permissions to
> create and modify the Article content. Any clues as to where I should be
> looking to get this working?
> >
> >
> http://bestpractical.com/docs/rt/latest/customizing/articles_introduction.html#Custom-Fields
> >
> > -kevin
>
> OK. Thanks.
>
> Is there a way to get an editable field for an article that includes all
> the CKEditor goodness that we get in ticket comment fields?
>
> Later,
>
> Andy
>
>
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>


-- 
Bart G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20131113/460edbf8/attachment.htm>


More information about the rt-users mailing list