Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Editor in Custom Table Form View modes: 
User avatar
Member
Member
luyolo.mhlauli-nmmu.ac - 4/11/2012 9:39:16 AM
   
Editor in Custom Table Form
I have a custom table form which has more than one text field ( uses editor )
Now how can I have a single editor for all these text fields because now If I have 5 fields it menas I will have 5 HMTL editors. I would like my editor work like the editor in the Form Tab of a kentico web page

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 4/12/2012 2:58:25 AM
   
RE:Editor in Custom Table Form
Hi,

you can use “Shared toolbar” (where this toolbar will be located on top of your page and the WYSIWYG editor will not be part of the editable region, so you will save some space).

You may use the shared toolbar by this setting:

HtmlAreaToolbarLocation="Out:FCKToolbar" // before 6.0 version

It will display the toolbar on the top of Page not inside the control.

But I am not sure what do you mean by custom table form, so if above does not help, could you please provide more details?

Maybe you mean this:

<cms:CMSForm runat="server" ID="formElem" Visible="false" HtmlAreaToolbarLocation="Out:CKToolbar" ShowOkButton="false" IsLiveSite="false" ShortID="f" />

You can specify which form is used for example the following way:

formElem.FormName = className + ".default";

Please note, that 6.0 version uses CK editor.

Best regards,
Ivana Tomanickova


User avatar
Member
Member
luyolo.mhlauli-nmmu.ac - 4/13/2012 3:13:01 AM
   
RE:Editor in Custom Table Form
I am talking about the CustomTableForm web part that you get from the market place. I created a custom table with fields that you will edit using the editor and my I wanted to use a single editor on top of the page and not have a toolbar for each field.

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 4/16/2012 2:58:23 AM
   
RE:Editor in Custom Table Form
Hi,

you will need to modify the code of web part a little.

1. To the markup insert bold div tag:

<div id="FCKToolbar" ></div>

<cms:CustomTableForm ID="customTableForm" runat="server" />[/i]

2. In the code behind insert bold line to the Page_Load method:


protected void Page_Load(object sender, EventArgs e)
{
SetupControl();
customTableForm.BasicForm.HtmlAreaToolbarLocation = "Out:FCKToolbar";

}


Then one FCK toolbar should be shared by both editable regions.

If this answer helps you, please add a comment to the market place. Maybe this would be useful for other users as well.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
luyolo.mhlauli-nmmu.ac - 4/16/2012 3:59:35 AM
   
RE:Editor in Custom Table Form
Works like a charm.Let me add that comment in the market place. Thanks Ivana