HI there , i was testing last version of Document Editor (22.2.7) and i found an issue with tables
Steps
Hi carlos,
Please find the attached video and details below. Please cross-check that and let us know if you need any other assistance.
|
The exported document with Table 1 looks with the dot (punto) border.
Repeating (cell border style as None)
|
|
|
The exported document with Table 2 looks with the empty border.
setting (Table border style as None)
In MS Word, when setting the border style as None and applying it to the Table, it will remove the border. The Document Editor also follows the same. |
|
Regards,
Kavitha M
HI Kavitha, checking your video against mine and making more tests it turns out that if I remove language and leave document editor with plain english, it works .!
BUt if i set spanish or other language then its the same issue the border its not applied or after change then the border is set as "NONE"
Checking the source code files in debugger i found the issue
on file
node_modules/@syncfusion/ej2-documenteditor/src/document-editor/implementation/dialogs/borders-and-shading-dialog.js in the
getBorder function
BordersAndShadingDialog.prototype.getBorder = function (type) {
var border = new WBorder();
border.color = this.borderColorPicker.value;
border.lineStyle = this.borderStyle.text; // this line is wrong due its taking the translated TEXT instead the proper value
border.lineWidth = this.borderWidth.value;
if (type === 'left' || type === 'right') {
border.space = 4;
} else {
border.space = 1;
}
return border;
};
the line :
border.lineStyle = this.borderStyle.text;
its taking the Translated Value / Text for apply to the borderStyle so in my case im using spanish its trying to SET
border.lineStyle = "Punto" instead border.lineStyle = "Dot"
so manually Setting each time the function is called to
border.lineStyle =
"Dot" in the DEBUG CONSOLE it works but its an issue
See the image
carlos, we can reproduce the reported issue "None as a default option in style and Exported document in word file and the table is Without borders ". Currently, we are validating and will get back to you by August 10, 2023.
HI, thanks for the update
But mainly I mean: I create table and
set borders as solid, dotted etc but these styles are not applied due
the translation Value/NAME and when click OK to apply the changes
and the code what applies is "NONE" as border style
ALSO WHEN going
back to change a style on the table appears as "NONE" cause the border
style was not applied correctly in code and it has NO border by that
time
Carlos, Please check the reported issue in below sample: In latest release, we have added some fix related to table border.
https://stackblitz.com/edit/i5dvj4?file=index.html
In Document editor, if you select the any border style, it will applied as Solid and you can see difference in exported document.
Hi , after upgrading the library @syncfusion/ej2-vue-documenteditor and @syncfusion/ej2-vue-splitbuttons
i got an error
JSON.parse: expected ',' or '}' after property value in object at line 1 column 206 of the JSON data
initToolBar tool-bar.js:90
i uninstalled syncfusion libraries and reinstalled
it seems HelperMethods is undefined , any pointers or i have to import another thing in order to initialize document editor ?
After testing it seems i cannot use an object to set custom buttons in the toolbar
if i use this config
works fine
but if i use
[{
prefixIcon: "e-align-bottom-2",
tooltipText: "Import document",
text: "Import",
id: "openCustom"
},
'Separator',
{
prefixIcon: "e-save",
tooltipText: "Export document",
text: 'Export <div class="e-de-text-wrap">as...</div>',
id: "saveCustom"
},
'Separator',
{
prefixIcon: "e-named-set",
tooltipText: "Insert variable in document",
text: 'Insert <div class="e-de-text-wrap"> variable</div>',
id: "insertVariable"
},
'Separator', 'Undo', 'Redo', 'Separator', 'Image', 'Table',
'Separator',
'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break',
'Separator', 'Find', 'Separator',
'LocalClipboard'
]
it breaks.
Another issue i found was using spanish locale
Got the texts from https://github.com/syncfusion/ej2-locale
and no appear the texts for border styles
SO far toolbar problem was solved, turns out that CustomToolbarItemModel text property no longer accepts HTML
example 1:
{
prefixIcon: "e-named-set",
tooltipText: "Insert variable",
text: 'Insert <div class="e-de-text-wrap"> variable</div>',
id: "insertVariable"
},
it breaks
Example 2:
{
prefixIcon: "e-named-set",
tooltipText: "Insertar variable de contratos",
text: 'Insert<br>variable',
id: "insertVariable",
cssClass: 'canna_editor_customBtn'
},
<style>
.canna_editor_customBtn .e-tbar-btn-text{
line-height: 11px;
}
</style>
works
And about borders and shading removing the Spanish language and leaving plain english happens the same
Tested Options :
1.- Removed node_modules and reinstall all
2.- Uninstalled syncfusion libraries and reinstall
3.- cleared cache in browser
so far the installed in package json was
using VUE .2.7.14 , quasar 1.22.9
After many tests i saw that the problem is the CSS version 22.2.10 , 22.2.9
I use the CSS generated in theme studio with material design comparing the full CSS (document editor) part with
node_modules\@syncfusion\ej2-documenteditor\styles\material.css
there is some missing CSS in the files generated by themestudio
After more testing and fixing temporary the CSS the
table problem is fixed
## After testing it seems i cannot use an object to set custom buttons in the toolbar
We will resolve the issue in upcoming weekly release which is expected by end of August 2023.
## table problem is fixed
You need to update the css(v22.2.10) to resolve this issue.