You are not logged in.
The editor area is an iframe, thus a different window, thus js in the main window is not available inside
You would have to do
editor.focusEditor();
var sel = editor.getSelection();
var range = editor.createRange(sel);
range.pasteHTML(...);but actually that's just what's done at the moment (see modules/InternetExplorer/InternetExplorer.js l. 315/l. 157).
Note that until recently insertNodeAtSelection() wasn't supported in IE at all, and I just implemented this free-handedly, assuming this should work.
If you gain any insights, please tell
Xinha._currentlyActiveEditor
To change the behaviour of unshifted enter, in Mozilla set xinha_config.mozParaHandler = "built-in". In IE there is now way to change this.
this should be taken care of by
Xinha._addEvent(window,'load', xinha_init);please try and report if it works with
Xinha.addDom0Event = function(window,'load', xinha_init);or ultimately
window.onload = xinha_init;instead.
I have only recently changed this in the Newbie guide thinking it would prevent problems, but if it doesn't work, I'll have to change it back ![]()
you must not have HTML tags in the my_config.js file (it's a JavaScript file and may thus contain only JavaScript)
<html>
<head>
<title>New Document</title>
<script type="text/javascript">
.
.
.
</script>
</head>
<body>
</body>
</html>maybe having a look at this example helps? http://xinha.raimundmeyer.de/x_examples/restricted.php
Are you using FireBug? You should, it's a must for js development and could have answered your questions within a few clicks ![]()
Also I'd like to mention in this context that the GetHtml "plugin" is deprecated, it is now called a "module" and can be enabled by
xinha_config.getHtmlMethod = "TransformInnerHTML";You can of course go on using the plugin, but it's only a dummy now that sets the above variable.
Well, pasting from Word is always a pain ![]()
I would like which "many tags" were stripped.
Style should work, xinha_config.fullPage has to be true
Script is stripped by default, but should be preserved with xinha_config.stripScripts = false;
If you have a clearer image of what is not working correctly, you should create a ticket
it's only doc.getElementById()
Knowing nothing about jsf (but a quick google search), I have to guess:
Please open the page in your browser and select "View Source":
<h:inputTextarea id="newbiearea1" rows="10" cols="50" style="width: 100%" />may have turned into somthing like
<textarea id="someStuffByJsfProbablyFormId:newbiearea1" rows="10" cols="50" style="width: 100%"></textarea>if it's like this, the xinha_editors array contains the wrong id and Xinha cannot find the appropriate textarea.
Have a look at the piece of code below, which tries to transform the given id's into the actual ones (supposing it's the form id that is prefixed)
xinha_init = xinha_init ? xinha_init : function()
{
xinha_plugins = xinha_plugins ? xinha_plugins : [ ];
if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;
var JsfInputTextareaIds = [ 'newbiearea1' ];
function getRealIds (ids)
{
var realIds = [];
var tas = document.getElementsByTagName("textarea");
for (var i=0;i<ids.length;i++)
{
for (var j=0;j<tas.length;j++)
{
if ( tas[j].id == tas[j].form.id+':'+ids[i] )
{
realIds.push(tas[j].id);
}
}
return realIds;
}
xinha_editors = getRealIds(JsfInputTextareaIds);
xinha_config = xinha_config ? xinha_config() : new HTMLArea.Config();
xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
HTMLArea.startEditors(xinha_editors);
}
}This should really not be the case!
Xinha should work with any server technology, provided
- all files can be loaded by the browser
- the xinha_init function is executed onload (this could be an issue if jsf or any other script overwrites the window.onload property)
Could you give a URL to a page where you have set up Xinha and which is not working. I'm sure we can work it out
No, certainly you can use all sorts of tags and HTML versions (valid markup, of course).
Speficically, which are the problems you're experiencing?
Sorry, I don't get what you mean
Yes, I think you can use Xinha.prependDom0Event() at will.
You can choose between Xinha.prependDom0Event() and Xinha.addDom0Event() to determine the position in the event queue
You got it!
see http://xinha.python-hosting.com/ticket/957
So, now it should be able to co-exist with Xinha. Of course, as I have changed names, you have to adapt your page. Just look at the source of the demo page to see what I have changed (ExtendedFileManager->ExtendedFileManagerStandalone, EFMConfig->ExtendedFileManagerStandalone.Config)
PS: If I have produced any bugs in the hurry, just write back ![]()
It will. Because I was lazy. Stand by, I'll fix it just now.
Ah, that was dumb of me, defining a variable and then don't use it...
I changed ExtendedFileManager.js accordingly, now you only have to set _efm_url correctly in each page (before loading ExtendedFileManager.js, obviously)
Well, but which would that be? I didn't check the list you sent me one-by-one, but it contained many characters that could be used by entizing
There are no wrong characters, only wrong encoding, see http://xinha.python-hosting.com/wiki/Pl … mlEntities
As I said above, if we have no possibility to see your problem live, nor any deeper information, how could one possibly come up with any solution? Guessing? Telepathy?
Your code looks OK from the first glance, and good coders are always welcome. You would have to mail James (james@gogo.co.nz) if you want to contribute files to the svn
I have also replied to your ticket