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

Onload event #166

Merged
merged 2 commits into from
Oct 9, 2017
Merged

Onload event #166

merged 2 commits into from
Oct 9, 2017

Conversation

carpii
Copy link
Contributor

@carpii carpii commented Oct 8, 2017

Trigger an onLoad event when EmojiOneArea has finished initialising

I feel bad for committing such a trivial commit, but it's what you asked for :)

Tested with multiple EmojiOneAreas...

<!DOCTYPE html>
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/emojione/2.2.7/assets/css/emojione.min.css"/>
	<link rel="stylesheet" type="text/css" href="emojionearea.min.css" />
	<script src="https://code.jquery.com/jquery-1.x-git.js"></script>
	<script src="https://cdn.rawgit.com/yuku-t/jquery-textcomplete/v1.3.4/dist/jquery.textcomplete.js"></script>
	<script src="https://cdn.jsdelivr.net/emojione/2.2.7/lib/js/emojione.min.js"></script>
	<script src="emojionearea.min.js"></script>
</head>

<body>
<script>
	$(document).ready(function() { 
		for (var i=0; i<50; i++) {
			$("body").append('<input class="emojionearea" type="text">');
		};
		
		$("input.emojionearea").emojioneArea({
			hidePickerOnBlur: false,
			pickerPosition: "bottom",
			events: {
				onLoad: function(editor) {
					console.log("client onLoad");
					console.log(editor);
				}
			}
		});
	});
</script>

</body>
</html>

@mervick mervick merged commit 464c18c into mervick:master Oct 9, 2017
@mervick
Copy link
Owner

mervick commented Oct 9, 2017

Thanks!

@carpii carpii deleted the onload_event branch October 22, 2017 19:16
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

Successfully merging this pull request may close these issues.

2 participants