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

MFM to HTML support #138

Open
ThuHtooSan opened this issue Feb 7, 2024 · 4 comments
Open

MFM to HTML support #138

ThuHtooSan opened this issue Feb 7, 2024 · 4 comments

Comments

@ThuHtooSan
Copy link

Do you have a plan to support MFM to HTML direct parsing?
Currently, if I want to implement the MFM parser in my projects, I need to write my own encoder to convert the returned MFM tree to HTML.

I'm sorry to bother you but Discord link is dead and the forum no longer exists so...

@gabboman
Copy link

gabboman commented May 1, 2024

Hi with the package @opera7133/mfmp you can

import { toHtml } from '@opera7133/mfmp'
import * as mfm from 'mfm-js'

toHtml(mfm.parse(MFM_STRING_HERE))

@ThuHtooSan
Copy link
Author

@gabboman Thank you! I'll check it out.

@gabboman
Copy link

gabboman commented May 4, 2024

its a bit wonky. In wafrn I ended up disabling it. a lot of custom clasees, and broken links

@ThuHtooSan
Copy link
Author

Oh is it? When I checked (the code) earlier, it didn't look like it has custom classes though. But I do see some custom dataset attributes.
ig I have to find another one then :)

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

2 participants