Giter Site home page Giter Site logo

Image Issue about react-jupyter-viewer HOT 7 CLOSED

m1-key avatar m1-key commented on August 27, 2024
Image Issue

from react-jupyter-viewer.

Comments (7)

m1-key avatar m1-key commented on August 27, 2024 1

@shivbhosale Thanks a lot. This Jupyviewer is really awesome component.

from react-jupyter-viewer.

shvbsle avatar shvbsle commented on August 27, 2024
  1. Can you provide an example of how you are trying to upload an image?
  2. I'm using a third-party markdown-parser; react-markdown https://github.com/rexxars/react-markdown
    It currently doesnt support super-script or sub-script

from react-jupyter-viewer.

m1-key avatar m1-key commented on August 27, 2024
  1. Can you provide an example of how you are trying to upload an image?
  2. I'm using a third-party markdown-parser; react-markdown https://github.com/rexxars/react-markdown
    It currently doesnt support super-script or sub-script

@shivbhosale ![alt text](https://github.com/m1-key/Thug-Life/blob/master/mask.png "Logo Title Text 1")
I used this , but only no image is displayed. If I tried uploading the image locally same happened. I used <img src = "Location_Of_Image" alt = "Alternate text " >. But in each case I failed to upload the image.

from react-jupyter-viewer.

m1-key avatar m1-key commented on August 27, 2024

@shivbhosale reply ?

from react-jupyter-viewer.

shvbsle avatar shvbsle commented on August 27, 2024

@m1-key Apologies for late response!
I understand your confusion but the URL that you provided doesn't actually point to an image!
It points to a webpage.

Notice the difference:
wrong url
https://github.com/m1-key/Thug-Life/blob/master/mask.png

right url
https://raw.githubusercontent.com/m1-key/Thug-Life/master/mask.png

Wrong way

![alt text](https://github.com/m1-key/Thug-Life/blob/master/mask.png "Logo Title Text 1")

alt text

Right way

![alt text](https://raw.githubusercontent.com/m1-key/Thug-Life/master/mask.png "Logo Title Text 1")

alt text

I am able to render the image with the following code:

<JupViewer
          title="Jupyter as a Blog!"
          subtitle="I've always wanted to publish my jupyter notebooks as blogs. Finally I can."
          coverImg="https://raw.githubusercontent.com/m1-key/Thug-Life/master/mask.png"
          // file={ipynb}
          file="https://raw.githubusercontent.com/jakevdp/PythonDataScienceHandbook/master/notebooks/00.00-Preface.ipynb"
          // file="https://raw.githubusercontent.com/fastai/course-v3/master/nbs/dl1/00_notebook_tutorial.ipynb"
        />

Edit 1: In general, if you are sourcing any file from github, take care of the URLs. github hosts the actual raw data on domain:
https://raw.githubusercontent.com and not https://github.com

from react-jupyter-viewer.

m1-key avatar m1-key commented on August 27, 2024

@shivbhosale I met with an issue while passing dynamic ipynbs . i.e when user click on button A it loads notebook A, when user click on button B it loads notebook B. But I am unable to do so.
Here is the screeshot of the code :
Screenshot (158)

Here is the output :
Screenshot (157)

from react-jupyter-viewer.

shvbsle avatar shvbsle commented on August 27, 2024

@m1-key Hi Mithilesh. I'm sorry but, I'm seeing this just now. I dont get notified of a comment made on an issue that is already closed! Please consider opening a fresh issue else I wont be notified right away.

Currently the component does not support component-refresh on prop update. Let me try to add this feature over the weekend!

Edit:
https://join.slack.com/t/reactjupytern-0nc7370/shared_invite/zt-gacg79oi-NYk9coLNBUXiqtQ80ohMKg

Join this slack channel in case you need to reach out

from react-jupyter-viewer.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.