yabwe / medium-editor

Medium.com WYSIWYG editor clone. Uses contenteditable API to implement a rich text solution.
https://yabwe.github.io/medium-editor/
Other
16.04k stars 1.86k forks source link

Typed medium-editor #1307

Closed cicada0014 closed 6 years ago

cicada0014 commented 7 years ago

Description

Hi, I am a rookie programer. I've just studied for 8 month.
I use Medium-editor in my project with Angular2/typescript. um, For Angular2/typescript Users, I wirte some information that I finded.

use '@types ' command.

npm install @types/medium-editor 2017-03-05 5 35 46 then, you'll use type of medium-editor.

when I tried to apply custom button, I see that. 2017-03-05 5 41 26

if you fix this, this problem is solved. /@types/medium-editor/index.d.ts : 97line buttons string[] type = > object[] type

2017-03-05 5 45 06

I always thanks for you guys. This issue is my first github issue in mylife. I just wanted to help you with some way.

Versions

paradite commented 7 years ago

Hi @cicada0014 I think you are spot on with what is wrong with the type definition. It should be object[] type.

However, the code with the issue is not in this repo, but at

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/354cec620daccfa0ad167ba046651fb5fef69e8a/types/medium-editor/index.d.ts

You can submit a PR or issue to that repo to fix this issue.

cicada0014 commented 6 years ago

Thanks, @paradite . I migrate this issue for that you commented. And I close this issue.