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

Support todo markup with custom control. #23

Open
martindufort opened this issue Jun 1, 2023 · 4 comments
Open

Support todo markup with custom control. #23

martindufort opened this issue Jun 1, 2023 · 4 comments

Comments

@martindufort
Copy link

In Markdown, the syntax - [ ] allows you to create todo lists.

How difficult would it be to implement this syntax but with a custom renderer displaying a checkbox.

@qeude
Copy link
Owner

qeude commented Jun 1, 2023

I don't think it would be feasible right know, I've been using attributed text to render markdown styled text, it would be hard to include checkbox to it. 😔

@martindufort
Copy link
Author

martindufort commented Jun 1, 2023

After reviewing how you do things, I was thinking of using an 'NSTextAttachment' for a certain range of characters within the attributedString. And thus replace the - [ ] with a checkbox image.

Here's the Apple doc about it: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/TextAttachments/Tasks/AddingAttachments.html

On a scale of 0-5, how easy would it be to implement that? I'm might give it a go and produce a PR.

@qeude
Copy link
Owner

qeude commented Jun 2, 2023

Hard to tell to be honest, but would be glad to review and accept your PR if you do so 💪

@buditanrim
Copy link

Hi, any updates on this?

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

No branches or pull requests

3 participants