Comments (1)
Scripts are not really supported because it's too risky (in terms of xss) for user created content. I don't think there's an equivalent in draft-js contentState for <script>
. Also it could allow content to modify itself (such as in your example) which could break React.
You can solve some use cases by using custom elements to represent buttons and dates for instance. Draft is very customizable in that regard.
from draft-js-utils.
Related Issues (20)
- Example for markup code-block export
- inLineStyles are not getting converted or they are ignored HOT 5
- Publish draft-js-export-markdown HOT 1
- export-html BlockRenderer doesn't work properly with list
- Error: 'OrderedSet' is not exported by node_modules\immutable\dist\immutable.js, imported by node_modules\draft-js-utils\esm\getEntityRanges.js
- Render custom inline + block React components
- stateFromMarkdown() adds code inline style inside code block
- A way to add CSS classes to HTML tags
- Markdown Italic does not work with word selected in middle HOT 1
- Code Highlighting inside blockRenderers
- target=" _blank" converting to target = "_self" on using stateFromHTML
- Update to italic parsing breaks Safari 15.5 HOT 6
- stateToHTML creates nested html based on the order the options are defined and not chronologically.
- Why to keep "\n" in html string ? HOT 1
- Custom wrapper elements
- Regex not supported in Safari
- Article does not show up in Safari HOT 8
- could you please update immutable to verion 4.1.0? HOT 2
- How to use draft-js-import-markdown with TypeScript?
- draft-js-import-html Not recognize Iframe as a state
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 draft-js-utils.