Skip to content

Reloading state from HTML with colors? #120

Description

@sontek

I added a color picker to my toolbar, had it change the color and stored it as HTML.

import draftToHtml from 'draftjs-to-html';
const html = draftToHtml(draftState);

Now I want to edit the content again so I use:

import {stateFromHTML} from 'draft-js-import-html';
stateFromHTML(html);

The HTML I have is:

<p>Given <span style="color: #2a00ff;"><strong>Name</strong></span></p>

after I load the HTML back in I no longer have the color.

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

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions