Skip to content
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

Support for elements besides textarea #321

Open
LandonSchropp opened this issue May 12, 2021 · 2 comments
Open

Support for elements besides textarea #321

LandonSchropp opened this issue May 12, 2021 · 2 comments

Comments

@LandonSchropp
Copy link

This might be a little out there, but I'm trying to build a component that behaves exactly like an autosizing textarea, but is not a <textarea>. I need to create a <div> with contenteditable set so I can use child elements in my editable area.

It'd be awesome if TextareaAutosize could support an optional tag property that allows the tag to be set, and defaults to textarea.

Thanks!

@Andarist
Copy link
Owner

My intuition tells me that this would add some complexity to the internal implementation of this package and as such, this is rather a no-go on my side. Unless you would prepare a PR for this that would only adjust the implementation slightly - then I could consider merging this in.

@LandonSchropp
Copy link
Author

That's totally fair. I opened #323 as a draft PR to see what it would look like. This is my first time using a contentEditable div, and I've heard that they can be finicky, so I'm not sure if this is going to be the best approach for my project yet. I may end up using something like react-contenteditable to avoid any issues in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants