react-magic
react-magic copied to clipboard
Automatically AJAXify plain HTML with the power of React. It's magic!
The JSX transformer is designed to take string input in a certain syntax and convert it to React syntax. However, htmltojsx.js does not work with strings: it works with a...
Modifying of source HTML files and converting them again to JSX using `HTMLtoJSX` requires a lot of manual work to re-apply custom changes made in JSX (e.g. set custom properties,...
Added onclick=> onClick to ATTRIBUTE_MAPPING. Because when transform **onclick** from HTML to Javascript React it will be **onClick** (refer to this link [https://reactjs.org/docs/handling-events.html](https://reactjs.org/docs/handling-events.html))
Compacting multi-lines attributes. Keeping the indentation needs to rewrite all the attributes concatenation in __beginVisitElement_ `attributes.join(' ')`
Added ability to take input from stdin so that html can be piped in. Executing `cat test/test.htm | htmltojsx --className 'Tst'` results in same output as `htmltojsx -c 'Tst' ./test/test.htm`...
On , I was able to almost perfectly convent a huge chunk of text, but I thought I should let someone know that the `onclick` attribute is not converting to...
The library depends on the DOM for just escaping special characters. It can be done separately. This will help to run it in the worker.
The example at http://magic.reactjs.net/htmltojsx.htm is very simple, it just converts static HTML to static JSX. But that's not very useful on it's own. How would one write HTML that can...
For instance, the `svg` `stroke-width` attribute should be converted to `strokeWidth`, and `fill-rule` to `fillRule`, etc.