close

Filter

loading table of contents...

Studio Developer Manual / Version 2107

Table Of Contents

7.25.8.1 Register PropertyFields for Editorial Comments

As mentioned in the above list, property fields have to be registered in a global editorialCommentPropertyRegistryService. The Service lets you register PropertyRegistryModels based on any combination of a property name, a component's xtype or the CapType of a content in a document form. Please note, that Editorial Comments have been enabled per default for a variety of property field, such as text areas, text fields and link lists. The xtypes of these components are already registered in the editorialCommentPropertyRegistryService.

Just like the registration of property fields, the registry service can also exclude property fields from the Editorial Comments feature. See the example below to understand how registration and exclusion is done:

public class EditorialCommentsStudioPlugin extends StudioPlugin {

  public function EditorialCommentsStudioPlugin(
     config:EditorialCommentsStudioPlugin = null) {}

  override public function init(editorContext:IEditorContext):void {

    // enable comments for title property in article document forms
    editorialCommentPropertyRegistryService.register(
      new PropertyRegistryModel(null, "title", getCapType("CMArticle"))
    );

    // enable comments for all richtext areas
    editorialCommentPropertyRegistryService.register(
      new PropertyRegistryModel(CoreMediaRichTextArea.xtype, null, null)
    );

    // disable comments for detailText richtext property in pages
    editorialCommentPropertyRegistryService.exclude(
      new PropertyRegistryModel(null, "detailText", getCapType("CMChannel"))
    );
  }

  private function getCapType(contentName:String):CapType {
    return SESSION.getConnection().getContentRepository()
           .getContentType(contentName);
  }
}

As you can see, the propertyName must be passed without its "properties." prefix. You can use the editorialCommentPropertyRegistryService in your own Studio plugins to customize the default configuration.

Warning

Warning

Please note, that the order of registrations and exclusions is important, since excluded property fields might be registered again by a following registration.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.