-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add table-input
feature
#3598
Add table-input
feature
#3598
Conversation
Co-authored-by: Federico <me@fregante.com>
Co-authored-by: Federico <me@fregante.com>
Co-authored-by: Federico <me@fregante.com>
Co-authored-by: Federico <me@fregante.com>
Co-authored-by: Federico <me@fregante.com>
|
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
This comment has been minimized.
This comment has been minimized.
You can customize the SVG directly and inline it instead of importing it. Just pass it through SVGO if you edit it with Illustrator. The plus can indeed be change to look like a table |
Co-authored-by: Federico <me@fregante.com>
Co-authored-by: Federico <me@fregante.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci!
table-input
feature
Co-authored-by: Federico <me@fregante.com> Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
|
||
function init(): void { | ||
delegate(document, '.rgh-table-input-cell', 'click', addTable); | ||
delegate(document, '.rgh-table-input-cell', 'mouseenter', highlightSquares, {capture: true}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line causes
Uncaught TypeError: event.target.closest is not a function
at HTMLDocument.listenerFn (refined-github.js:1164)
listenerFn @ refined-github.js:1164
on every mouse enter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in latest Firefox on Arch Linux, didn't see any errors.
Edit: I see the error in Chromium, so it seems this is a browser-specific bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, |
How about letting the user choose, then ? |
No options allowed: Also: Good news, thoughMarkdown tables are now available natively on GitHub: https://github.com/orgs/community/discussions/40299
|
Thanks for contributing! 🍄
LINKED ISSUES: Closes Improve <table> input in the comment field #2875
TEST URLS:
Managed to get this done in just under 80 lines, don't know how it could be reduced but it's probably possible. A few notes/questions:
observeElement
(I got started by copying and hackingcollapsible-content-button
which doesn't use it either). Does it even makes sense to use it here?