Comments (12)
@saraOrkide unfortunately there is nothing I can do on my side since this is a React bug. See reproduced demo
My recommendation is to stick with dangerouslySetInnerHTML
from html-react-parser.
@saraOrkide can you provide a reproducible example using CodeSandbox JavaScript or CodeSandbox TypeScript?
from html-react-parser.
@saraOrkide can you provide a reproducible example using CodeSandbox JavaScript or CodeSandbox TypeScript?
https://codesandbox.io/s/940pov1l4w?file=/src/index.js
from html-react-parser.
@saraOrkide I don't see your changes. Can you fork and save a new CodeSandbox?
from html-react-parser.
@saraOrkide I don't see your changes. Can you fork and save a new CodeSandbox?
Oh sorry, forgot to save
see now
from html-react-parser.
@saraOrkide can you share the new link that was created after save?
from html-react-parser.
@saraOrkide can you share the new link that was created after save?
https://codesandbox.io/s/laughing-dhawan-sq5p28?file=/src/index.js
from html-react-parser.
I reproduced your issue and it's caused by the open
prop being converted to a boolean value:
I think the fix will need to be done in https://github.com/remarkablemark/react-dom-core/tree/master/packages/react-property
Actually this is a React bug, I can reproduce in https://codesandbox.io/s/html-react-parser-1080-23nhj2
from html-react-parser.
Ok, I know, why does it convert it to boolean?
How can I solve the problem?
with react-property?!!
Can you please tell me with the sample code that I sent
from html-react-parser.
My recommendation is to stick with
dangerouslySetInnerHTML
My problem is that I want to replace a tag, so I wanted to use html-react-parser
from html-react-parser.
You can use dangerouslySetInnerHTML
with html-react-parser
from html-react-parser.
You can use
dangerouslySetInnerHTML
withhtml-react-parser
Can you tell me how?
from html-react-parser.
Related Issues (20)
- Failed to parse source map from file HOT 1
- Vercel Edge not Supported HOT 2
- Type errors with v5.0.0 HOT 4
- version 5.0.1 cannot work with vite HOT 10
- Upgrading to latest version 5.0.3 throws compiling error: Can't reexport the named export 'Comment' from non EcmaScript module (only default export is available) HOT 8
- Nothing is parsed after an iframe HOT 2
- attributesToProps converts attribute with key name "open" always to value `true` HOT 2
- Warning with nextjs use - Extra attributes from the server HOT 3
- If the htmlString is dynamic and contains custom components (with hooks used), an error will be hanpend HOT 1
- missing type for domNode.children HOT 4
- Issue after 5.0.9 update HOT 3
- Cannot Handle Microsoft Meeting Link HOT 3
- Add Current Node Index in `replace` Callback HOT 6
- Replacing domNode with editor element multiple times breaks editor bubble menu HOT 4
- Method transform has wrong current index HOT 5
- Validate props beforing passing the props object to the element HOT 3
- SVG html with large Data URL returns empty SVG code HOT 2
- Importing the lib with a very large size HOT 2
- How to resize/style the HTML content? HOT 11
- important style is not parsed HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html-react-parser.