[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/phpgwapi/js/tinymce/examples/zh_cn/ -> example_advanced.htm (source)

   1  <html>
   2  <head>
   3  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
   4  <link href="../docs/style.css" rel="stylesheet" type="text/css">
   5  
   6  <!-- tinyMCE -->
   7  <script language="javascript" type="text/javascript" src="../../jscripts/tiny_mce/tiny_mce.js"></script>
   8  <script language="javascript" type="text/javascript">
   9      tinyMCE.init({
  10          theme : "advanced",
  11          mode : "exact",
  12          language : "zh_cn",
  13          content_css : "editor_content.css",
  14          popups_css : "editor_popup.css",
  15          editor_css : "editor_ui.css",
  16          elements : "elm1,elm2",
  17          //insertlink_callback : "customInsertLink",
  18          //insertimage_callback : "customInsertImage",
  19          plugins : "table",
  20          theme_advanced_buttons3_add_before : "tablecontrols,separator",
  21          save_callback : "customSave",
  22          extended_valid_elements : "a[href|target|name]",
  23          //invalid_elements : "a",
  24          theme_advanced_styles : "Header 1=header1;Header 2=header2;Header 3=header3", // Theme specific setting CSS classes
  25          debug : false
  26      });
  27  
  28      // Custom insert link callback, extends the link function
  29      function customInsertLink(href, target) {
  30          var result = new Array();
  31  
  32          alert("customInsertLink called href: " + href + " target: " + target);
  33  
  34          result['href'] = "http://www.sourceforge.net";
  35          result['target'] = '_blank';
  36  
  37          return result;
  38      }
  39  
  40      // Custom insert image callback, extends the image function
  41      function customInsertImage(src, alt, border, hspace, vspace, width, height, align) {
  42          var result = new Array();
  43  
  44          var debug = "CustomInsertImage called:\n"
  45          debug += "src: " + src + "\n";
  46          debug += "alt: " + alt + "\n";
  47          debug += "border: " + border + "\n";
  48          debug += "hspace: " + hspace + "\n";
  49          debug += "vspace: " + vspace + "\n";
  50          debug += "width: " + width + "\n";
  51          debug += "height: " + height + "\n";
  52          debug += "align: " + align + "\n";
  53          alert(debug);
  54  
  55          result['src'] = "logo.jpg";
  56          result['alt'] = "test description";
  57          result['border'] = "2";
  58          result['hspace'] = "5";
  59          result['vspace'] = "5";
  60          result['width'] = width;
  61          result['height'] = height;
  62          result['align'] = "right";
  63  
  64          return result;
  65      }
  66  
  67      // Custom save callback, gets called when the contents is to be submitted
  68      function customSave(id, content) {
  69          alert(id + "=" + content);
  70      }
  71  </script>
  72  <!-- /tinyMCE -->
  73  
  74  <title>¸ß¼¶Ê¾Àý</title></head>
  75  <body>
  76  <a href="example_simple.htm">[¼òµ¥Ê¾Àý]</a> [¸ß¼¶Ê¾Àý] <a href="example_mail.htm">[ÓʼþʾÀý]</a> <a href="example_full.htm">[È«¹¦ÄÜʾÀý]</a>
  77  
  78  <h3>¸ß¼¶Ê¾Àý</h3>
  79  <p>¸ÃҳչʾÁËTinyMCE¸üΪ¸´ÔÓµÄÓ÷¨¡£ÔÚ´ËÒ³ÃæÉÏ£¬TinyMCEµÄģʽ±»É趨Ϊ½«Ìض¨µÄ×é¼þת»»Îª±à¼­Æ÷£¨ÕâÀïÊÇÒ»¸öDIV×é¼þ¼°Ò»¸öTEXTAREA×é¼þ£©¡£ÏÂÃæµÄÀý×ÓʹÓÃÁËÓû§×Ô¶¨ÒåCSSÎļþ£¬Õâ¾ÍÊÇΪºÎ×ÖÌåÊǺìÉ«µÄÔ­Òò¡£ÁíÍ⣬»¹Ê¹ÓÃÁËÒ»¸ö½Ð&quot;advanced&quot;µÄÖ÷Ì⣬Ëü±ÈĬÈÏÖ÷ÌâÓиü¶àÑ¡Ïî¡£´úÂëÖл¹°üº¬ÁË×Ô¶¨Ò廨µ÷º¯ÊýʾÀýµÈÆäËû²Ù×÷¡£×¢ÒâÒ³ÃæÎ²²¿µÄÌá½»°´Å¥£¬Ëü»á´¥·¢Ò»¸ö±£´æ²Ù×÷¡£ÓûÁ˽âTinyMCE¸ü¶àµÄÌØÕ÷ºÍÉèÖã¬Çë²é¿´ <a href="../../docs/zh_cn/index.htm">ÊÖ²á</a>¡£<br>
  80    <br>
  81  
  82    <!-- Form with textare element with width: 100% -->
  83  </p>
  84  <form method="post" action="post.php">
  85  <textarea name="elm1" style="width:100%" rows="15">
  86      <span class="header1">Test header 1</span><br />
  87      <span class="header2">Test header 2</span><br />
  88      <span class="header3">Test header 3</span><br />
  89      Some <b>element</b>, this is to be editor 1. <br /> This editor instance has a 100% width to it.
  90      <p>Some paragraph. <a href="http://www.sourceforge.net">Some link</a></p>
  91      <img src="../logo.jpg">
  92  </textarea>
  93  <br>
  94  <input type="button" name="save" value="±£´æ" onclick="tinyMCE.triggerSave();">
  95  </form>
  96  
  97  <!-- Div elements that gets to be a editor instance aswell -->
  98  <div id="elm2" style="width:400px; height:250px">
  99      Some <b>element</b>, this is to be editor 2. <br /> This editor instance is a DIV element instead of a textarea.
 100      <p>Some paragraph. <a href="http://www.sourceforge.net">Some link</a></p>
 101      <img src="../logo.jpg">
 102  </div>
 103  
 104  <br>
 105  
 106  һЩ×Ô¶¨Òå²Ù×÷£º<a href="javascript:tinyMCE.execCommand('Bold');">[Bold]</a> | 
 107  <a href="javascript:tinyMCE.execCommand('Italic');">[Italic]</a>
 108  <a href="javascript:void(0);" onclick="tinyMCE.execCommand('mceInsertContent',false,'<b>Hello world!!</b>');">[Insert some HTML]</a>
 109  <a href="javascript:void(0);" onclick="tinyMCE.execCommand('mceReplaceContent',false,'<b>{$selection}</b>');">[Replace selection]</a>
 110  
 111  <br>
 112  
 113  </body>
 114  </html>


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7