Hello,
I am getting above mentioned subject error.
when I am creating 15 tables, 1 table on 1 page with available height its creating only 11 tables and then throwing below error.
Uncaught TypeError: Cannot read properties of undefined (reading 'childWidgets') (error comes on
selection.js:4235
)
same happening for 1*2 or 2*1 or 2*2 layout.
means in short it is not creating more than 11 tables.
please suggest any solution for this.
Thank You
Shweta
Hi Shweta,
We were unable to reproduce the reported issue, and we tried to insert the tables at the UI and API levels, but the tables inserted properly. So, could you please share the sample you tried on your end with a video illustration to replicate it? Thereby, we will analyze further and provide you with the appropriate solution at the earliest.
Regards,
Selvaprakash K
Hi Selvaprakash,
sorry I can not share whole project with you but I can share you some main function I used in my project.
I think with the help of this code you can understand what I am trying to achieve in my application.
code is in react
Hi Shweta,
We were unable to reproduce the reported issue, and we have attached the sample we used to try to replicate the issue. Could you please modify the attached stackblitz sample to be replicable and share it? Thereby, we will analyze further and provide you with the appropriate solution at the earliest.
Sample: https://stackblitz.com/edit/react-61kvge?file=index.js
Hello Selvaprakash,
I checked your sample code its loading three empty table on each page on import button call.
now if I changed page length from 3 to 20 on line number 23(
) then it throws below error,
also I want to load images in that tables in each cell.
one more thing I want to ask you,
which event is get fired on page Setup change?
Thank You
Shweta
Hi Shweta,
#Insert table
We have resolved the table inserting issue, and please refer to the below sample.
Sample: 4r1eyr
(forked) - StackBlitz
#Insert image
Please refer to the below UG documentation to know about inserting images.
#Event for toolbar click
We don’t have a public event to trigger when clicking default toolbar items, but we provide the toolbarClick event, and the toolbarClick event triggers only when a custom toolbar is clicked. If you want to use the toolbarClick event for any toolbar items, you want to customize which item you want. Please refer to the below UG documentation.
https://ej2.syncfusion.com/react/documentation/document-editor/how-to/customize-tool-bar
Regards,
Selvaprakash K
Hello Sir,
Apart from all above question's I want to know how can I get Body content height irrespective of Header Content and Footer Content of document editor.
Actually I have some predefined Header and Footer content , which disturb my body content so because of this I just want to know how to get only Body content available height.
Thank You
Shweta
Hi Shweta,
We have prepared the sample to meet your requirements, and please refer to the below sample to know how to get the available height.
Sample: https://stackblitz.com/edit/react-ya5faf-tc8lzw?file=index.js
Hello Sir,
First of all thank you for your reply.
actually I also have calculated page height same way as mentioned in sample.
I have predefined header footer content , but when header or footer content is big in size then page height calculated like sample goes wrong way, wrong way means if I have single page then I give page height to table row but this page height which I set to row get wrong as it shows two pages instead of one page.
If predefined header and footer is not big in size in that case above case works fine.
In short we can say, if I have predefined header and footer content with big size and if I give page height to table row then that page height is not calculated correctly, as it is one page its showing two pages.
Thank You,
Shweta
Hello Sir,
just attaching sample link where I added header and footer in your existing sample and you can see that single page get converted into two pages after adding header and footer content, why this is happen if we have single page and after adding header and footer its adding one more extra page.
how can we void this by using page height .
Sample : https://stackblitz.com/edit/react-ya5faf-kyyig6?file=index.js
Means number of pages should be remain same after adding header and footer content, why header and footer content changes page height or adding more pages?
Thank You,
Shweta
Hi Shweta,
The document body size decreases when header and footer sizes increase, so the content is rendered based on the available height of the body. Once the available height is filled, the remaining content is moved to the next page. This is our behavior, and MS Word also follows this behavior.
We find an issue in getting margins, so we will validate it and update the further details on July 26.
Hello Sir,
Thank you for your reply.
So how can we achieve my scenario, is there any way we can handle my scenario.
I have predefined header and footer content with fix number of pages and as I already described in my last post I don't want to add any extra page when I add/load header and footer content.
can I get header and footer content height so that we can minus that height from page height and so on to resolve that problem. or is there any other alternative which can solved my problem.
Waiting for your reply...
also waiting for your reply regarding issue in getting margins which you have already mentioned in your last post.
Thank You,
Shweta
Hi Shweta,
Sorry for the inconvenience. as we mentioned earlier. The document body size decreases when header/footer and footer sizes increase, so the content is rendered based on the available height of the body. Once the available height is filled, the remaining content is moved to the next page. This is our behavior, and MS Word also follows this behavior. and you can remove the header/footer space. Please refer to the below sample.
Sample: https://stackblitz.com/edit/react-1tpuyk-j44jc5?file=index.js
Code snippet:
container.documentChange = () => { reduceHeaderSize(); }; container.documentEditor.open(JSON.stringify(defaultDocument)); function reduceHeaderSize() { container.documentEditor.selection.sectionFormat.headerDistance=0; container.documentEditor.selection.sectionFormat.footerDistance=0; container.documentEditor.selection.sectionFormat.topMargin=10; container.documentEditor.selection.sectionFormat.bottomMargin=10; } |
Hello Sir,
Thank you for your reply.
Actually I don't want to reduce header and footer distance or margin but I want to handle header and footer content height with page content height.
whatever header footer content size I want to minus this from page height so number of pages remain constant.
I have predefined header and footer content with fix number of pages and as I already described in my last post I don't want to add any extra page when I add/load header and footer content.
can I get predefined header and footer content height so that we can minus that height from page height and so on to resolve that problem. or is there any other alternative which can solved my problem.
Thank You
Shweta
Hi Shweta,
Sorry for the inconvenience. We have checked the possibilities, and it is not possible to get header/footer height based on header/footer content. and the previously shared sample is working properly when the document contains a predefined header/footer with default height and also when the value of the "header from top" property is changed.