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

down.toAttributedString() custom text font and image size #33

Closed
atom2ueki opened this issue Jun 16, 2017 · 1 comment
Closed

down.toAttributedString() custom text font and image size #33

atom2ueki opened this issue Jun 16, 2017 · 1 comment

Comments

@atom2ueki
Copy link

atom2ueki commented Jun 16, 2017

due to different size of devices, can't just give a fixed size to image in markdown, is there a way to custom text font and image size after it been converted to NSAttributedString, or is there a markdown standard to make this happens?

  • markdown sample
this is a sample text and image
![](https://s3.atom2ueki.com/images/app_s_3.jpg)
  • code sample
...
let output:NSAttributedString = try! down.toAttributedString()
DispatchQueue.main.async {
    self.uitextview.attributedText = output
}
...

thanks!

@iwasrobbed
Copy link
Collaborator

These questions are specific to styling NSAttributedString so you'd have better luck asking someplace like StackOverflow since Down is only responsible for conversion.

Once it's in one of the many output formats Down supports, they can all be styled differently.

Repository owner locked and limited conversation to collaborators Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants