@acoustic-content-sdk/react-hbs-edit

Module to attach inline-edit functionality to an WCH based Angular application.

Usage no npm install needed!

<script type="module">
  import acousticContentSdkReactHbsEdit from 'https://cdn.skypack.dev/@acoustic-content-sdk/react-hbs-edit';
</script>

README

npm

API Documentation

Home > @acoustic-content-sdk/react-hbs-edit

react-hbs-edit package

Implementation of utility functions and react components that render the component based on handlebars templates and integrate with inline edit.

Functions

Function Description
createHandlebarsComponent(aStore, aDeliveryContent, aEditService, aDoc, aLogSvc, aScheduler) Returns a React component that renders the content item passed into its properties. Markup elements annotated with inline edit controls will be registered with the inline edit service.

Interfaces

Interface Description
HandlebarsComponentProps Property interface of the handlebars components

Variables

Variable Description
createMarkupRenderer
VERSION Version and build number of the package

Home > @acoustic-content-sdk/react-hbs-edit > createHandlebarsComponent

createHandlebarsComponent() function

Returns a React component that renders the content item passed into its properties. Markup elements annotated with inline edit controls will be registered with the inline edit service.

Signature:

export declare function createHandlebarsComponent(aStore: ReduxRootStore, aDeliveryContent: DeliveryContentResolver, aEditService: WchInlineEditServiceV2, aDoc: Document, aLogSvc?: LoggerService, aScheduler?: SchedulerLike): ReactComponent<HandlebarsComponentProps>;

Parameters

Parameter Type Description
aStore ReduxRootStore the redux store that contains all metadata
aDeliveryContent DeliveryContentResolver
aEditService WchInlineEditServiceV2 the edit service
aDoc Document the document, used to instantiate a template node
aLogSvc LoggerService optionally a logger service
aScheduler SchedulerLike optionally a scheduler

Returns:

ReactComponent<HandlebarsComponentProps>

a component that renders a content item based on the handlebars templates from the redux store

Home > @acoustic-content-sdk/react-hbs-edit > HandlebarsComponentProps

HandlebarsComponentProps interface

Property interface of the handlebars components

Signature:

export interface HandlebarsComponentProps 

Properties

Property Type Description
contentItemId string ID of the item to render
layoutMode string Optional layout mode

Home > @acoustic-content-sdk/react-hbs-edit > createMarkupRenderer

createMarkupRenderer variable

Signature:

createMarkupRenderer: typeof createRendererV2

Home > @acoustic-content-sdk/react-hbs-edit > VERSION

VERSION variable

Version and build number of the package

Signature:

VERSION: {
    version: {
        major: string;
        minor: string;
        patch: string;
        branch: string;
    };
    build: Date;
}

Home > @acoustic-content-sdk/react-hbs-edit > HandlebarsComponentProps > contentItemId

HandlebarsComponentProps.contentItemId property

ID of the item to render

Signature:

contentItemId?: string;

Home > @acoustic-content-sdk/react-hbs-edit > HandlebarsComponentProps > layoutMode

HandlebarsComponentProps.layoutMode property

Optional layout mode

Signature:

[KEY_LAYOUT_MODE]?: string;