9 maj 2008

Uruchomieni edytora tinyMCE w dwóch polach formularza

Inicjalizacja w JS: 

<script language="javascript" type="text/javascript" src="../edytor/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
  tinyMCE.init({
    mode: "exact",
    elements: "strona_fragment",
    theme: "simple"
  });

  tinyMCE.init({
    mode: "exact",
    elements: "strona_tresc",
    theme: "advanced"
  });
</script>

Kod formularza HTML:

<form action="" method="post">
  <textarea id="strona_fragment" name="strona_fragment" cols="60" rows="4" class="mceSimple"></textarea>
  <textarea id="strona_tresc" name="strona_tresc" cols="60" rows="15" class="mceAdvanced"></textarea>
</form>