Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Set name attribute as a property in the editor's scope #394

Closed
aesfer opened this issue Nov 6, 2014 · 3 comments
Closed

Set name attribute as a property in the editor's scope #394

aesfer opened this issue Nov 6, 2014 · 3 comments

Comments

@aesfer
Copy link

aesfer commented Nov 6, 2014

Hi,

In the html, you can set a name for the editor like this:
<text-angular name='test'></text-angular>

From the docs, I know you can use the name for getting the editor scope via the textAngularManager.

However, I don't see how to retrieve the name from the editor's scope. It could be nice if you could register it in the scope.

In my case, I am creating a custom tool and I need some way of identifying the current editor. The name attribute seems like the perfect choice since I have control over it.

Thanks for this awesome directive,
Andres

@markvp
Copy link

markvp commented Nov 6, 2014

It's not ideal, but you could possibly access it via scope.displayElements.forminput.attr('name').
[disclaimer: I have not tested this!]

@SimeonC
Copy link
Collaborator

SimeonC commented Nov 6, 2014

@markvp's solution would work, as an enhancement I could add this quite easily.

@aesfer
Copy link
Author

aesfer commented Nov 7, 2014

Thanks to both, I will use that solution until the enhancement is ready :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants