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

Option to define an image prefix is added #42

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

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