Skip to content

Saving data with php backend #1830

@Swapnilchavan18

Description

@Swapnilchavan18

Hi, I have searched over google, but don't find the correct way to save editorjs output, when we try to save with json there are lot of issues with slashes, JSON decode will not work and will basically remove content with double quotes(after using stripslashes and html_entity_decode) like href, any classes, attributes, etc

What is the best way to save the data that we can also process at PHP backend. Thanks in advance.

{
            "id" : "xEhA7tB3HH",
            "type" : "paragraph",
            "data" : {
                "text" : "There are dozens of <a href=\"https://github.com/editor-js\">ready-to-use Blocks</a> and the <a href=\"https://editorjs.io/creating-a-block-tool\">simple API</a> for creation any Block you need. For example, you can implement Blocks for Tweets, Instagram posts, surveys and polls, CTA-buttons and even games."
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions