You are not logged in.
<script type="text/javascript">
_editor_url = "xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "cz"; // And the language we need to use in the editor.
_editor_skin = "silva"; // If you want use a skin, add the name (of the folder) here
</script>
<script type="text/javascript" src="xinha/XinhaCore.js"></script>
<script type="text/javascript">
xinha_editors = null;
xinha_init = null;
xinha_config = null;
xinha_plugins = null;
xinha_init = xinha_init ? xinha_init : function()
{
xinha_editors = xinha_editors ? xinha_editors :
[
'myTextArea'
];
xinha_plugins = xinha_plugins ? xinha_plugins :
[
'CharacterMap', // znaky
'ContextMenu',
'ListType',
'Stylist',
'SuperClean',
'TableOperations', // operace s tabulkama
'Linker', // file manager vkladani odkazu
'ExtendedFileManager' // pro nahravani souboru
];
if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return; // nesahat :-)
xinha_config = xinha_config ? xinha_config() : new Xinha.Config();
xinha_config.toolbar =
[
["separator","fontname","fontsize","bold","italic","underline","strikethrough"],
["separator","forecolor","hilitecolor","textindicator"],
["separator","subscript","superscript"],
["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],
["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
["separator","inserthorizontalrule","createlink","insertimage","inserttable"],
["linebreak","separator","undo","redo","selectall","print"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite"]),
["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright", "righttoleft"],
["separator","htmlmode","showhelp","about"]
];
//xinha_config.showLoading = true; // zobrazuje nacitaci panel . default je false
xinha_config.sizeIncludesBars = false; // panel nastroju neni zahrnut ve velikosti okna
xinha_config.ExtendedFileManager.use_linker = true;
if (xinha_config.ExtendedFileManager) {
with (xinha_config.ExtendedFileManager)
{
<?php
// define backend configuration for the plugin
$IMConfig = array();
$IMConfig['images_dir'] = $_SERVER['DOCUMENT_ROOT'].'/img/';
$IMConfig['images_url'] = '/img';
$IMConfig['files_dir'] = $_SERVER['DOCUMENT_ROOT'].'/img/';
$IMConfig['files_url'] = '/img';
$IMConfig['thumbnail_prefix'] = 't_';
$IMConfig['thumbnail_dir'] = 't';
$IMConfig['resized_prefix'] = 'resized_';
$IMConfig['resized_dir'] = '';
$IMConfig['tmp_prefix'] = '_tmp';
$IMConfig['max_filesize_kb_image'] = 2000;
// maximum size for uploading files in 'insert image' mode (2000 kB here)
$IMConfig['max_filesize_kb_link'] = 5000;
// maximum size for uploading files in 'insert link' mode (5000 kB here)
// Maximum upload folder size in Megabytes.
// Nula vypina limit
$IMConfig['max_foldersize_mb'] = 0;
$IMConfig['allowed_image_extensions'] = array("jpg","gif","png");
$IMConfig['allowed_link_extensions'] = array("jpg","gif","pdf","ip","txt",
"psd","png","html","swf",
"xml","xls");
require_once 'xinha/contrib/php-xinha.php';
xinha_pass_to_php_backend($IMConfig);
?>
}
}
xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
Xinha.startEditors(xinha_editors);
}
Xinha._addEvent(window,'load', xinha_init); // this executes the xinha_init function on page load
// and does not interfere with window.onload properties set by other scripts
</script>
Offline
Offline
In ff everything is alright. But when loading in IE expire error access denied. For all the file folders and I have 777
Offline
I have loading error too.
only in IE v7
xinha - 0.95
Error alert: Line 3702
Error message: Object needed
in Mozilla and Opera- it's Ok.
Last edited by $SMax$ (2008-09-19 02:47:15)
Offline
2amosatko,
Let's try to move initialized code at end of page:
<script type="text/javascript">
_editor_url = "<?=$cfg['site']['url']?>engine/xinha/";
_editor_lang = "ru";
</script>
<script type="text/javascript" src="xinha/XinhaLoader.js"></script>
<script type="text/javascript" src="XinhaConfig.js"></script>
<script type="text/javascript" src="scripts.js"></script>
</body>
</html>
Offline
I am having this problem as well. It is intermittent and happens maybe 75% of the time.
JScript Runtime Error - Object Required
var main=document.getElementById("loading_"+document.getElementById(_278[i]).id);
main.parentNode.removeChild(main); <---- Fails here
I tried turning off the XinhaLoader and everything works fine.
Last edited by KGnfld (2008-09-25 09:31:17)
Offline
Should I submit a ticket of some sort on this?
As mentioned above it is line 3702 of XinhaCore.js
Offline
I think that IE7 load and execute Xinha object faster then textarea object.
And I put initialize code of Xinha to the end of script (http://www.xinha.org/punbb/viewtopic.php?pid=6010#p6010).
Error disappeared.
Offline
Sorry to be so negative, I'm having big problems with 0.95 and IE as well.
First of all the textarea was covering all but the top row of buttons and I couldn't fix that using toolbar cofig options.
I saw an old discussion about DTD being the cause of this problem and created a simple page that seemed to confirm this - then I looked at the simple_example.html which uses "http://www.w3.org/TR/html4/loose.dtd" but still works with IE. So - I re-wrote my simple page in the style of simple_example and it worked with IE (it's quite unlike the newbie guide though).
That was looking promising but then I tried configuring the toolbar - works fine in FF, has no effect at all in IE. FF is not reporting any errors on the page other than the normal opacity CSS bug.
I'm a bit confused to be honest and I've been using xinha successfully for years. The newbie guide, the XinhaLoader_readme.txt and the simple_example all use different ways to set up xinha in a textarea and none appear to work cross-browser even with a very simple page. I'm reluctantly coming to the conclusion that I need to use something simpler. :-(
If I can attach files I will - can't easily provide a URL as the server I'm using is only available privately. Will try to put them somewhere public if possible.
thanks for listening.
Kram
Offline
Hmmm. Moving my simple example to a different server has made it work with IE, even picking up the re-configured toolbar. I've yet to see if it this means it will work in the application but in any case I'd welcome comments on whether this is the recommended way to setup a textarea with xinha .95 - it follows the method used in simple_example.html
See http://ktru-main.lancs.ac.uk/xinha95/test/newtopic.htm
the javascript in the head section of that page is:
<script type="text/javascript">
var _editor_url='/xinha95/';
var _editor_lang='en';
</script>
<!-- Load up the actual editor core -->
<script type="text/javascript" src="/xinha95/XinhaCore.js"></script>
<script type="text/javascript">
var xinha_plugins = [ 'CharacterMap' ];
var xinha_editors = [ 'Body' ];
function xinha_init()
{
if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
var xinha_config = new Xinha.Config();
xinha_config.width = '100%';
xinha_config.height = 'auto';
xinha_config.toolbar = [
["popupeditor"],
["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"],
["separator","htmlmode","showhelp","about"]
];
xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
Xinha.startEditors(xinha_editors);
}
Xinha.addOnloadHandler(xinha_init);
</script>
Offline
In my application, this works just the same as in the simple file the URL above points to, except that as before (with code based on the newbie guide) when the menu is on more than one line it either overlaps the textarea (Firefox, Opera) or the textarea overlaps all but the first line of the menu (Explorer).
I'm using exactly the same code in the page header to set up textarea in the application so first came to the conclusion that some CSS it uses must be interfering with XINHA's. However seeing different pixel values in the *generated* source I wonder if something in our application is preventing Xinha from re-sizing the toolbar area? In other words the problem is due to Javascript interfence rather than CSS. Is that likely? We're not specifically using Window events or window resizing in our app.
Offline