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

Add onLoad event #152

Closed
himadrinath opened this issue Aug 29, 2017 · 13 comments
Closed

Add onLoad event #152

himadrinath opened this issue Aug 29, 2017 · 13 comments

Comments

@himadrinath
Copy link

i want to add other buttons with my emoji emojionearea-button inside emojionearea

like this

text

@mervick
Copy link
Owner

mervick commented Aug 29, 2017

Sorry, currently there is no events for this, I will add new events in new version,
now you can use setTimeout() or setInterval() function for checking input of emojionearea for being ":hidden" and after that add yours buttons,
something like

$("#emojionearea").emojioneArea();
var ready = function(next) {
  var timer = setInterval(function() {
    if ($("#emojionearea").is(":hidden")) {
      clearInterval(timer);
      next();
    }
  }, 200);
};

ready(function() {
   // add your buttons to emojionearea here
});

@himadrinath
Copy link
Author

@mervick thanks 👍

@carpii
Copy link
Contributor

carpii commented Oct 6, 2017

@mervick I'm trying to find ways I could contribute to emojionearea

How do you envision this event working?

Maybe an event being fired when emojionearea is about to add the smiley/close button
and the event contains the markup which is about to be added?

The event handler can return the full markup which will then be appended?

Maybe some other idea, or just something you prefer to implement yourself?

@mervick mervick changed the title add another button beside emojionearea-button Add onLoad event Oct 6, 2017
@mervick
Copy link
Owner

mervick commented Oct 6, 2017

this issue is duplicate of #78

@mervick mervick closed this as completed Oct 6, 2017
@mervick
Copy link
Owner

mervick commented Oct 6, 2017

@carpii if you have a time you can add onLoad event it must be triggered after init function done, maybe here
https://github.com/mervick/emojionearea/blob/master/src/function/init.js#L544

@carpii
Copy link
Contributor

carpii commented Oct 6, 2017

@mervick, thanks I will have a play around tomorrow and see how well it works

@mervick
Copy link
Owner

mervick commented Oct 6, 2017

@carpii I want to completely rewrite this plugin but I don't have a time to do this

@carpii
Copy link
Contributor

carpii commented Oct 6, 2017

@mervick I understand. Even in its present state though, its the best I've seen and still helping a lot of people :)

@mervick
Copy link
Owner

mervick commented Oct 6, 2017

@carpii I need help with documentation, if you can do it I would be very grateful

@carpii
Copy link
Contributor

carpii commented Oct 6, 2017

@mervick Ok I'll try to help with that too, but I dont have an in-depth understanding of it yet, only the bits I've used in my project. I'll submit some doc changes over the weekend, and then you can decide if theyre worth committing

@mervick
Copy link
Owner

mervick commented Oct 6, 2017

ok

@carpii
Copy link
Contributor

carpii commented Oct 7, 2017

@mervick does this new onload event need to use the internal trigger/localstorage mechanism?

Since it will only fire once per instance, from what I can see its just a case of calling trigger("onload")

@mervick
Copy link
Owner

mervick commented Oct 7, 2017

it will used for users and fire only once per instance

mervick added a commit that referenced this issue Oct 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants