Giter Site home page Giter Site logo

Comments (5)

YousefED avatar YousefED commented on August 16, 2024

Hi @doorkey, thanks for reporting this!

Could you share the json of the blocks that you're trying to load?

from blocknote.

doorkey avatar doorkey commented on August 16, 2024

Hi @doorkey, thanks for reporting this!

Could you share the json of the blocks that you're trying to load?

[
    {
        "id": "588f083d-c190-477b-8d63-dc5f63019840",
        "type": "heading",
        "props": {
            "textColor": "default",
            "backgroundColor": "default",
            "textAlignment": "left",
            "level": 2
        },
        "content": [
            {
                "type": "text",
                "text": "This is a test doc"
            }
        ],
        "children": []
    },
    {
        "id": "1bb7080a-0975-4c13-8d96-a71ca52a1ec6",
        "type": "paragraph",
        "props": {
            "textColor": "default",
            "backgroundColor": "default",
            "textAlignment": "left"
        },
        "content": [
            {
                "type": "text",
                "text": "Nice"
            },
            {
                "type": "text",
                "text": " job",
                "styles": {
                    "italic": true
                }
            }
        ],
        "children": []
    },
    {
        "id": "368781c7-7bab-4734-a629-ff9f70f581c9",
        "type": "paragraph",
        "props": {
            "textColor": "default",
            "backgroundColor": "default",
            "textAlignment": "left"
        },
        "content": [],
        "children": []
    },
    {
        "id": "cae662cf-3d54-40fa-ad58-31fa8f70a2d2",
        "type": "paragraph",
        "props": {
            "textColor": "default",
            "backgroundColor": "default",
            "textAlignment": "left"
        },
        "content": [],
        "children": []
    }
]

from blocknote.

doorkey avatar doorkey commented on August 16, 2024

@YousefED please check above and let me know if you need anything else.

from blocknote.

YousefED avatar YousefED commented on August 16, 2024

Thanks. Both these items:

"content": [
            {
                "type": "text",
                "text": "This is a test doc"
            }
        ],

and

"content": [
            {
                "type": "text",
                "text": "Nice"
            },

I'm missing a styles key. Normally, I'd expect this:

"content": [
            {
                "type": "text",
                "text": "Nice",
"styles": {}
            },

When you access editor.document, it should always contain this empty styles object. Do you know where you are losing this information?

from blocknote.

doorkey avatar doorkey commented on August 16, 2024

@YousefED thanks, we will change our modal and try it. Appreciate.

from blocknote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.