Giter Club home page Giter Club logo

Comments (11)

remarkablemark avatar remarkablemark commented on May 27, 2024

@Iven2132 can you use scale?

from html-react-parser.

Iven2132 avatar Iven2132 commented on May 27, 2024

@remarkablemark Hi, Not working

import React, { useState, useEffect } from 'react';
import parse from 'html-react-parser';

function ResizableHTMLContent() {
  const [htmlContent, setHtmlContent] = useState('');

  useEffect(() => {
    fetch('/file.txt') 
      .then(response => response.text())
      .then(html => {
        setHtmlContent(html);
      })
      .catch(error => {
        console.error('Error fetching HTML content:', error);
      });
  }, []);

  return (
    <div>
      <h1>HTML Content</h1>
      <div style={{ scale: 1 }}>
        {parse(htmlContent)}
      </div>
    </div>
  );
}

export default ResizableHTMLContent;

from html-react-parser.

remarkablemark avatar remarkablemark commented on May 27, 2024

If you want it smaller, you need to use a scale smaller than 1 (e.g., 0.7)

Also, this question fits more at Stackoverflow than here since this is a styling question and not an html-react-parser question, so I'll be closing this issue

from html-react-parser.

Iven2132 avatar Iven2132 commented on May 27, 2024

@remarkablemark I set it to 0.5 and also 0.7 it's not changing its size, please helpπŸ™

from html-react-parser.

Iven2132 avatar Iven2132 commented on May 27, 2024

@remarkablemark Hi, I still couldn't figure out the problem I posted on Stackoverflow no one replied can you please help me, Mark?

from html-react-parser.

remarkablemark avatar remarkablemark commented on May 27, 2024

Can you share a CodeSandbox or JSFiddle of your issue?

from html-react-parser.

Iven2132 avatar Iven2132 commented on May 27, 2024

@remarkablemark Yes, sure here is the CodeSandBox

from html-react-parser.

remarkablemark avatar remarkablemark commented on May 27, 2024

It says Sandbox not found:

Screen Shot 2024-02-01 at 1 28 01 PM

Did you fork and save the sandbox?

from html-react-parser.

Iven2132 avatar Iven2132 commented on May 27, 2024

@remarkablemark Sorry to hear that I made it public now https://codesandbox.io/p/devbox/w9n5ny?file=%2Fsrc%2FApp.jsx%3A9%2C14&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522cls3k4c8u0009336jdsa5lpyv%2522%252C%2522sizes%2522%253A%255B70%252C30%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522cls3k4c8r0003336jmqfwi7h9%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522cls3k4c8s0006336jjx8nn9ki%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522cls3k4c8t0008336jec1ohvzs%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522cls3k4c8r0003336jmqfwi7h9%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cls3k4c8r0002336jv2kyckfe%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A9%252C%2522startColumn%2522%253A14%252C%2522endLineNumber%2522%253A9%252C%2522endColumn%2522%253A14%257D%255D%252C%2522filepath%2522%253A%2522%252Fsrc%252FApp.jsx%2522%257D%255D%252C%2522id%2522%253A%2522cls3k4c8r0003336jmqfwi7h9%2522%252C%2522activeTabId%2522%253A%2522cls3k4c8r0002336jv2kyckfe%2522%257D%252C%2522cls3k4c8t0008336jec1ohvzs%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cls3k4c8t0007336j75evqk9i%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_PORT%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522port%2522%253A5173%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522id%2522%253A%2522cls3k4c8t0008336jec1ohvzs%2522%252C%2522activeTabId%2522%253A%2522cls3k4c8t0007336j75evqk9i%2522%257D%252C%2522cls3k4c8s0006336jjx8nn9ki%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cls3k4c8s0004336jezag6wkf%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%257D%252C%257B%2522id%2522%253A%2522cls3k4c8s0005336jboqxzitu%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TERMINAL%2522%252C%2522shellId%2522%253A%2522cls3hs8v0000ldlh06nkidog2%2522%257D%255D%252C%2522id%2522%253A%2522cls3k4c8s0006336jjx8nn9ki%2522%252C%2522activeTabId%2522%253A%2522cls3k4c8s0004336jezag6wkf%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

from html-react-parser.

Iven2132 avatar Iven2132 commented on May 27, 2024

@remarkablemark Any idea how to fix it?

from html-react-parser.

Iven2132 avatar Iven2132 commented on May 27, 2024

@remarkablemark Hi Mark, Do you need my code Github repo?

from html-react-parser.

Related Issues (20)

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.