Skip to content

Static Content

.article

Status: Release Candidate v1

An article bit contains static content: Text in plain, bitmark-- or bitmark++ format.

An article must never be used as a quiz. If you need a very simple "quiz", that consists of some instructions only, please see assignment.

bitmark

[.article:bitmark++]

**Some bold text,**
followed by some plain text.

|image:https://cdn.bitmark.cloud/cat.jpg|

Some more text.

bitmark JSON

{
    "markup": "[.article:bitmark++]\n**Some bold text,**\nfollowed by some plain text.\n\|:image:https://cdn.bitmark.cloud/cat.jpg|\n\n\nSome more text.\n",
    "bit": {
        "type": "article",
        "format": "bitmark++",
        "body": [
            {
                "type": "paragraph",
                "content": [
                    {
                        "marks": [
                            {
                                "type": "bold"
                            }
                        ],
                        "text": "Some bold text,",
                        "type": "text"
                    },
                    {
                        "text": "\n",
                        "type": "text"
                    },
                    {
                        "text": "followed by some plain text.",
                        "type": "text"
                    }
                ],
                "attrs": {
                    "section": ""
                }
            },
            {
                "type": "image",
                "attrs": {
                    "textAlign": "left",
                    "src": "https://cdn.bitmark.cloud/cat.jpg",
                    "alt": null,
                    "title": null,
                    "class": "center",
                    "section": ""
                }
            },
            {
                "type": "paragraph",
                "content": [
                    {
                        "text": "Some more text.",
                        "type": "text"
                    }
                ],
                "attrs": {
                    "section": ""
                }
            }
        ],
    },
    ...
}

article

The content of an article is per default plain text.

.message

Status: Release Candidate v1

A message bit typically represents a message as used in messenger apps like WhatsApp or Get More Brain. These platforms keep messages simple by often allowing only one resource (like one picture, one link with preview, ...). However, more than one link is usually supported within the text of the message, but only the first one is specially handled like previewed with picture, description, ... This is the link that we handle as a bit resource.

All supported resource types you will find here

For more complex messages, we plan to release message bits which will support several resources of the same type .message-pictures

An message bit contains static content. Text in plain, bitmark-- or bitmark++ format.

[.message] Have a look at this cute cat! 😻

bitmark JSON

{
    "markup": "[.message] Have a look at this cute cat! 😻",
    "bit": {
        "type": "message",
        "format": "text",
        "body": [
            {
                "text": "Have a look at this cute cat! 😻",
                "type": "text"
            }
        ]
    },
    ...
}

bitmark of a .message in bitmark-- text format

[.message:bitmark--] Have a look at this **cute** cat! 😻

"Cute" is marked as important which is often displayed as bold.

bitmark of a .message with an image resource

[.message&image]
[&image:https://cdn.bitmark.cloud/cat.jpg]
Have a look at this cute cat! 😻

bitmark JSON

{
    "markup": "[.message&image]\n[&image:https://cdn.bitmark.cloud/cat.jpg]\nHave a look at this cute cat! 😻",
    "bit": {
        "type": "message",
        "format": "text",
        "body": [
            {
                "text": "Have a look at this cute cat! 😻",
                "type": "text"
            }
        ],
        "resource": {
            "type": "image",
            "image": {
                "src":"https://cdn.bitmark.cloud/images/g67687687.jpg",
                "src1x":"https://cdn.bitmark.cloud/images/g67687687@1x.jpg",
                "src2x":"https://cdn.bitmark.cloud/images/g67687687@2x.jpg",
                "src3x": null,
                "showInIndex": false,
                "format": "jpg",
                "width": 200,
                "height": 115,
                "alt": [],
                "caption": [],
                "license": [],
                "copyright": "user upload"
            },
            "private": {
            }
        }
    },
    ...
}

Read about the private property here.

.message with a link

[.message&website] Have a look at https://www.apple.com

bitmark JSON

{
    "markup": "Have a look at https://www.apple.com",
    "bit": {
        "type": "message",
        "format": "text",
        "body": [
            {
                "text": "Have a look at ",
                "type": "text"
            },
            {
                "marks": [
                {
                    "type": "link",
                    "attrs": {
                    "href": "https://www.apple.com",
                    "target": "_blank"
                    }
                }
                ],
                "text": "www.apple.com",
                "type": "text"
            }
        ],
        "resource": {
            "type": "website-link",

            "website-link": {
                "siteName": "Apple",
                "url":"https://www.apple.com/"
            }
        }
    },
    ...
}

.chat, .conversation

Status: Draft

Describes a "recorded" chat in a messenger app or a real world oral conversation between two parties.

If no conversation initiator or partner name is defined, the current app user is used (his avatar and name is used from the plattform that is displaying this bit).

chat and conversation bits are, besides their difference in their application, identical.

bitmark

[.chat]
===
[#Emilie]
[&image:https://cdn.bitmark.cloud/avatars/cat_70x70@3.jpg]
===
[#John Done]
===
Hi John
--
How are you today?
===
I am fine, thanks. How are you, Emilie?
===
I just wanted to let you know ...
===
Thanks!
--
cu
===
{
    "markup": "[.chat]\n===\n[#Emilie]\n[&image:https://cdn.bitmark.cloud/avatars/cat_70x70@3.jpg]\n===\n[#John]\n===\nHi John\n--\nHow are you today?\n===\nI am fine, thanks. How are you, Emilie?...",
    "bit": {
        "type": "chat",
        "format": "text",
        "item": [],
        "instruction": [],
        "hint": [],
        "initiator": {
            "name": "Emilie",
            "avatarImage":  {
                "width": 70,
                "height": 70,
                "src":"https://cdn.bitmark.cloud/avatars/cat_70x70@3.jpg",
                "src1x":"https://cdn.bitmark.cloud/avatars/cat_70x70@1x.jpg",
                "src2x":"https://cdn.bitmark.cloud/avatars/cat_70x70@2x.jpg",
                "src3x":"https://cdn.bitmark.cloud/avatars/cat_70x70@3x.jpg",
                "alt": "E"
            },
        },
        "partner": {
            "name": "John Done",
            "avatarImage": { "alt": "JD" },
        },
        "chat": [
            { "name": "Emilie", "alt": "E", "text": "Hi John", "initiator": true},
            { "name": "Emilie", "alt": "E", "text": "How are you today?", "initiator": true},
            { "name": "John Done", "alt": "JD", "text": "I am fine, thanks. How are you, Emilie?", "initiator": false},
            { "name": "Emilie", "alt": "E", "text": "I just wanted to let you know ...", "initiator": true},
            { "name": "Emilie", "alt": "E", "text": "Thanks!", "initiator": true},
            { "name": "Emilie", "alt": "E", "text": "cu", "initiator": true}
        ],
    ...
}