@team-monolith/cds 0.29.37 → 0.29.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -62,16 +62,17 @@ export function ReactEditorJS(props) {
|
|
|
62
62
|
blocks,
|
|
63
63
|
});
|
|
64
64
|
}, [blocks, readOnly, isInitialized]);
|
|
65
|
+
const tools = Object.assign(Object.assign({}, TOOLS), { image: Object.assign(Object.assign({}, TOOLS.image), { config: {
|
|
66
|
+
uploader: (_a = codleDesignSystemContext.editorjs) === null || _a === void 0 ? void 0 : _a.image.uploader,
|
|
67
|
+
} }) });
|
|
65
68
|
// readOnly가 변경되면 ReactEditorJS를 다시 마운트하기 위해 key를 변경합니다.
|
|
66
69
|
// readOnly 모드에서는 onChange를 전달할 수 없어서 케이스를 분리합니다.
|
|
67
70
|
if (readOnly) {
|
|
68
|
-
return (_jsx(Layout, Object.assign({ className: className, readOnly: true }, { children: _jsx(ReactEditorJS, { onInitialize: handleInitialize, tools:
|
|
69
|
-
uploader: (_a = codleDesignSystemContext.editorjs) === null || _a === void 0 ? void 0 : _a.image.uploader,
|
|
70
|
-
} }) }), defaultValue: {
|
|
71
|
+
return (_jsx(Layout, Object.assign({ className: className, readOnly: true }, { children: _jsx(ReactEditorJS, { onInitialize: handleInitialize, tools: tools, defaultValue: {
|
|
71
72
|
blocks,
|
|
72
73
|
}, i18n: I18n, readOnly: true }, "readOnly") })));
|
|
73
74
|
}
|
|
74
|
-
return (_jsx(Layout, Object.assign({ className: className }, { children: _jsx(ReactEditorJS, { onInitialize: handleInitialize, tools:
|
|
75
|
+
return (_jsx(Layout, Object.assign({ className: className }, { children: _jsx(ReactEditorJS, { onInitialize: handleInitialize, tools: tools, inlineToolbar: [
|
|
75
76
|
"bold",
|
|
76
77
|
"italic",
|
|
77
78
|
"underline",
|