Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrong custom renderer type definition #1640

Merged
merged 3 commits into from
Jul 6, 2021

Conversation

js87zz
Copy link
Contributor

@js87zz js87zz commented Jul 6, 2021

Please check if the PR fulfills these requirements

  • It's the right issue type on the title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has a description of the breaking change

Description

  • fixed wrong custom renderer option type definition
    • added union type for htmlBlock, htmlInline type
    export type HTMLMdNodeConvertor = (
      node: HTMLMdNode,
      context: MdContext,
      convertors?: HTMLConvertorMap
    ) => HTMLToken | HTMLToken[] | null;
    
    export type HTMLMdNodeConvertorMap = Record<string, HTMLMdNodeConvertor>;
    
    export type CustomHTMLRenderer = Partial<Record<string, HTMLConvertor | HTMLMdNodeConvertorMap>>;
    
    export interface EditorrOptions {
      // ...
      customHTMLRenderer?: CustomHTMLRenderer;
    }

Thank you for your contribution to TOAST UI product. 🎉 😘 ✨

@js87zz js87zz force-pushed the fix/custom-renderer-type-def branch from 683fad1 to 2ca4e16 Compare July 6, 2021 02:19
Copy link

@adhrinae adhrinae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 완료합니다.

Copy link
Contributor

@lja1018 lja1018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰완료합니다.

Copy link
Contributor

@jwlee1108 jwlee1108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 완료합니다.

@js87zz js87zz force-pushed the fix/custom-renderer-type-def branch from 2ca4e16 to f56f9eb Compare July 6, 2021 06:56
@js87zz js87zz merged commit 4c47c90 into master Jul 6, 2021
@js87zz js87zz deleted the fix/custom-renderer-type-def branch July 6, 2021 06:57
ahamelers pushed a commit to ahamelers/tui.editor that referenced this pull request Aug 21, 2023
* chore: change custom renderer type def for toastmark

* chore: change custom renderer option type for editor

* fix: apply changed type to plugin, editor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants