Hi,
I have an issue with tabs in the Rad Editor and/or the Telerik.Windows.Documents libraries. In my scenario I use the saved HTML content from the editor and convert it to DOCX using HtmlFormatProvider and DocxFormatProvider in the Telerik.Windows.Document libraries.The reason why I convert it to DOCX is because I need to inject it into other Word documents using the MS JavaScript API for Office.
This soultion is working (more or less), however the issue is that the editor inserts four whitespaces to the editor HTML content when I click the tab button.After I convert the HTML to DOCX, this is the resulting OOXML fragment:
<w:r>
<w:t> Hallo</w:t>
</w:r>
If I do the same tab-operation in Word the result is this:
<w:r>
<w:tab />
<w:t>Hallo</w:t>
</w:r>
I've played around with inserting 	 and   in the editor using the InsertTab function in JavaScript, but to no avail. There is still no consistency in the converted ooxml versus the ooxml produced by Word. I've also tried to set DefaultTabStopWidth on the RadFlowDocument and adding a tabstop to the TabStops collection on the paragraph properties for the relevant style, but I cannot find any working solution.
As our users are allowed to work on the same content in both Word and in the editor in the web application, this causes some issues regarding consistency in text layout/placement.
I am using:
Telerik.Web.UI 2018.3.910.45
Telerik.Windows.Documents.* 2018.3.904.40
Internet Explorer 11.0.9600.19155
I'm not quite sure where to go from here. I guess it boils down to that the converted DOCX needs to have a <w:tab /> at the position I added a tab in the editor. Is there any possible solution out of the box?
Thanks
Best regards,
Geir Morten Hagen