tinymce and google transliterate

320 views
Skip to first unread message

gayatri

unread,
Jun 30, 2010, 6:16:26 AM6/30/10
to Google India Labs
I am trying to integrate tinymce text editor in web page I have
already transliterated the textarea When I converted textarea into
tinymce text editor,transliteration is disabled How sholud i enable
transliteration for editor?

code :
<script type="text/javascript">
// Load the Google Transliteration API
google.load("elements","1",{
packages:"transliteration"
});
function onLoad()
{
var options ={
sourceLanguage:
google.elements.transliteration.LanguageCode.ENGLISH,
destinationLanguage:

[google.elements.transliteration.LanguageCode.MARATHI],
shortcutKey:'ctrl+g',
transliterationEnabled:true};
var opt ={
sourceLanguage:
google.elements.transliteration.LanguageCode.ENGLISH,
destinationLanguage:

[google.elements.transliteration.LanguageCode.MARATHI],
shortcutKey:'ctrl+g',
transliterationEnabled:true};
var opt2={
sourceLanguage:
google.elements.transliteration.LanguageCode.ENGLISH,
destinationLanguage:

[google.elements.transliteration.LanguageCode.MARATHI],
shortcutKey:'ctrl+g',
transliterationEnabled:true};


// Create an instance on TransliterationControl with the
required options.
var control = new
google.elements.transliteration.TransliterationControl(options);
var ctr = new
google.elements.transliteration.TransliterationControl(opt);
var ctr2=new
google.elements.transliteration.TransliterationControl(opt2);

// Enable transliteration in the textbox with id .
control.makeTransliteratable(['t1']);
ctr.makeTransliteratable(['t2']);
ctr2.makeTransliteratable(['t3']);

}
google.setOnLoadCallback(onLoad);
</script>

<!-- TinyMCE -->
<script type="text/javascript" src="http://localhost/tinymce/jscripts/
tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
skin : "o2k7",
skin_variant : "silver",

// Theme options
theme_advanced_buttons1 :
"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true

// Example content CSS (should be your site CSS)
//content_css : "css/example.css",

// Drop lists for link/image/media/template dialogs
//template_external_list_url : "js/template_list.js",
//external_link_list_url : "js/link_list.js",
//external_image_list_url : "js/image_list.js",
//media_external_list_url : "js/media_list.js",

// Replace values for the template plugin
//template_replace_values : {
//username : "Some User",
//staffid : "991234"
//}
});
</script>
<!-- /TinyMCE -->

<?php
echo "<textarea id=\"t3\" style=\"width:535px;height:100px\" name=
\"txt3\">"."</textarea>";
?>
Reply all
Reply to author
Forward
0 new messages