×

Rich text handling for a web application

  • US 7,890,852 B2
  • Filed: 06/26/2003
  • Issued: 02/15/2011
  • Est. Priority Date: 06/26/2003
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method of representing and managing rich text for use by Web based applications and browsers as implemented in a machine, the method comprising the steps of:

  • providing one or more classes for use by the applications to at least create and manage one or more rich text nodes in a memory structure representation representative of rich text;

    representing the rich text in the memory structure representation; and

    editing the rich text in a document using the memory structure representation to perform editing functions on the document having the rich text as managed and created by the one or more classes, wherein the memory structure representation comprises;

    forming a table structure represented in memory as a set of special rich text node types including table node, table body node and table header node for defining table characteristics, wherein the table row node, heading cell node and row cell node correspond to types of hyper-text markup language (HTML) tags controlling table representation, whereineach type of node maintains a reference to the nodes it controls for a next level including the table row controlling a list of row cell nodes, and the table body node controlling a list of table row nodes,the header cell node and row cell node maintain lists of the rich text nodes, representing content of the rich text nodes and the rich text node contains an anchor point to another table node to start a new table at that point in the rich text thereby allowing for nested tables; and

    further comprising;

    providing a method to transform text from its memory format into string representations and vice versa, comprising;

    storing one of the rich text as a string in a relational database, formatting the string by converting the rich text into a HTML string for storage, converting the rich text into Extensible Mark-up Language (XML) and using a compressed format where various attributes of each rich text node are captured, along with the text value for that node, wherein creating rich text memory structure from HTML, comprises one of;

    parsing, by the rich text node, a well-formed segment of HTML and set its attributes accordingly, including creating other rich text nodes as needed as the HTML indicates a change in text attributes or presence of an image or link; and

    as a function in a rich text list, taking the HTML that is not well formed, and preprocesses the HTML to make it recognizable by the rich text nodes, wherein the rich text list also handles creating the nodes for the table structures included within the HTML;

    parsing the HTML by extracting tag information from a text attribute, then using the tag information to set other attributes in the rich text by calling a resolveTag method, wherein the resolveTag method comprises;

    reading text up to a first tag and if this is not a null string, cloning a current rich text node and making the clone a preceding node, and assigning to it all text before the first tag, then removing the text and calling the resolveTag method again, wherein the HTML is well formed for the cloning to work recursively, and the well formed HTML ensures that encountered tags are in proper order so that the text sent to the clone will not miss any tags;

    if the tag has a matching end tag, checking if there is any text beyond the end tag, and if there is, cloning the current rich text node, making the clone the following node, and assigning it the text after the end tag, then removing the text and calling the resolveTag method again;

    if the tag is an image or link tag, cloning the current rich text node and making the clone the following node, and assigning the following node the text after the tag;

    passing the tag information to resolve the tag and to set up tag attributes, wherein if there is an image or link tag, the attributes are stored in the text; and

    if preceding or following nodes are not null, call resolveTag making the preceding or following node the current node, which recursively propagates more rich text nodes to fully represent the rich text.

View all claims
  • 3 Assignments
Timeline View
Assignment View
    ×
    ×