1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

need gujarati editor for my website

Discussion in 'HTML & Website Design' started by i_am_dhaval, Feb 24, 2011.

  1. #1
    any free gujarati editor available to add as a editor for my website where i can tryp in english but it will will b converting in to Gujarati language.
     
    i_am_dhaval, Feb 24, 2011 IP
  2. i_am_dhaval

    i_am_dhaval Well-Known Member

    Messages:
    1,364
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    138
    #2
    i_am_dhaval, Feb 24, 2011 IP
  3. iloveajax

    iloveajax Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have developed a gujarati editor using yahoo rich text editor and google transiliteration method..
    I am attaching the code here...simply paste it in a notepad file and save it with a .htm extension. All the javascript and css files will come from yahoo and google's server.. so make sure you have internet connection on while testing this page..

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head><title>
    Gujarati Editor
    </title></head>
    <body>
    <form name="form1" method="post" >

    <table style="width: 100%">


    <tr>
    <td>
    <br />

    <style type="text/css">
    /*Supplemental CSS for the YUI distribution*/#custom-doc
    {
    width: 95%;
    min-width: 950px;
    }
    #pagetitle
    {
    background-image: url(http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/assets/bg_hd.gif);
    }
    </style>
    <!-- Combo-handled YUI CSS files: -->
    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.8.0r4/build/assets/skins/sam/skin.css" />
    <!-- Combo-handled YUI JS files: -->

    <script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.0r4/build/yahoo-dom-event/yahoo-dom-event.js&2.8.0r4/build/container/container_core-min.js&2.8.0r4/build/menu/menu-min.js&2.8.0r4/build/element/element-min.js&2.8.0r4/build/button/button-min.js&2.8.0r4/build/editor/editor-min.js"></script>

    <!--Script and CSS includes for YUI dependencies on this page-->
    <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/menu/assets/skins/sam/menu.css" />
    <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/button/assets/skins/sam/button.css" />
    <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/container/assets/skins/sam/container.css" />
    <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/editor/assets/skins/sam/editor.css" />

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/yuiloader/yuiloader-min.js"></script>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/event/event-min.js"></script>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/dom/dom-min.js"></script>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/animation/animation-min.js"></script>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/connection/connection-min.js"></script>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/element/element-min.js"></script>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/container/container-min.js"></script>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/menu/menu-min.js"></script>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/button/button-min.js"></script>

    <!--<script type="text/javascript" src="editor.js"></script>-->

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/editor/editor-min.js"></script>

    <script type="text/javascript" src="http://www.google.com/jsapi"></script>

    <script type="text/javascript">
    /*
    * How to setup a textarea that allows Transliteration from
    English to Hindi.
    */
    google.load("elements", "1", { packages: "transliteration" });
    </script>

    <!--there is no custom header content for this example-->

    <script type="text/javascript">
    //enable passthrough of errors from YUI Event:
    if ((typeof YAHOO !== "undefined") && (YAHOO.util) &&
    (YAHOO.util.Event)) {
    YAHOO.util.Event.throwErrors = true;
    }

    </script>

    <!--BEGIN SOURCE CODE FOR EXAMPLE =============================== -->
    <style type="text/css">
    .yui-toolbar-group-insertitem
    { *width:auto;}
    .style1
    {
    width: 210px;
    }
    </style>

    <script type="text/javascript">
    function alertText()
    {
    }
    </script>

    <div id="yahoo-com" class="yui-skin-sam">
    <table cellpadding="0" cellspacing="0" width="100%">
    <tr>

    <td>
    <div id="googTrans">
    <textarea name="tbxEditor$yahoo" rows="2" cols="20" id="tbxEditor_yahoo" name="yahoo" style="height:230px;width:100%;"></textarea>
    English and Gujarati typing is possible. Press backspace after typing to see word suggestions. Press ctrl + G to change from English to Gujarati and vice versa.
    Click <a href="../principal/HowToType.aspx" target="_blank">here </a>to know more.
    <input type="hidden" name="tbxEditor$hdnDefLang" id="tbxEditor_hdnDefLang" value="1" />
    </div>
    </td>
    </tr>

    </table>
    </div>

    <script type="text/javascript">
    (function() {
    var myConfig = {
    height: '200px',
    width: '100%',
    animate: true,
    limitCommands: false,
    extracss: 'body { font-size: 14px; font-family: Verdana; }',
    insert: true,
    handleSubmit: true,
    toolbar: {
    collapse: true,
    buttons: [
    {
    group: 'textstyle',
    buttons: [
    { type: 'push', label: 'Bold', value: 'bold' },
    { type: 'push', label: 'Italic', value: 'italic' },
    { type: 'push', label: 'Underline', value: 'underline' },
    { type: 'separator' },

    { type: 'color', label: 'Font Color', value: 'forecolor', disabled: false },
    { type: 'color', label: 'Background Color', value: 'backcolor', disabled: false },
    { type: 'push', label: 'Gujarati Translate', value: 'inserticon' }
    ]
    }
    ]
    }
    };
    YAHOO.log('Editor created..', 'info', 'example');
    myEditor = new YAHOO.widget.Editor('tbxEditor_yahoo', myConfig);
    var control = null;
    myEditor.on('toolbarLoaded', function() {
    myEditor.toolbar.on('inserticonClick', function(ev) {
    control.toggleTransliteration();
    return false;
    }, myEditor, true);
    });
    myEditor.render();
    myEditor.on('afterRender', function() {
    setTimeout(function() {
    var content = document.getElementById('googTrans');
    // Create the HTML for our text area
    var boolTranslate = false;
    var hdnDefLang = document.getElementById('tbxEditor_hdnDefLang').value;
    var SecondaryLang ="GUJARATI";
    if(hdnDefLang == "1")
    {
    SecondaryLang =google.elements.transliteration.LanguageCode.GUJARATI;
    boolTranslate = true;
    }
    if(hdnDefLang == "3")
    {
    SecondaryLang =google.elements.transliteration.LanguageCode.HINDI;
    boolTranslate = true;
    }
    if(hdnDefLang == "4")
    {
    SecondaryLang =google.elements.transliteration.LanguageCode.MARATHI;
    boolTranslate = true;
    }
    var options = {
    sourceLanguage:
    google.elements.transliteration.LanguageCode.ENGLISH,
    destinationLanguage:
    [SecondaryLang],
    shortcutKey: 'ctrl+g',
    transliterationEnabled: boolTranslate
    };
    // Create an instance on TransliterationControl with the required
    // options.
    control = new google.elements.transliteration.TransliterationControl(options);
    // Enable transliteration in the textbox with id
    // 'transliterateTextarea'.

    var id = 'tbxEditor_yahoo';
    id = id +"_editor";
    control.makeTransliteratable([id]);
    }, 1000);
    });
    })();

    </script>


    </td>
    </tr>
    <tr>
    <td style="text-align: center">
    <input type="submit" name="btnSave" value="Save &amp; Close" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnSave&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btnSave" class="button" />

    </td>
    </tr>
    </table>

    <script type="text/javascript">
    //<![CDATA[
    var Page_Validators = new Array(document.getElementById("RequiredFieldValidator1"));
    //]]>
    </script>

    <script type="text/javascript">
    //<![CDATA[
    var RequiredFieldValidator1 = document.all ? document.all["RequiredFieldValidator1"] : document.getElementById("RequiredFieldValidator1");
    RequiredFieldValidator1.controltovalidate = "tbxSubject";
    RequiredFieldValidator1.focusOnError = "t";
    RequiredFieldValidator1.errormessage = "???? ??????? ??";
    RequiredFieldValidator1.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
    RequiredFieldValidator1.initialvalue = "";
    //]]>
    </script>

    </form>

    </body>
    </html>
     
    iloveajax, Feb 25, 2011 IP
  4. alia.y

    alia.y Peon

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Download English to Gujrati character convertor here, hope this will help you..
    http://www.bestsoftware4download.com/download/t-free-english-to-gujarati-character-converter-download-ygbjweld.html
     
    alia.y, Feb 25, 2011 IP
  5. iloveajax

    iloveajax Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    iloveajax, Feb 25, 2011 IP
  6. lkraj

    lkraj Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #6
    lkraj, Feb 26, 2011 IP