-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Content Editable and its application #50
Comments
Fundamentals: contenteditable property and react-contenteditableThe contenteditable propertyHTML elements can be made editable by users using the contenteditable property. When this property is set, it allows users to modify the innerHTML of the element, similar to how they interact with a text input element. Here is an example provided by MDN
react-contenteditable and how it resolves
|
Security considerations with content editableUsers have the freedom to input any content of their choice within the content-editable area. For instance, in this CodeSandbox sample, users can input a script as shown below: That means this could pose a security risk if a user inputs malicious content into the editable area, as that content may be executed. when it comes to eliminating malicious content, sanitize-html is your ally , offering flexible configuration options for tailored content sanitization. |
Some common issues[contenteditable=true]:empty:before {
content: attr(placeholder);
display: block;
color: #aaa;
} |
Overview
This article talks about react-content editable, including
The text was updated successfully, but these errors were encountered: