كود PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Simple theme example</title>
<!-- TinyMCE -->
<script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">function add_smill(smaill){ document.myform.elmx.value += smaill+'x'; }</script>
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
language : 'ar',
plugins : "style,table,advhr,advimage,advlink,emotions,insertdatetime,preview,contextmenu,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,|,bullist,numlist,|,undo,redo,|,link,unlink,image,cleanup,help,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "hr,removeformat,visualaid,|,emotions,advhr,ltr,rtl,|,styleprops",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_resizing : true
});
</script>
<!-- /TinyMCE -->
</head>
<body>
<a onclick="javascript:add_smill('<img src=http://phpx3.com/images/smile.gif>')"><img src="http://phpx3.com/images/smile.gif" alt="{$smiles[x].code}" border="0"></a>
<form name="myform" method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
<textarea id="elmx" name="elmx" rows="15" cols="80" style="width: 80%">
</textarea>
<br />
<input type="submit" name="save" value="Submit" />
<input type="reset" name="reset" value="Reset" />
</form>
</body>
</html>
وشكراً