marmelab / aor-rich-text-input

<RichTextInput> component for admin-on-rest, useful for editing HTML code in admin GUIs
MIT License
23 stars 25 forks source link

Editor is not rendered #12

Open mamoot64 opened 6 years ago

mamoot64 commented 6 years ago

Hi,

I encountered a problem with this Component.

I use the RichTextInput with HydraAdmin from "Les Tilleuls".

The code below throw an error :

 <RichTextInput {...props} source="description" addLabel={true} />
uncaught at handleFetch TypeError: Cannot read property 'value' of undefined
    at RichTextInput.componentDidMount 

If a add the input props with arbitrary value, it's working.

 <RichTextInput {...props} source="description" addLabel={true} input={{"value":"<b>Test</b>"}} />

I'm really lost ! Thank's for your help.

Nico (Noob on ReactJS)

djhi commented 6 years ago

If you are able to illustrate the bug or feature request with an example, please provide a sample application via one of the following means:

mamoot64 commented 6 years ago

Hi @djhi ,

The bug is present on the sandbox. RichTextInput is not rendered on edit Blog Post. On create, RichTextInput is not defined.

It's hard to give you a sample application because HydraAdmin is based on ApiPlatform docs.jsonld (Hydra).

I have write a ticket on Hydra Admin with sample code here.

Thank's for your time.

Nicoals