-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Title Input Box Shouldn't Support Formatting #109
Comments
What do you mean by formatted text? |
While this isn’t a perfect fix, it is simple, and the problem is also not a big issue. The text input field has this (simplified) HTML I think that support can be tested like below. try {
let e = document.createElement("span");
e.contentEditable = "plaintext-only";
// supported
// Use contenteditable="plaintext-only".
} catch (error) {
if (! (error instanceof SyntaxError)) { throw error; }
// not supported
// Use contenteditable="true", and add a listener similar to below, maybe triggered when the element loses focus.
function listener({target}) {
target.textContent = target.textContent;
}
} |
The title input box for a new title, allows formatted text to be pasted, which shouldn't be the case, since it isn't sent off anywhere, and can therefore be confusing.
The text was updated successfully, but these errors were encountered: