Adding custom tool bar to a page type

Khathun s asked on January 10, 2017 12:07

hi,

I have a rich text editor text box field I need to allow to add only links to the field i want to remove all the field like source, style and video etc link, I need to keep only adding link to the rich text editor field..

i have created default one in CMS\CMSAdminControls\CKeditor\config.js, i could't be able to add it in page, please help me how to add custom field in page which I have created in config.js.

Correct Answer

Anton Grekhovodov answered on January 11, 2017 05:28

I've added a new toolbar set in config.js file:

config.toolbar_LinkOnly =
[
    ['InsertLink', 'Unlink', '-']
];

Then I went to Article page type, chose a field with Long Text datatype, this datatype has Rich text editor in form control property. And then I filled Toolbar set property with my toolbar set name

Image Text

After that if I try to create an article, I'll see link buttons only for the field.

Image Text

Be aware that your browser can save config.js file in cache, so you need to clear it after changes in the file.

2 votesVote for this answer Unmark Correct answer

Recent Answers


Anton Grekhovodov answered on January 10, 2017 13:49 (last edited on January 10, 2017 13:50)

Hi Khathun,

Read documentation here Toolbar set used for structured pages. You can specify visible toolbar buttons by user role. Maybe it helps

Image Text

1 votesVote for this answer Mark as a Correct answer

Khathun s answered on January 10, 2017 15:35 (last edited on January 10, 2017 15:37)

Hi,

Please let me know where can i get visible toolbar button for the specific field, i have created one custom control like this in config.js file config.toolbar_Custom = config.toolbar_Custom = [ ['InsertLink', 'Unlink', '-'] ] and i have written like these in web.config file
it is working fine but it is applying for all pages but i want only for specific page type please let me know if any solution is there

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on January 10, 2017 23:21

When you select a rich text editor form control in a page type, you can define which controls are in there by using the predefined toolbar set or your own in the configuration for that particular form control for that page type.

0 votesVote for this answer Mark as a Correct answer

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