@acoustic-content-sdk/react-hbs-edit 中文文档教程
首页 @acoustic-content-sdk/react-hbs-edit
react-hbs-edit package
实用功能的实现和基于车把模板呈现组件并与内联编辑集成的反应组件。
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
返回一个 React 组件,该组件呈现传递到其属性中的内容项。 使用内联编辑控件注释的标记元素将注册到内联编辑服务。
签名:
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 |
返回:
ReactComponent
一个基于来自 redux 存储的车把模板呈现内容项的组件
@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 |
首页 > @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;
}
首页 > @acoustic-content-sdk/react-hbs-edit > HandlebarsComponentProps > contentItemId
HandlebarsComponentProps.contentItemId property
ID of the item to render
Signature:
contentItemId?: string;
首页 > @acoustic-content-sdk/react-hbs-edit > HandlebarsComponentProps > layoutMode
HandlebarsComponentProps.layoutMode property
可选布局模式
签名:
[KEY_LAYOUT_MODE]?: string;
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;