This is a migrated thread and some comments may be shown as answers.

RichTextBox As Editor and Preview for DOCX (2007/2010)

1 Answer 147 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shrenik
Top achievements
Rank 1
Shrenik asked on 03 Aug 2011, 01:35 AM
Hi,

We are evaluating Rad RichTextBox for one of my project, where we want to use this control as DocX Bookmark editor and as merged document wanted to preview with this control on client side after processing of bookmark on server side. In my first test for this control, its not even able to render attached simple 1 page document. I have tried with local solution as well as online demo.

Also i am interested in knowing all known issue with this control and has any issue with Bookmarks? We may have 1000's of bookmark per document.

Thanks in advance for help,

Regards,
Shrenik

1 Answer, 1 is accepted

Sort by
0
Accepted
Iva Toteva
Telerik team
answered on 05 Aug 2011, 03:40 PM
Hi Shrenik,

I tested the import of the document you sent to us with the latest internal build and it was imported correctly. You can download a hotfix from the Internal Builds Downloads section in your account. The only problem still standing will be that the document contains fields that are not supported by RadRichTextBox. The fields 
supported currently are:
  • DateField - "DATE";
  • PageField - "PAGE"
  • MergeField - "MERGEFIELD"
  • IncludePictureField - "INCLUDEPICTURE"
You can add other type of fields by inheriting from CodeBasedField, implementing the required methods and registering the filed type in the following way:
CodeBasedFieldFactory.RegisterFieldType("SomeOtherField", () => { return new SomeOtherField(); });
 where SomeOtherField is the CodeBasedField you have implemented. 

As for the bookmarks question, I have tested the performance of 1000 Bookmarks in a document and it was acceptable. It cannot be helped that operating on larger documents adds a penalty, but since Bookmarks do not add any additional UI elements in order to be visualized, there should not be any issues. You can test that by inserting Bookmarks programmatically in a document in the following way:
private void Insert1000Bookmarks_Click(object sender, RoutedEventArgs e)
{
    for (int i = 0; i < 1000; i++)
    {
        this.InsertBookmark(i);
    }
}
 
private void InsertBookmark(int i)
{
    string bookmarkName = "Bookmark" + i;
    BookmarkRangeStart start = new BookmarkRangeStart();
    start.Name = bookmarkName;
    BookmarkRangeEnd end = new BookmarkRangeEnd();
    end.PairWithStart(start);
    this.editor.InsertInline(start);
    this.editor.InsertInline(new Span(bookmarkName));
    this.editor.InsertInline(end);
    this.editor.Insert(FormattingSymbolLayoutBox.ENTER);
}

Greetings,
Iva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
RichTextBox
Asked by
Shrenik
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or