Skip to content

Commit b971a46

Browse files
Integrated latest changes at 07-15-2024 4:30:14 PM
1 parent 848e752 commit b971a46

File tree

19 files changed

+385
-138
lines changed

19 files changed

+385
-138
lines changed

ej2-react-toc.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,11 @@
943943
<li><a href="/ej2-react/document-editor/how-to/customize-color-picker">Customize color picker in Document Editor component</a></li>
944944
</ul>
945945
</li>
946+
<li>FAQ
947+
<ul>
948+
<li><a href="/ej2-react/document-editor/faq/unsupported-file-format">Unsupported Warning Message When Opening a Document</a></li>
949+
</ul>
950+
</li>
946951
<li><a href="https://ej2.syncfusion.com/react/documentation/api/document-editor/">API Reference</a></li>
947952
</ul>
948953
</li>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{% raw %}
2+
import * as ReactDOM from 'react-dom';
3+
import * as React from 'react';
4+
import { DocumentEditorContainerComponent, Toolbar } from '@syncfusion/ej2-react-documenteditor';
5+
DocumentEditorContainerComponent.Inject(Toolbar);
6+
function App() {
7+
let documenteditorcontainer;
8+
React.useEffect(() => {
9+
componentDidMount();
10+
}, []);
11+
function created() {
12+
let data ='{"sfdt":"UEsDBAoAAAAIAIdcHVcVYDYnnwgAAAA9AAAEAAAAc2ZkdO1bX2/byBH/KgT7ahTUf9tv0b/zJU5inJ0Ah9QPK2opbrTkMsulFSUIUCRPfSlQIFf0oQf0rQ9F0QA9oIe+9MMESNC763fozC4pURKlUxybMi6xkQw5M7s789vZ2SG5fm6LSLGAPaOn3lDZh0omdM+OqWsfPnpuA42kffjcjib2YbNS3bMj3z5sHcAFD+ACqEypSukgpUMvsg8doIKaC39oH9aae7aX0gHT7AGMZN+jkxMyojb0PwpjYNySZMBcuA9dwYFR2bPpk4mmfKBc3dJIHp2/gE60tZGHpg6GMkaqYNjnIOPKUDkydJDe+4ZcIAEaqxANETIgHMblzEsFrmcUmR5D39le/Axs2Qdn4Na+K0KhphG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xxRMsRDuJWrsQPrUhxWV6S/dloHlWaz2XBarapzUG/NS1TBTcW68TXtcq1nCv9qv1E/aBa/EFxpMXubtcwvYJsz2fNp2QRX9erg2hKt6qaXLx+EVq10tGqlo1UrQGs9SJV+rZU9NJeLTL10ZOobDr9tF0ezI3Klo9UoHa3GB8VRfrGVi0yzdGSaN3yFdalHEq6sEyLJSJLIt/oiVAamSvZ1eGUXhKqSyEWlG7EprfFmZVtab/9ut4kt7a+tt7+6t218ZRXPDuyvF9l/E9LrlvY3CvEvOeFtaWvzA229lhS0ha1UXk1uLn7Xu3reZTUzplZkRvWFULs3KrUC32pwfR4SOuOGuoGhMr19aigLRrHpzQv16fFy/4By9mHkN4njOLX0W4e7UyvqmRVhSVac48cwm37Gf4f4v/g/UEsBAhQACgAAAAgAh1wdVxVgNiefCAAAAD0AAAQAAAAAAAAAAAAAAAAAAAAAAHNmZHRQSwUGAAAAAAEAAQAyAAAAwQgAAAAA"}';
13+
documenteditorcontainer.documentEditor.open(data);
14+
}
15+
function componentDidMount() {
16+
setTimeout(() => {
17+
created();
18+
});
19+
}
20+
return (<div><h1>Syncfusion Word Processor(a.k.a)Document Editor Component</h1>
21+
<DocumentEditorContainerComponent height={'590px'} id="container" ref={(scope) => {
22+
documenteditorcontainer = scope;
23+
created();
24+
}} serviceUrl="https://ej2services.syncfusion.com/production/web-services/api/documenteditor/" enableToolbar={true}/></div>
25+
);
26+
}
27+
export default App;
28+
ReactDOM.render(<App />, document.getElementById('sample'));
29+
{% endraw %}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{% raw %}
2+
3+
4+
5+
import * as ReactDOM from 'react-dom';
6+
import * as React from 'react';
7+
import { DocumentEditorContainerComponent, Toolbar } from '@syncfusion/ej2-react-documenteditor';
8+
DocumentEditorContainerComponent.Inject(Toolbar);
9+
function App() {
10+
let documenteditorcontainer: DocumentEditorContainerComponent;
11+
React.useEffect(() => {
12+
componentDidMount()
13+
}, []);
14+
function created() {
15+
// load your default document here
16+
let data = '{"sfdt":"UEsDBAoAAAAIAIdcHVcVYDYnnwgAAAA9AAAEAAAAc2ZkdO1bX2/byBH/KgT7ahTUf9tv0b/zJU5inJ0Ah9QPK2opbrTkMsulFSUIUCRPfSlQIFf0oQf0rQ9F0QA9oIe+9MMESNC763fozC4pURKlUxybMi6xkQw5M7s789vZ2SG5fm6LSLGAPaOn3lDZh0omdM+OqWsfPnpuA42kffjcjib2YbNS3bMj3z5sHcAFD+ACqEypSukgpUMvsg8doIKaC39oH9aae7aX0gHT7AGMZN+jkxMyojb0PwpjYNySZMBcuA9dwYFR2bPpk4mmfKBc3dJIHp2/gE60tZGHpg6GMkaqYNjnIOPKUDkydJDe+4ZcIAEaqxANETIgHMblzEsFrmcUmR5D39le/Axs2Qdn4Na+K0KhphG1OkLG7IJAc1BA/4wKWaPjhR5dJyqWgBmKg1/2MYuVJTxL0afK8tBopVg4snAyBSD4AlApA5CShslwH2QBOkB08XKGSFvw4fW7XWxBGUjYHi6UX+07+Nvv28sRqaWdzsFBv2+kBpaOjXbldWr6J68jVnT6/WbTcfI6vKCfZnNxrKJ+Dg4W+5FbjEVXdPJeG50y5roY8WsfNoZhKw1naYLnXAPAqUs4rPhfLgxuDN1Vl1CYMVMQIuKWCYLjtJ1+mSCsTTezsFB5PLoiGXBqnSrJxrQEVLLRS0yAvW6rW6usJkAfpLW9AiWDzBEb+Rz+KTr8pW6OLIsVtrI5fqkgWbhQ5JWRNgvtKCdzQqtKwQKpzBOGXhkiUVZJq6OyQ9/nXosgv6cOyEIOTQaxK1mk1mqUgVU2YjlZlazsLJuwyoVPElFZiFaldLRKi6xkdVEleYcfhEMqoRYpMbMuT5pV9si7fwI8wye/CVO+NWSgK2mID4Khii0SDq0Ycn1cRlmkYaikMLSFGFu3QsWeJOhDktuRW051v7cPO/IcmUqGzFKzDJUV9ir3ypbAABo192xiyCUiYQ0E1+x8Ggo+tZ4kzB1bAykmIYTBU+txEkSxJS6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HxPlYwenU4n5ogflJzShXFi9IY1jFN2XU+zqjj6UgIy7fBpohlRsjIxjIoT+RD3u+CSIdH8s9PHrZDwGrIh1IpRuKTS+SMBMEs58e8ioKpy1BxAFC04jI5GINBV6bqbcIzTUIRGEuXTdTkYI5TGlnEzIkFLrwZfIFpFY6PC2D5N+RNGK20SDhiSkMbXwRTy6x2LE7pSORNrJ3amJgykJAyIzvXtjDUMPFl6ggePuGIOL4Q5GTMv7cUDyOic+QUSQxFE6EeGaiQDR4/Uiuk4EgbpsxRnhixXfGYFcQY0kWZDgZGhposWensDUfEyHAQu3SkX5xNHYKgk1tkpCjS2SEGSNd3/+dsvE83MpJ4uvNNFkt2l66Qg5ZB+XXbokCU8oLJ/PyeVKk0s2U59Tyo1OKebT5HSWS2YPAGkV9XHlYtEzRHVeA+PRgfDpfNQs5xxRMsRDuJWrsQPrUhxWV6S/dloHlWaz2XBarapzUG/NS1TBTcW68TXtcq1nCv9qv1E/aBa/EFxpMXubtcwvYJsz2fNp2QRX9erg2hKt6qaXLx+EVq10tGqlo1UrQGs9SJV+rZU9NJeLTL10ZOobDr9tF0ezI3Klo9UoHa3GB8VRfrGVi0yzdGSaN3yFdalHEq6sEyLJSJLIt/oiVAamSvZ1eGUXhKqSyEWlG7EprfFmZVtab/9ut4kt7a+tt7+6t218ZRXPDuyvF9l/E9LrlvY3CvEvOeFtaWvzA229lhS0ha1UXk1uLn7Xu3reZTUzplZkRvWFULs3KrUC32pwfR4SOuOGuoGhMr19aigLRrHpzQv16fFy/4By9mHkN4njOLX0W4e7UyvqmRVhSVac48cwm37Gf4f4v/g/UEsBAhQACgAAAAgAh1wdVxVgNiefCAAAAD0AAAQAAAAAAAAAAAAAAAAAAAAAAHNmZHRQSwUGAAAAAAEAAQAyAAAAwQgAAAAA"}';
17+
documenteditorcontainer.documentEditor.open(data);
18+
19+
}
20+
function componentDidMount() {
21+
setTimeout(() => {
22+
created();
23+
});
24+
}
25+
return (<div><h1>Syncfusion Word Processor(a.k.a)Document Editor Component</h1>
26+
<DocumentEditorContainerComponent height={'590px'} id="container" ref={(scope) => {
27+
documenteditorcontainer = scope;
28+
created();
29+
}} serviceUrl="https://ej2services.syncfusion.com/production/web-services/api/documenteditor/" enableToolbar={true}/></div>
30+
);
31+
}
32+
export default App;
33+
ReactDOM.render(<App />, document.getElementById('sample'))
34+
35+
36+
37+
{% endraw %}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
#loader {
3+
color: #008cff;
4+
height: 40px;
5+
left: 45%;
6+
position: absolute;
7+
top: 45%;
8+
width: 30%;
9+
}

ej2-react/code-snippet/document-editor/accessibility-cs1/index.html

Lines changed: 56 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
System.config({
2+
transpiler: "ts",
3+
typescriptOptions: {
4+
target: "es5",
5+
module: "commonjs",
6+
moduleResolution: "node",
7+
emitDecoratorMetadata: true,
8+
experimentalDecorators: true,
9+
"jsx": "react"
10+
},
11+
meta: {
12+
'typescript': {
13+
"exports": "ts"
14+
}
15+
},
16+
paths: {
17+
"syncfusion:": "https://cdn.syncfusion.com/ej2/20.3.56/"
18+
},
19+
map: {
20+
app: "app",
21+
ts: "https://unpkg.com/plugin-typescript@4.0.10/lib/plugin.js",
22+
typescript: "https://unpkg.com/typescript@2.2.2/lib/typescript.js",
23+
"plugin-json": "https://cdnjs.cloudflare.com/ajax/libs/systemjs-plugin-json/0.3.0/json.min.js",
24+
"@syncfusion/ej2-base": "syncfusion:ej2-base/dist/ej2-base.umd.min.js",
25+
"@syncfusion/ej2-buttons": "syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js",
26+
"@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js",
27+
"@syncfusion/ej2-data": "syncfusion:ej2-data/dist/ej2-data.umd.min.js",
28+
"@syncfusion/ej2-dropdowns": "syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js",
29+
"@syncfusion/ej2-notifications":"syncfusion:ej2-notifications/dist/ej2-notifications.umd.min.js",
30+
"@syncfusion/ej2-lists": "syncfusion:ej2-lists/dist/ej2-lists.umd.min.js",
31+
"@syncfusion/ej2-inputs": "syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js",
32+
"@syncfusion/ej2-navigations": "syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js",
33+
"@syncfusion/ej2-popups": "syncfusion:ej2-popups/dist/ej2-popups.umd.min.js",
34+
"@syncfusion/ej2-compression": "syncfusion:ej2-compression/dist/ej2-compression.umd.min.js",
35+
"@syncfusion/ej2-excel-export": "syncfusion:ej2-excel-export/dist/ej2-excel-export.umd.min.js",
36+
"@syncfusion/ej2-file-utils": "syncfusion:ej2-file-utils/dist/ej2-file-utils.umd.min.js",
37+
"@syncfusion/ej2-office-chart": "syncfusion:ej2-office-chart/dist/ej2-office-chart.umd.min.js",
38+
"@syncfusion/ej2-svg-base": "syncfusion:ej2-svg-base/dist/ej2-svg-base.umd.min.js",
39+
"@syncfusion/ej2-calendars": "syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js",
40+
"@syncfusion/ej2-charts": "syncfusion:ej2-charts/dist/ej2-charts.umd.min.js",
41+
"@syncfusion/ej2-pdf-export": "syncfusion:ej2-pdf-export/dist/ej2-pdf-export.umd.min.js",
42+
"@syncfusion/ej2-documenteditor": "syncfusion:ej2-documenteditor/dist/ej2-documenteditor.umd.min.js",
43+
44+
"@syncfusion/ej2-react-base": "syncfusion:ej2-react-base/dist/ej2-react-base.umd.min.js",
45+
"@syncfusion/ej2-react-navigations": "syncfusion:ej2-react-navigations/dist/ej2-react-navigations.umd.min.js",
46+
"@syncfusion/ej2-react-documenteditor": "syncfusion:ej2-react-documenteditor/dist/ej2-react-documenteditor.umd.min.js",
47+
"react-dom": "https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js",
48+
"react": "https://unpkg.com/react@18.2.0/umd/react.production.min.js",
49+
},
50+
packages: {
51+
'app': { main: 'index', defaultExtension: 'tsx' },
52+
}
53+
});
54+
55+
System.import('app');

ej2-react/code-snippet/document-editor/customize-context-menu-cs1/app/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function App() {
2626
switch (args.id) {
2727
case id + 'search_in_google':
2828
let searchContent = container.documentEditor.selection.text;
29-
if (!this.container.documentEditor.selection.isEmpty && /\S/.test(searchContent)) {
29+
if (!container.documentEditor.selection.isEmpty && /\S/.test(searchContent)) {
3030
window.open('http://google.com/search?q=' + searchContent);
3131
}
3232
break;

ej2-react/code-snippet/document-editor/customize-context-menu-cs1/app/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function App() {
3333
switch (args.id) {
3434
case id + 'search_in_google':
3535
let searchContent: string = container.documentEditor.selection.text;
36-
if (!this.container.documentEditor.selection.isEmpty && /\S/.test(searchContent)) {
36+
if (!container.documentEditor.selection.isEmpty && /\S/.test(searchContent)) {
3737
window.open('http://google.com/search?q=' + searchContent);
3838
}
3939
break;

ej2-react/code-snippet/document-editor/link-cs1/app/index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{% raw %}
22
import * as ReactDOM from 'react-dom';
33
import * as React from 'react';
4-
import { DocumentEditorComponent, SfdtExport, Selection } from '@syncfusion/ej2-react-documenteditor';
5-
DocumentEditorComponent.Inject(Selection, SfdtExport);
4+
import { DocumentEditorComponent, SfdtExport, Selection, Editor } from '@syncfusion/ej2-react-documenteditor';
5+
DocumentEditorComponent.Inject(Selection, SfdtExport, Editor);
66
function App() {
77
let documenteditor;
88
// Add event listener for requestNavigate event to customize hyperlink navigation functionality
@@ -17,7 +17,7 @@ function App() {
1717
args.isHandled = true;
1818
}
1919
};
20-
return (<DocumentEditorComponent id="container" height={'330px'} ref={(scope) => { documenteditor = scope; }} enableSelection={true} enableSfdtExport={true} requestNavigate={requestNavigate}/>);
20+
return (<DocumentEditorComponent id="container" height={'330px'} ref={(scope) => { documenteditor = scope; }} enableSelection={true} enableSfdtExport={true} requestNavigate={requestNavigate} isReadOnly={false} enableEditor={true}/>);
2121
}
2222
export default App;
2323
ReactDOM.render(<App />, document.getElementById('sample'));

ej2-react/code-snippet/document-editor/link-cs1/app/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
import * as ReactDOM from 'react-dom';
55
import * as React from 'react';
66
import {
7-
DocumentEditorComponent, SfdtExport, Selection, RequestNavigateEventArgs
7+
DocumentEditorComponent, SfdtExport, Selection, RequestNavigateEventArgs, Editor
88
} from '@syncfusion/ej2-react-documenteditor';
99

10-
DocumentEditorComponent.Inject(Selection, SfdtExport);
10+
DocumentEditorComponent.Inject(Selection, SfdtExport, Editor);
1111
function App() {
1212
let documenteditor: DocumentEditorComponent;
1313

@@ -25,7 +25,7 @@ function App() {
2525
};
2626

2727
return (
28-
<DocumentEditorComponent id="container" height={'330px'} ref={(scope) => {documenteditor = scope; }} enableSelection={true} enableSfdtExport={true} requestNavigate={requestNavigate} />
28+
<DocumentEditorComponent id="container" height={'330px'} ref={(scope) => {documenteditor = scope; }} enableSelection={true} enableSfdtExport={true} requestNavigate={requestNavigate} enableEditor={true} isReadOnly={false} />
2929
);
3030

3131
}

ej2-react/code-snippet/document-editor/print-cs2/app/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { DocumentEditorComponent, Print, Editor, Selection, EditorHistory, Sfdt
55
} from '@syncfusion/ej2-react-documenteditor';
66

77
DocumentEditorComponent.Inject(Print, Editor, Selection, SfdtExport, EditorHistory);
8-
let documenteditor: DocumentEditorComponent;
8+
let documenteditor;
99
function App() {
1010
return (
1111
<div>

ej2-react/code-snippet/document-editor/ruler-cs1/app/index.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{% raw %}
22
import * as ReactDOM from 'react-dom';
33
import * as React from 'react';
4-
import { DocumentEditorComponent, Editor } from '@syncfusion/ej2-react-documenteditor';
5-
DocumentEditorComponent.Inject(Editor);
4+
import { DocumentEditorComponent, Editor, Selection } from '@syncfusion/ej2-react-documenteditor';
5+
DocumentEditorComponent.Inject(Editor, Selection);
66
function App() {
77
let container;
88
React.useEffect(() => {
99
componentDidMount()
1010
}, []);
1111
function created() {
12-
container.documentEditorSettings.showRuler = true;
13-
container.enableAllModules();
12+
container.documentEditorSettings.showRuler = true;
1413
}
1514
function componentDidMount() {
1615
setTimeout(() => {
@@ -25,7 +24,7 @@ function App() {
2524
<DocumentEditorComponent id="container" height={'590px'} isReadOnly={false} ref={(scope) => {
2625
container = scope;
2726
created();
28-
}}
27+
}} enableEditor={true} enableSelection={true}
2928
serviceUrl="https://ej2services.syncfusion.com/production/web-services/api/documenteditor/"
3029
/>
3130
</div>

ej2-react/code-snippet/document-editor/ruler-cs1/app/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
import * as ReactDOM from 'react-dom';
55
import * as React from 'react';
6-
import { DocumentEditorComponent, Editor } from '@syncfusion/ej2-react-documenteditor';
7-
DocumentEditorComponent.Inject(Editor);
6+
import { DocumentEditorComponent, Editor, Selection } from '@syncfusion/ej2-react-documenteditor';
7+
DocumentEditorComponent.Inject(Editor, Selection);
88

99

1010
function App() {
@@ -14,8 +14,7 @@ function App() {
1414
}, []);
1515

1616
function created() {
17-
container.documentEditorSettings.showRuler = true;
18-
container.enableAllModules();
17+
container.documentEditorSettings.showRuler = true;
1918
}
2019

2120
function componentDidMount() {
@@ -33,7 +32,7 @@ function App() {
3332
<DocumentEditorComponent id="container" height={'590px'} isReadOnly={false} ref={(scope) => {
3433
container = scope;
3534
created();
36-
}}
35+
}} enableEditor={true} enableSelection={true}
3736
serviceUrl="https://ej2services.syncfusion.com/production/web-services/api/documenteditor/"
3837
/>
3938
</div>

ej2-react/code-snippet/document-editor/scrolling-zooming-cs1/app/index.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{% raw %}
22
import * as ReactDOM from 'react-dom';
33
import * as React from 'react';
4-
import { DocumentEditorComponent } from '@syncfusion/ej2-react-documenteditor';
4+
import { DocumentEditorComponent, Selection, Editor } from '@syncfusion/ej2-react-documenteditor';
5+
DocumentEditorComponent.Inject(Selection, Editor);
56
function App() {
67
let documenteditor;
78
React.useEffect(() => {
@@ -69,7 +70,7 @@ function App() {
6970
documenteditor.scrollToPage(2);
7071
});
7172
}
72-
return (<DocumentEditorComponent id="DocumentEditor" height={'330px'} ref={(scope) => { documenteditor = scope; }} isReadOnly={false}/>);
73+
return (<DocumentEditorComponent id="DocumentEditor" height={'330px'} ref={(scope) => { documenteditor = scope; }} isReadOnly={false} enableEditor={true} />);
7374
}
7475
export default App;
7576
ReactDOM.render(<App />, document.getElementById('sample'));

ej2-react/code-snippet/document-editor/scrolling-zooming-cs1/app/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{% raw %}
22
import * as ReactDOM from 'react-dom';
33
import * as React from 'react';
4-
import { DocumentEditorComponent } from '@syncfusion/ej2-react-documenteditor';
5-
4+
import { DocumentEditorComponent, Selection, Editor } from '@syncfusion/ej2-react-documenteditor';
5+
DocumentEditorComponent.Inject(Selection, Editor);
66
function App() {
77
let documenteditor: DocumentEditorComponent;
88
React.useEffect(() => {
@@ -72,7 +72,7 @@ function App() {
7272
});
7373
}
7474
return (
75-
<DocumentEditorComponent id="DocumentEditor" height={'330px'} ref={(scope) => { documenteditor = scope; }} isReadOnly={false} />
75+
<DocumentEditorComponent id="DocumentEditor" height={'330px'} ref={(scope) => { documenteditor = scope; }} isReadOnly={false} enableEditor={true} />
7676
);
7777
}
7878
export default App;

0 commit comments

Comments
 (0)