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

Add triple colon support ::: for the CalloutExtension #793

Closed
2 of 4 tasks
ifiokjr opened this issue Nov 19, 2020 · 1 comment · Fixed by #706
Closed
2 of 4 tasks

Add triple colon support ::: for the CalloutExtension #793

ifiokjr opened this issue Nov 19, 2020 · 1 comment · Fixed by #706
Assignees
Milestone

Comments

@ifiokjr
Copy link
Member

ifiokjr commented Nov 19, 2020

Description

  • Add support for typing ::: to create a default CalloutExtension.
  • Add support for typing :::success to create a named CalloutExtension with the class info.
  • Add support for restricting the types of callouts that can be created.
  • Add support for icons to the callout extension.

Context

The code would look very similar to the code used for the CodeBlockExtension for pressing the enter key after typing the :::. An input rule could also be used to handle pressing the space key as seen in the same code block extension.

nodeInputRule({
regexp,
type: this.type,
beforeDispatch: ({ tr, start }) => {
const $pos = tr.doc.resolve(start);
tr.setSelection(new TextSelection($pos));
},
getAttributes: getAttributes,
}),

@ifiokjr ifiokjr added this to the Beta milestone Nov 19, 2020
@ifiokjr ifiokjr added this to To do in remirror@1.0.0 via automation Jan 13, 2021
@ifiokjr ifiokjr moved this from To do to Ready in remirror@1.0.0 Jan 13, 2021
@ifiokjr ifiokjr self-assigned this Jan 14, 2021
@ifiokjr
Copy link
Member Author

ifiokjr commented Jan 14, 2021

Kinda done, in the beta.

@ocavue ocavue closed this as completed May 26, 2021
remirror@1.0.0 automation moved this from Ready to Done May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants