Skip to content

Conversation

@acelyavul
Copy link

Hello,

I was unable to display images because of they are saved with their file names in database. I am sending for your review.

@andangrd
Copy link
Owner

andangrd commented Jun 10, 2022

nice @acelyavul , thank you for trying to contributing to this repo,
but It would be great if you could also attach some screenshots of the testing result, as well as how to use it in Readme.md.

@acelyavul
Copy link
Author

Hello @andangrd, I updated readme and created this example project with a screenshot, could you please tell me how can i make a screenshot test ?

Readme is updated

Option to define an image prefix is added

Readme is updated

Option to define an image prefix is added

Readme is updated

Reverted changes due to format on readme

Reverted changes due to format on readme
@andangrd
Copy link
Owner

andangrd commented Jul 9, 2022

yeah, like proof of concept, the problem you would like to solve,
screenshot of before and after your fix is implemented

however, looking at your code here
is it possible to add an image host URL like below?

const imgHost = `http://some.hostname.url/assets`
const text = `
 # This is an example for adding picture with prefix:
 ![rn_package](`.+.imgHost + `/uploads/0a3a66e439661bc47cd3ff6619047dcf/rn_package.png)
 `;

I haven't tried it yet, tho, just wondering if we could do that, the new prop is no longer needed.

@acelyavul
Copy link
Author

Hi @andangrd,
sorry for being late, if I add as you mentioned, it definitely works.
I am getting lots of markdown files from database to display on the screen, some of them have images, others don't, I have to determine if they contain first then find a way to implement a prefix. I thought it would be easier.

in case you may want to consider, i am attaching before&after screenshots, thanks for the explanation.
before
after

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

Successfully merging this pull request may close these issues.

2 participants