Add Rich Text Editor as form field in Banner Management Tool

Nishant Khandelwal asked on May 19, 2016 12:07

Hello team,

We are working on banners for our site using the Banner Management Tool in Kentico. While creating a new banner, in the "Content Section" I want to change the text box for "Image Title" field to Rich text editor form control.

How can we do that? Is there any way to do this.

http://pasteboard.co/12iEGASa.jpg

Recent Answers


Anton Grekhovodov answered on May 19, 2016 12:56

Hi,

You should find this control in Webpart application, switch to "Properties" tab and change the data type of the field to "Long text" (by default, Rich text editor available only for this data type)

Example: Image Text

0 votesVote for this answer Mark as a Correct answer

Nishant Khandelwal answered on May 19, 2016 13:42

Hello,

Sorry, if the question wasn't phrased properly..I mean if we are using "Banners" application of Kentico and suppose we have created new banner under one banner category.

Could you please refer below screenshot. I have highlighted the text box with yellow that needs to be modified to Rich Text Editor. http://pasteboard.co/12oHo6pN.jpg

These are not part of any webpart properties. We want to change the actual Kentico Form field for that particular section.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on May 19, 2016 14:15

If you look in the Banner module at the Banner class, you'll see the "Banner Image" is actually the BannerContent field and using a form control of "Banner Content". The form control manages the controls within that image selector. So you'd have to modify this out of the box file OR (my suggestion), clone the form control and make your modifications to that form control. Then go into the class definition and use the newly modified form control you created.

~/CMSModules/BannerManagement/FormControls/BannerContentEdit.ascx

0 votesVote for this answer Mark as a Correct answer

Anton Grekhovodov answered on May 19, 2016 14:26

Hi,

You can do it only in ascx control.

There are two ways:

  1. you can just add TextMode attribute, but it contains only Multiline

  2. if you want a rich text editor, you can change cmstextbox to cmshtmleditor control

Image Text

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on May 19, 2016 16:45

As Anton mentions how to change it, I'd highly recommend against changing that base control and simply cloning the Banner controls form control within Kentico and modifying that new ascx/cs file. This way it won't break your upgrade/hotfix.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.