mfm.js icon indicating copy to clipboard operation
mfm.js copied to clipboard

Add embed link type

Open shibaobun opened this issue 2 years ago • 1 comments

Dependencies

This branch is based on the changes proposed in #126, since it adds some additional test cases testing modes + URL features like brackets. https://github.com/misskey-dev/mfm.js/pull/127/commits/936be7312076b8c3fff95d4c8f828be68ae6a9d3 shows changes after #126, so that might be easier to review. However, I can happily repush this branch without #126 improvements if needed!

What

  • Refactors silent boolean into a string for additional link modes
  • Adds additional embed type for embedding images, like ![alt text](https://link.com/image.jpg)

Why

  • Paving support for eventually embedding images with ![alt text](https://link.com/image.jpg) in Misskey
    • Discussed in https://github.com/misskey-dev/misskey/issues/6752
  • Making link type more extensible for more link types in the future

Additional info (optional)

I am very new to typescript, so please let me know if there's anything that can be changed for best practice! Thank you!

shibaobun avatar Oct 15 '22 18:10 shibaobun

@syuilo this one has also been freshly updated :smile:

shibaobun avatar Feb 05 '23 16:02 shibaobun