Skip to content

Ideas for table support #402

Description

@gedion

Hello. My partner and I have come up with the following idea for table representation. However we are having difficulties with concurrent modifications(for special table properties like hitting tab key,row/cell highlighting) and are seeking your opinions.

The table is represented using a json string like below.

var myJSONString = '{"payload":[["Company","Contact","Country"],["Alfreds Futterkiste","Maria Anders","Germany"],["Berglunds snabbkop","Christina Berglund","Sweden"],["Centro comercial Moctezuma","Francisco Chang","Mexico"],["Ernst Handel","Roland Mendel","Austria"],["Island Trading","Helen Bennett","UK"],["Koniglich Essen","Philip Cramer","Germany"],["Laughing Bacchus Winecellars","Yoshi Tannamuri","Canada"]],"tblId":1,"tblClass":"data-tables","trClass":"alst","tdClass":"hide-el","importTbl":"importTbl","cellAttr":[],"tblProperties":{"cellAttrs":[],"width":"","rowAttrs":{},"colAttrs":[]}}';

in domline.js/domlilne_client.js this string object is processed and rendered as shown below.

eplite Table

We then use css to hide the unnecessary columns.

Most of our additions in ace2_inner.js and domline.js/domline_client.js are straightforward and harmless.

Here are a minimal change one can do to make this work.

/*in linestylefilter.js/linestylefilter_client.js, the function attribsToClasses, needs to avoid the creation of span within tables when multiple users are modifying 
*/
var spanSize;
        if(txt.indexOf('data-tables')!=-1){
            spanSize = leftInAuthor = txt.length;        
        }
        else{
            spanSize = txt.length;
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions