byyoungjin / blog_front

0 stars 0 forks source link

decorator 가 제대로 안들어가는 문제( Detail 화면에서 ) #8

Closed byyoungjin closed 4 years ago

byyoungjin commented 4 years ago

image

image

위와같이 edit 화면에서는 decorator 가 적용이 되는 데 detail 화면에서는 적용이 되지 않음

byyoungjin commented 4 years ago

왜인지 모르겠지만 detail page 에는 decorator 를 editorState 생성시에 넣어줘야한다. 왜 BasicEditor 에 설정되어있는건 먹히지 않는걸까

byyoungjin commented 4 years ago

왜 BasicEditor 에 설정되어있는건 먹히지 않는걸까 그리고 위처럼 설정할 경우, edit 모드에서는 아래와 같은 에러가 뜬다

image

byyoungjin commented 4 years ago

https://github.com/draft-js-plugins/draft-js-plugins/blob/master/HOW_TO_CREATE_A_PLUGIN.md plugin editor 에서는 decorator 가 적용되는 순서가 중요하다! 기존의 decorator 가 plugin의 뒤쪽 으로 밀리는걸까..? 그렇다기엔 edit 모드에서는 둘다 잘된다