[geeklog-cvs] Geeklog-1.x/public_html/javascript storyeditor_fckeditor.js, 1.3, 1.4

Blaine Lang blaine at qs1489.pair.com
Sun Aug 10 12:51:49 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/public_html/javascript
In directory qs1489.pair.com:/tmp/cvs-serv5876

Modified Files:
	storyeditor_fckeditor.js 
Log Message:
Changes to support FCKeditor ver 2.6.3
Disabled the Expand/Shrink featrure when in Advanced Editor mode. Feature not working for some reason that I've not resolvd.

Index: storyeditor_fckeditor.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/javascript/storyeditor_fckeditor.js,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** storyeditor_fckeditor.js	17 Jun 2006 20:31:24 -0000	1.3
--- storyeditor_fckeditor.js	10 Aug 2008 16:51:46 -0000	1.4
***************
*** 46,54 ****
--- 46,57 ----
          var size = 0;
          var size = document.getElementById(element + '___Frame').height;
+ 
          if (option == 'larger') {
              document.getElementById(element + '___Frame').height = +(size) + 50;
+             document.getElementById(element + '___Frame').style.height = +(size) + 50;
  
          } else if (option == 'smaller') {
              document.getElementById(element + '___Frame').height = +(size) - 50;
+             document.getElementById(element + '___Frame').style.height = +(size) - 50;
          }
      }
***************
*** 69,73 ****
          var oEditor = FCKeditorAPI.GetInstance(instanceName) ;
          // return the editor contents in XHTML.
!         return oEditor.GetXHTML( true );
      }
  
--- 72,81 ----
          var oEditor = FCKeditorAPI.GetInstance(instanceName) ;
          // return the editor contents in XHTML.
!         var content = '';
!         try {
!             content = oEditor.GetXHTML( true );
!         } catch (e) {}
! 
!         return content;
      }
  
***************
*** 75,89 ****
          var content = '';
          var oEditor = FCKeditorAPI.GetInstance(instanceName) ;
!         //alert(curmode + ':' + instanceName);
          if (curmode == 'adveditor') { // Switching from Text to HTML mode
              // Get the content from the textarea 'text' content and copy it to the editor
              if (instanceName == 'introhtml' )  {
                  content = document.getElementById('introtext').value;
-                 //alert('Intro :' + instanceName + '\n' + content);
              } else {
                  content = document.getElementById('bodytext').value;
-                 //alert('HTML :' + instanceName + '\n' + content);
              }
!             oEditor.SetHTML(content);
          } else {
                 content = getEditorContent(instanceName);
--- 83,98 ----
          var content = '';
          var oEditor = FCKeditorAPI.GetInstance(instanceName) ;
! 
          if (curmode == 'adveditor') { // Switching from Text to HTML mode
              // Get the content from the textarea 'text' content and copy it to the editor
              if (instanceName == 'introhtml' )  {
                  content = document.getElementById('introtext').value;
              } else {
                  content = document.getElementById('bodytext').value;
              }
!             try {
!                 oEditor.SetHTML(content);
!                 } catch (e) {}
! 
          } else {
                 content = getEditorContent(instanceName);
***************
*** 96,100 ****
      }
  
!     function set_postcontent() { 
          if (document.getElementById('sel_editmode').value == 'adveditor') {
              document.getElementById('introtext').value = getEditorContent('introhtml');
--- 105,109 ----
      }
  
!     function set_postcontent() {
          if (document.getElementById('sel_editmode').value == 'adveditor') {
              document.getElementById('introtext').value = getEditorContent('introhtml');




More information about the geeklog-cvs mailing list