Is there any way to totally disable full page mode?

Last post 03-10-2010, 2:11 PM by Adam. 3 replies.
Sort Posts: Previous Next
  •  03-09-2010, 6:31 PM 59284

    Is there any way to totally disable full page mode?

    I have successfully removed the buttons, but the F12 full page mode still happens if the user presses F12. This is inconnvenient as we have some of our own buttons on the page, which are obscured in this mode.

    Geoff Swenson
    Seattle Washington
  •  03-09-2010, 8:44 PM 59285 in reply to 59284

    Re: Is there any way to totally disable full page mode?

    hi geewhizbang ,
     
    Please add the code below into your page
     
    1.   
    2. <script>   
    3. function CuteEditor_OnCommand(editor,command,ui,value)   
    4.  {   
    5.    if(command=="FullPage")   
    6.    {   
    7.       return true;   
    8.    }   
    9. }   
    10. </script>  
    Regards,
     
    Ken
  •  03-10-2010, 1:38 PM 59307 in reply to 59285

    Re: Is there any way to totally disable full page mode?

    That isn't quite right. It doesn't work, and even worse, when I click on any tab bar button, it writes the text of the function into the body of the html of the edited document.
     
    This is the entire code on the page that contains the CuteEdit control. Is this where the code should be added? When I pasted it in exaclty , it didn't work.
     
    function CheckRequired()
    {
       result = true;
       var nRequired = document.SaveForm.required.value;
       if (nRequired == 1)
       {
          var txt = document.SaveForm.txtContent.value;
          if (txt.length <= 0 || txt.length == 13 && txt.toString().toLowerCase() == "")
          {
             alert(toUnicode("<%= res.GetString("STR_8")%>"));
             result = false;
          }
       }
       return result
    }
    function newRelatedArticle(kbid)
    {
       strFeatures = "width=600; height=450; toolbar=no; menubar=no; location=no; directories=no";
       strTitle = window.open("/kb/article/selectArticleFrame1.aspx?kb=" + kbid + "&v=SaveForm.iaid", "selectArticlePopUp", strFeatures);
       return false;
    }
    var _CE = null
    function GetCuteEditor()
    {
       if (_CE == null) _CE = CuteEditor_GetEditor(document.getElementById('<% = CuteEdit.ClientID %>'));
       return _CE;
    }
    function warning()
    {
       var result = false;
       if (confirm(toUnicode("<%= res.GetString("STR_2")%>")))
       {
          document.SaveForm.editortype.value = 0;
          document.SaveForm.changeEditor.value = 1;
          result = true;
       }
       else
       {
          result = false;
       }
       return result;
    }
    function textControl()
    {
       string = "showTemplate();";
       setTimeout(string,1000);
    }
    function showTemplate()
    {
       document.getElementById("loading").style.display = "none";
       editor.style.display = "block";
       SetWidth(30)
    }
    var SetWidthTimer = null;
    function SetWidth(tries)
    {
       tries--;
       var ce = GetCuteEditor();
       if (ce == null || typeof(ce.SetWidth) == "undefined" && tries > 0)
       {
          SetWidthTimer = self.setTimeout("SetWidth(" + tries + ")", 300);
          return;
       }
       if (SetWidthTimer != null) self.clearTimeout(SetWidthTimer);
       if (tries < 1) return;
       
       
       var w = document.getElementById("divEditor").offsetWidth;
       ce.SetWidth(w > 600 ? w-2 : 600);
       var h = document.documentElement.clientHeight-150;
       ce.SetHeight(h > 400 ? h : 400);
    }

    function Update(action, rr)
    {
       if(action=1)
       {
          window.navigate("articleProperties.aspx?aid=" + aid + "&r=" + rr);
       }
    }
    function ConfirmCancel()
    {
       if(confirm(toUnicode("<%=res.GetString("STR_18")%>")))
       {
          document.SaveForm.submitValue.value="cancel";
          document.SaveForm.submit();
       }
       return false;
    }
    function getSelectedHTML(button)
    {
       var CuteEdit= GetCuteEditor();
       var editwin = CuteEdit.GetWindow();
       var rng=null, html="";
       if(document.selection && document.selection.createRange)
       {
                rng=editdoc.selection.createRange();
                html=rng.htmlText||"";
       }else if(window.getSelection)
       {
                rng=editwin.getSelection();
                if(rng.rangeCount> 0 && window.XMLSerializer)
                {
                   rng=rng.getRangeAt(0);
                   html=new XMLSerializer().serializeToString(rng.cloneContents());
                }
       }
       return html;
    }
    var DialogWindow = null;
    function ShowArticleLinkDialog(button)
    {
       var editor=CuteEditor_GetEditor(button);
       var text = getSelectedHTML(button);
       DialogWindow = editor.ShowDialog(null,"InsertArticleLink.aspx?text=" + text
          ,editor,"dialogWidth:420px;dialogHeight:230px");
    }
    var LinkHTML = "";
    function ShowThreadLinkDialog(button)
    {
       var editor=CuteEditor_GetEditor(button);
       LinkHTML = getSelectedHTML(button);
       
       DialogWindow = window.open
       (
          "InsertThreadLink.aspx",
          "InsertThreadLink",
          "width=440,height=180,dialogWidth=440px,dialogHeight=180px,toolbar=no,menubar=no,location=no,directories=no"
       );
    }

    Geoff Swenson
    Seattle Washington
  •  03-10-2010, 2:11 PM 59310 in reply to 59284

    Re: Is there any way to totally disable full page mode?

    Open the CuteSoft_Client\CuteEditor\Scripts\Constant.js file and modify the following code:
     
    editorconstant.DisableHotkeyF12=false;
     
    Keep me posted

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML