Muszę przeładować edytor Tinymce z mniejszego na większy lub odwrotnie potem jak użytkownik wybierze z listy rozwijalnej rozmiar obszaru edytora. Po wybraniu z listy opcji rozmiaru okna edytora obszar powinien zmienić rozmiar.

Ma ktoś może jakiś pomysł jak to zrobić ? Próbowałem zmieniać szerokość ale mi się nie udaje:

[JAVASCRIPT] pobierz, plaintext
  1.  
  2. <script type="text/javascript">
  3. $().ready(function() {
  4. function Rozmiar(akcja)
  5. {
  6. // alert (akcja);
  7. var id = $('#select').val();
  8.  
  9.  
  10. var szerokosc = 650 ;
  11. if (id == 0 ){
  12. szerokosc = 650 ;
  13. }
  14. if (id == 1 ){
  15.  
  16. szerokosc = 950 ;
  17. }
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25. if (akcja == "l"){
  26.  
  27.  
  28.  
  29. $('textarea.tinymce').tinymce({
  30. // Location of TinyMCE script
  31. script_url : '/tiny_mce/tiny_mce.js',
  32. mode : "textareas",
  33. language : "pl",
  34. // General options
  35. theme : "advanced",
  36. plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,in
    linepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,dir
    ectionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,ad
    vlist"
    ,
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43. theme_advanced_buttons1 : "save,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,|,ju
    stifyright,justifyfull,styleselect,formatselect,|,fontselect,fontsizeselect"
    ,
  44.  
  45. theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,out
    dent,indent,blockquote,|,undo,redo,|,link,unlink,image,cleanup,code,|preview,|,fo
    recolor,backcolor"
    ,
  46.  
  47. theme_advanced_toolbar_location : "top",
  48. theme_advanced_toolbar_align : "left",
  49. theme_advanced_statusbar_location : "bottom",
  50. theme_advanced_resizing : true,
  51. theme_advanced_resize_horizontal: true,
  52. theme_advanced_source_editor_width : szerokosc,
  53. width : szerokosc,
  54. height : 500,
  55. theme_advanced_resizing_min_height : 499,
  56. theme_advanced_resizing_max_height : 500,
  57. theme_advanced_resizing_min_width : szerokosc,
  58. theme_advanced_resizing_max_width : szerokosc,
  59.  
  60. // Example content CSS (should be your site CSS)
  61. content_css : "/style/tinymce.css",
  62.  
  63.  
  64. template_replace_values : {
  65. username : "Some User",
  66. staffid : "99999"
  67. }
  68. });
  69. }
  70.  
  71. if (akcja == "p"){
  72. $("#tiny_parent").hide();
  73. Rozmiar("l");
  74. }
  75. alert("szerokość "+szerokosc );
  76.  
  77. }
  78.  
  79.  
  80.  
  81. $("#select").change(Rozmiar("p"));
  82.  
  83. Rozmiar("l");
  84.  
  85.  
  86. });
  87.  
  88.  
  89.  
  90.  
  91. </script>
  92.  
[JAVASCRIPT] pobierz, plaintext



Na dzień dobry okno się ładuje w rozmiarze taki jaki jest wybrany. Jednak skrypt nie reaguje na change . Alerty z rozmiarami są ale rozmiar się nie zmienia .