Skip to Content
author's profile photo Former Member
Former Member

Customize existing smartedit toolbar

Hi all,

I am trying to add additional buttons to the existing smartedit toolbars. I have generated a new extension from ysmarteditmodule, read through the generated sample files and compared those with the files in the existing cmssmartedit extension.

Without seeing smartedit, I would have thought that the sample files would add some analyze button to the existing toolbars. However, that button comes up in the toolbar of the analysis perspective it creates instead. It's adding the button to the toolbar with ID "experienceSelectorToolbar" and I cannot spot anything that would point to a certain perspective anywhere. In short, I have no clue what makes that button show up in the toolbar of the sample analysis perspective rather than the toolbar of eg. the advanced edit perspective. Not the toolbar ID it seems.

Is there even a way to add a button to the existing toolbar defined in eg. cmsmartedit, ie. a toolbar defined in a different extension? Or does it automatically scope everything to the current extension?

Thanks in advance for any help!

Cheers, Sven

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 18, 2018 at 07:40 PM

    There should be a configuration for perspectiveService.register() to register features to a perspective.

    To add a feature to the existing basic edit perspective, you need something like this:

     // The key must match one of the existing perspective keys defined in cmssmartedit. 
     perspectiveService.register({
             key: 'se.cms.perspective.basic',
             nameI18nKey: 'se.cms.perspective.basic.name',
             features: ['sampleToolbarButton']
     });
    

    See the follow docs for more information:

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.