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

Editor name not taken from component ID #250

Open
SpencerGresoro opened this issue Jul 25, 2023 · 0 comments
Open

Editor name not taken from component ID #250

SpencerGresoro opened this issue Jul 25, 2023 · 0 comments

Comments

@SpencerGresoro
Copy link

SpencerGresoro commented Jul 25, 2023

I was expecting if the component has an id/template id -- ckeditor id="letterEditor" #letterEditor -- that when createEditor is called, it would take the value of the id attribute, and use that as the instance name.

Would it be possible to extend ckeditor4-angular.mjs to include a 'id' property as well as 'tag'
If we could just pass a node instead of a tagName, that would also solve the issue.

I need this for various reasons, not least of which is context detection and grabbing the correct editor instance. The fact that it doesnt derive the editor name from the original node (in this case component) id, creates a snowball effect of breakage.
It creates editor1, editor2..ect.
I also noted that when navigating away to a new route, and coming back, it keeps incrementing this generated name. So an editor2 becomes editor3, and so on... with each nav away and back. Id like to stop that from happing as well.

Any suggestions much appreciated.
I'm not sure what the best approach it, I just created a new @input property 'editorName' - and if that's not null, set that as the ID of the <textarea> or other node you create.

I went ahead and forked this repo and made the change, but frankly Its alot of guess work. My goal was to create a new package with my forked version, but I cant seem to publish to npm.. very likely because I've never created packages before ! :) So despite making the change, I cant seem to publish it for our project to link to instead of the official one.

Thank you in advanced.

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

1 participant