JSON File format support is missing
Dear Support,
I am using the SfRichTextBoxAdv control in an UWP app for
- Loading the JSON file
- Editing the JSON file &
- Saving the JSON file
internal FormatType GetFormatType(string format)
{
switch (format.ToLower())
{
case ".dotx":
return FormatType.Dotx;
case ".docx":
case ".docm":
case ".dotm":
return FormatType.Docx;
case ".dot":
return FormatType.Dot;
case ".doc":
return FormatType.Doc;
case ".rtf":
return FormatType.Rtf;
case ".txt":
return FormatType.Txt;
case ".htm":
case ".html":
return FormatType.Html;
case ".xml":
return FormatType.WordML;
default:
throw new NotSupportedException("RichTextBoxAdv does not support this file format.");
}
}
As per the above code snippet, the .JSON file format is not supported for loading & Saving the files.
Could you please help me out in extending the non supported file formats other than the supported existing file formats?
I am using Syncfusion SfRichTextBoxAdv V17.4.0.51.
PFA the rich text editor sample.
Thanks in advance.
Attachment: Syncfusion.RichTextEditor.Sample_ead11574.zip
The SfRichTextBoxAdv
control is a Microsoft Word-inspired editor control that provides a set of
features for viewing and editing various types of documents, including
Microsoft Word documents (.doc, .docx), rich text format documents (.rtf), HTML
documents (.htm, .html), XAML documents (.xaml), and text documents (.txt) and It's
important to note that the control does not currently support JSON files, and
there are no immediate plans to implement this feature.
While the SfRichTextBoxAdv control does not have built-in support for loading
JSON files, you can still display JSON content in the control by converting the JSON data into an
equivalent WordDocument object model. Once the JSON data has been converted into a WordDocument object
model, you can load it into the SfRichTextBoxAdv control using the appropriate API method.
We have also created a sample application that demonstrates how to load a
WordDocument instance into the SfRichTextBoxAdv control, which is attached below.
Please use the following UG link to learn about WordDocument and its child
elements in the UWP platform. This information can be helpful when converting
JSON data into the equivalent WordDocument object model.
UG link: https://help.syncfusion.com/file-formats/docio/create-word-document-in-uwp
Attachment: SfRichTextBoxAdv_DocIO_c1229254.zip
- 1 Reply
- 2 Participants
-
SI sidhartha
- May 9, 2023 02:12 PM UTC
- May 10, 2023 01:41 PM UTC