1. Have you installed the new JSF Mobile app? Check out all the details here.
    Dismiss Notice
  2. One account & one avatar for all of JSF. Unified login and profile. Forum alerts on the main site, and more. Check out the details here: Forum & main site unified account feature is live!
    Dismiss Notice

Tables

Discussion in 'Technical' started by M@, Feb 10, 2015.

  1. M@

    M@ Monster Maker 2017
    Platinum Member

    Joined:
    Jan 17, 2006
    Messages:
    14,736
    Media:
    1
    Albums:
    1
    Likes Received:
    44
    Is there any way to add table functionality to the editor? This post got me thinking about it and it would seem like a nice addition if it's out there and available. :confused:
     
  2. gazareth

    gazareth Senior Member

    Joined:
    Aug 1, 2006
    Messages:
    5,909
    Likes Received:
    10
  3. John Stone

    John Stone Every day is Leg Day
    Staff Member Owner

    Joined:
    Jan 20, 2004
    Messages:
    20,921
    Likes Received:
    74
    Done. :)

    Syntax is pretty simple. For example, the following code:

    Code:
    [noparse]
    [table="head;width=15em"]name|age|points
    Zen | 145 | 0
    Wh0| 2 | $
    M@ | 15| 10^34
    John | 104 | -10
    [/table]
    [/noparse]
    
    ...will generate this table:

    Column1Column2Column3
    nameagepoints
    Zen 145 0
    Wh0 2 $
    M@ 15 10^34
    John 104 -10


    Complete instructions below...

    Introduction to options:
    example:
    Column1
    The whole option list should be wrapped with quotes.
    Options are seperated by a semicolon
    If an option has a value it is assigned with "equal to" mark. (option2)
    If the value contains blanks or special characters it has to be wrapped with apostrophes. (option3)
    If an option has more than one value they are seperated by a comma. (option4)
    Description of options:
    head
    This option defines the first line as head, so the first row is shown as head of the table. If the table sould be sorted, the head is not sorted.
    sort=1d,2,3
    This defines the table to be sorted by column 1, then column 2, then column 3. The "d" after the first colum specifies the order: descending (default: ascending)
    autonum=1 (equal to autonum) autonum=a autonum=A
    Defines that a new first column containing a numbering should be inserted.
    1 -> 1, 2, 3, 4, ... , 999, 1000, ....
    a -> a, b, c, ... , aa, ab, ... , zz
    A -> A, B, C, ... , AA, BB, ... , ZZ
    autonumtitle=oneword autonumtitle='long value with spaces'
    Defines the title of the autonum-column. Can be left empty.
    width=123px width=45em width=67%
    Defines the width of the table.
    Introduction to special options (formating cells and rows):
    example: {option1=value1}{option2=value2}
    These "special" options can be written as the very first content of a cell to format it.
    Description of special options:
    {colsp=5}
    Defines a colspan from current cell with the length of 5 cells
     
  4. M@

    M@ Monster Maker 2017
    Platinum Member

    Joined:
    Jan 17, 2006
    Messages:
    14,736
    Media:
    1
    Albums:
    1
    Likes Received:
    44
    Awesome! Thanks John! (& gaz :o)














    PS: OMGZ10^34POINTS!!!111one :spaz:
     
  5. John Stone

    John Stone Every day is Leg Day
    Staff Member Owner

    Joined:
    Jan 20, 2004
    Messages:
    20,921
    Likes Received:
    74
    :thanks:

    whutevahwhutevah.gif
     
  6. phillydude

    phillydude Don't Never Give Up.

    Joined:
    May 23, 2005
    Messages:
    14,031
    Media:
    34
    Albums:
    1
    Likes Received:
    53
    The reps are strong with this one. :nod:

    [​IMG]
     

Share This Page