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

Feature Request: Message formatting (Markdown, or otherwise) #310

Open
NiNiyas opened this issue Jun 4, 2022 · 21 comments
Open

Feature Request: Message formatting (Markdown, or otherwise) #310

NiNiyas opened this issue Jun 4, 2022 · 21 comments
Assignees
Labels
android-app ntfy Android app enhancement New feature or request in-progress 🏃 I'm working on this right now

Comments

@NiNiyas
Copy link

NiNiyas commented Jun 4, 2022

The ability to format messages. Like bold, italics and so on. Here for example is the discord formatting guide.

@binwiederhier
Copy link
Owner

Bravo for being the first 🥇 to actually open a ticket for this. About 50 people have asked, but nobody created a ticket. ;-)

@binwiederhier binwiederhier added enhancement New feature or request android-app ntfy Android app labels Jun 4, 2022
@binwiederhier binwiederhier changed the title Feature Request: Message formatting Feature Request: Message formatting (Markdown, or otherwise) Nov 9, 2022
@MichelMichels
Copy link
Contributor

Does this mean ntfy does not atm support any formatting in the body?

@binwiederhier
Copy link
Owner

Correct

@MichelMichels
Copy link
Contributor

What would be the realistic steps to implement such an idea? I don't have any experience with Go, but am proficient in C#. I could try to set something up to help with the development of this feature.

@binwiederhier
Copy link
Owner

This would be 90% Android, 10% server; probably just pulling in a markdown library in Android, and then somehow carrying the "content-type" through the message to the client; could potentially even use the "encoding" field for that.

@binwiederhier binwiederhier added the in-progress 🏃 I'm working on this right now label May 23, 2023
@binwiederhier binwiederhier pinned this issue May 23, 2023
@binwiederhier
Copy link
Owner

I'm working on this now. I will be using the markwon library even though it has not been updated in 2 years 😬

image

Design proposal

Right now, I'm thinking:

  • Add a content_type field to the message, which is text/plain by default, and can now also be text/markdown.
  • The content type can be passed via the Content-Type: text/markdown header, or via X-Markdown: yes or Markdown: yes or md: yes
  • The Android app by default will allow parsing markdown, but will have an option to disable embedding of external images:
    • [ ] Allow embedding markdown images
    • [x] Do not allow embedding markdown images

Thoughts? @wunter8 maybe. 😬

@wunter8
Copy link
Contributor

wunter8 commented May 23, 2023

Looks good to me!

I am surprised this is being added to Android before the web app, but it'll be very nice to have!

@wunter8
Copy link
Contributor

wunter8 commented May 23, 2023

The Android app by default will allow parsing markdown, but will have an option to disable embedding of external images:

Will you be able to disable parsing markdown entirely? Or just disable automatic download of images in markdown? Will this be per subscription?

@binwiederhier
Copy link
Owner

Will you be able to disable parsing markdown entirely? Or just disable automatic download of images in markdown? Will this be per subscription?

Might as well also allow disabling it entirely. And yes, probably global and per-subscription, just like the other options.

@binwiederhier binwiederhier self-assigned this May 24, 2023
@binwiederhier
Copy link
Owner

@nimbleghost I know you're looking for your next challenge: Wanna do this one, the web app side? 😬 I have started the Android side a while back, before you came along and side-tracked me hard hehe.

There is a markdown branch (with minimal changes so far), but no changes in the web app, or any persistence in the message cache.

@binwiederhier
Copy link
Owner

Thanks to @nihalgonsalves's work the server and web app side of Markdown support is now merged to main. The ticket will remain open for the Android portion of it.

@Kariton
Copy link

Kariton commented Jul 21, 2023

Hey,

love the project and its progress!
But for me the markdown does not work on any instance (public / selfhosted).

Should it already be available?

curl -d "Look ma, **bold text**, *italics*, ..." -H "Markdown: yes" ntfy.sh/rAU8FLX2R9NiXZRf

In case it matters: I use Brave, a chromium based browser.
Version 1.56.11 Chromium: 115.0.5790.102 (Official Build) (64-bit)

@binwiederhier
Copy link
Owner

It's not released yet.

@Kariton
Copy link

Kariton commented Jul 22, 2023

Thank you for confirming.

I was not sure because its documented but the issue is still open.

Love what you have created!
Its impressive.

@Kariton
Copy link

Kariton commented Aug 18, 2023

Markdown is now obviously live!
Looks and works great! 😍

(and also does the embedded picture!)

LOVE IT!

EDIT: at least on the web interface. 😃

@fuse314
Copy link

fuse314 commented Jan 17, 2024

Are there any plans to implement this in the Android app as well?
I spent 2 hours figuring out why markdown formatting did not work for me, until I found this issue :(

@wunter8
Copy link
Contributor

wunter8 commented Jan 17, 2024

Plans? Yes. I believe there is a work-on-progress branch that was started even. Timeline for estimated completion? Not yet

@tolap22
Copy link

tolap22 commented Jun 4, 2024

there any plans to implement this in the Android app as well?
I spent 2 hours figuring out why markdown formatting did not work for me, until I found this issue :(

seems the Android app does not yet support Markdown...

@mpeter50
Copy link

I have recently stumbled upon the Markdown functionality, and I already started using it for viewing in the webapp.
However I noticed that it does not support tables. The syntax doc page you refer to in your docs does not mention the common table syntax either.

Could we please also have table support?
I wanted to use it to display key-value pairs which are coming from a structured logging system of a tool I have been making.

@iwa
Copy link

iwa commented Aug 29, 2024

is there any plan to support markdown in the ios app by any chance?

@wunter8
Copy link
Contributor

wunter8 commented Aug 29, 2024

is there any plan to support markdown in the ios app by any chance?

We'd like to add it to iOS, but I wouldn't expect it anytime soon. We don't have any iOS devs right now, so progress is extremely slow.

However, the PWA on iOS already supports Markdown, so that's probably your best option in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android-app ntfy Android app enhancement New feature or request in-progress 🏃 I'm working on this right now
Projects
None yet
Development

No branches or pull requests

9 participants