michelson / dante2

A complete rewrite of dante editor in draft-js
https://michelson.github.io/dante2/
Other
912 stars 121 forks source link

save_handler not work after insert image #178

Open huy23121994 opened 5 years ago

huy23121994 commented 5 years ago

Hi, I have some issue need to hepl.

Issue 1: I want to custom save with save_handler, it work well until I insert an image, and then, the callback does not work anymore.

Issue 2: After inserting first image, I cannot update second image unless I click insert image again and cancel choosing file screen of Windows

    let saveHandler = (editorContext, content) => {
        console.log(editorContext, content)
        if (props.onChange) {
            props.onChange(content)
        }
    }

    return (
        <Dante
            data_storage={{
                save_handler: saveHandler,
                url: 'null'
            }}
            content={props.initContent ? props.initContent : false}
            read_only={props.read_only ? true : false}

        />
    );

Anyone can help me?

michelson commented 5 years ago

Hi , which version of Dante2 are you using ?

huy23121994 commented 5 years ago

Hi , which version of Dante2 are you using ?

I using v0.5.0-rc9

michelson commented 5 years ago

Plase update package to the next latest. 0.5.0-rc21

Please tell us if that works

Best

El jue., 3 de octubre de 2019 5:18 p. m., Trần Bảo Huy < notifications@github.com> escribió:

Hi , which version of Dante2 are you using ?

I using v0.5.0-rc9

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/michelson/dante2/issues/178?email_source=notifications&email_token=AAAC5SGHD3T2CYGQBRBWSMLQMZHRLA5CNFSM4I36OPA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAJOZQI#issuecomment-538111169, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAC5SHTPNQPSO2KEOY4HULQMZHRLANCNFSM4I36OPAQ .

huy23121994 commented 5 years ago

Plase update package to the next latest. 0.5.0-rc21 Please tell us if that works Best El jue., 3 de octubre de 2019 5:18 p. m., Trần Bảo Huy < notifications@github.com> escribió: Hi , which version of Dante2 are you using ? I using v0.5.0-rc9 — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#178?email_source=notifications&email_token=AAAC5SGHD3T2CYGQBRBWSMLQMZHRLA5CNFSM4I36OPA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAJOZQI#issuecomment-538111169>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAC5SHTPNQPSO2KEOY4HULQMZHRLANCNFSM4I36OPAQ .

Thanks, It's worked! But I have to install @emotion/core, @emotion/styled, emotion-theming to run this version, they should be auto install