在表面上将表情符号插入<p:texteditor>或<p:inputtextarea>

时间:2017-02-19 07:20:51

标签: primefaces emoji

我正在开发一个与Java EE和Primefaces聊天的项目。 现在,我想在向朋友发送消息时添加笑脸,消息写在 p:inputTextarea p:textEditor 上。

一般情况下,我有:

&#13;
&#13;
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"> 
	<h:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link href="stylesheets/jquery.cssemoticons.css" media="screen" rel="stylesheet" type="text/css" />
		<script src="javascripts/jquery-1.4.2.min.js" type="text/javascript"></script>
		<script src="javascripts/jquery.cssemoticons.min.js" type="text/javascript"></script>
		<script type="text/javascript">
			$(document).ready(function()
			{
				$('.text').emoticonize({
				//delay: 800,
				//animate: false,
				//exclude: 'pre, code, .no-emoticons'
				});
				$('#toggle-headline').toggle(
				function(){
					$('#large').unemoticonize({
						//delay: 800,
						//animate: false
					})
				}, 
				function(){
					$('#large').emoticonize({
						//delay: 800,
						//animate: false
					})
					}
				);
			})
		</script>
		<style type="text/css">
			#small { font-size: 8px; }
			#large { font-size: 72px; }
			#regular { font-size: 20px; }
			.wrapped { width: 350px; }
		</style>
	</h:head> 
	<h:body> 
		
		<h:outputText value="Hello World!!!! :)" styleClass="text"/>
	
	</h:body> 
</html>
&#13;
&#13;
&#13;

结果,它看起来像this。 现在,我想要一个表情符号列表,在选择表情符号后,它会自动添加到我的输入文本中。

你有任何关于这样做的想法吗?非常感谢。

0 个答案:

没有答案