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

[Feature Request] Add HTMLElement support for editArea parameter. #1001

Open
woody-li opened this issue Mar 18, 2024 · 2 comments
Open

[Feature Request] Add HTMLElement support for editArea parameter. #1001

woody-li opened this issue Mar 18, 2024 · 2 comments

Comments

@woody-li
Copy link

In interactive Editor Constructor, the editArea parameter only supports ID string and EditArea instance.

Is it possibile to add HTMLElement type support, I saw that other id-like parameters both supports it.

In my case, the element is descendant of a shadowDom, so it cann't be find by getElementById.

@paulrosen
Copy link
Owner

So you want to do something like:

const editArea = new abcjs.EditArea(element)
const editor = new abcjs.Editor(editArea)

That wouldn't be hard to do. I'll have it in the next version.

@woody-li
Copy link
Author

woody-li commented Apr 9, 2024

Yeah, thanks for your work.

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