14 Mayıs 2015 Perşembe

Chrome, Mozilla ve Explorer için 8 karakter boşluk bırakma

//Markup Kodu
  <telerik:RadEditor ID="txtRADEditor1" OnClientLoad="Editor_OnClientLoad1" runat="server" Height="100" Width="682px" ToolbarMode="ShowOnFocus" StripFormattingOptions="MSWordRemoveAll"  
                                 OnClientCommandExecuting="HTMLEditor_OnClientCommandExecuting" EnableResize="false" AutoResizeHeight="false" OnClientPasteHtml="OnClientPasteHtml">  
                                 <RealFontSizes>  
                                   <telerik:EditorRealFontSize Value="8px" />  
                                   <telerik:EditorRealFontSize Value="9px" />  
                                   <telerik:EditorRealFontSize Value="10px" />  
                                   <telerik:EditorRealFontSize Value="11px" />  
                                   <telerik:EditorRealFontSize Value="12px" />  
                                   <telerik:EditorRealFontSize Value="14px" />  
                                   <telerik:EditorRealFontSize Value="16px" />  
                                 </RealFontSizes>  
                               </telerik:RadEditor>  



//Java Script Kodu

function Editor_Tab_Press_For_Firefox(editor, args) {

    if (browser.isMozilla) {
        editor.attachEventHandler("onkeydown", function (e) {
            if (e.keyCode == '9') {
                editor.pasteHtml("&nbsp;&nbsp;&nbsp;&nbsp;");
                e.preventDefault();
                e.cancelBubble = true;
                e.stopPropagation();
            }
        });
    }
}

function Editor_OnClientLoad1(editor, args) {
    call_editor_1_justifyfull = true;

    editor.attachEventHandler("onkeydown", function (e) {
        if (e.keyCode == '9') {
            editor.pasteHtml("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
            e.preventDefault();
            e.cancelBubble = true;
            e.stopPropagation();
        }
    });

    Editor_Tab_Press_For_Firefox(editor, args);

    if (browser.isChrome) {
        editor.attachEventHandler("onkeydown", function (e) {
            if (e.keyCode == '9') {
                editor.pasteHtml("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
                e.preventDefault();
                e.cancelBubble = true;
                e.stopPropagation();
            }
        });
    }
}