You are not logged in.
Could you open a ticket and share the code when you are ready?
No, unfortunately this is not possible at the moment. I'd like to see that, too ![]()
Ja, ich habe dich schon verstanden.
Mit xinha_config.stripBaseHref = true; (das ist sowieso die default einstellung) wird vom anfang der URL der part abgeschnitten, der durch xinha_config.baseHref definiert wird. Mit der o.g. RegExp sollte dabei bei deinem Beispiel http://www.xy.de heraus kommen, was genau das bewirken sollte, was du möchtest.
//Step 3 im Newbie Guide
xinha_config = xinha_config ? xinha_config() : new Xinha.Config();
xinha_config.baseHref = document.location.href.replace( /^(https?:\/\/[^\/]*)(.*)/, '$1' );
/*
vielleicht stimmt die regex auch nicht, mach mal
alert(xinha_config.baseHref );
und prüfe ob genau http://www.xy.de herauskommt
*/Wenn es immernoch nicht klappen sollte, bin ich gern bereit mal einen blick auf deinen code zu werfen
At the moment you have to specify xinha_config.baseHref for stripBaseHref to work, which is what you want. This is scheduled for change in the next release, but till then, best put this piece of code in your config
xinha_config.baseHref = document.location.href.replace( /^(https?:\/\/[^\/]*)(.*)/, '$1' );Unfortunately this is a bit of a struggle, because it is done by the browsers.
Have a look at these config variables that deal with this issue:
xinha_config.expandRelativeUrl
xinha_config.baseURL
xinha_config.stripBaseHref
xinha_config.stripSelfNamedAnchors
Just add
.htmlarea {
border:none;
}to your styles
What I meant is in this version you have to do this step from the newbie guide
// THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING :)
if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;because it loads important parts of the code.
This has been changed in the meantime and will be no different in the next release.
You should really update to the latest revision (we are already 30 revisions in front)!
In the version you use you have to call Xinha.loadPlugins(), even if you don't have any plugins.
(That was a misconception from my side, sorry )
Leave out the doctype definition (=>quirksmode), and wonder!
Google "ie overflow quirksmode"
I also noticed that xinha doesn't init properly - all the buttons are greyed out - when I click the greyed out buttons, I get "this.getParentElement is not a function"
seems to be sth wrong with your files, try an update
Why do you want to have two editors when you always want only one visible?
You don't have to attach xinha_init to window.onload but call it anytime you want. After editing is done, you just display:none the div and show it again next time with other content.
You can set the content with the method setHTML() like
var newHtml = "some HTML";
xinha_editors.myTextArea.setHTML(newHtml);and you pull it out with
var editor = xinha_editors.myTextArea;
var editedHTML = editor.outwardHtml(editor.getHTML());Important: It will not work to create Xinha in a <div style="display:none">, but you can hide and show it at will once generated.
Each array you want to index with string keys should be an Object.
Nevermind, this happens to every php-coder ![]()
Just googled a bit and found it to be a practice to use Arrays as associative arrays, but as your example shows it's no good practice!
Hi, had a look at your code now and found the error
Change
tmpIconArray = new Array();and the other instances of new Array() to
tmpIconArray = new Object(); // you don't want to use an "Array" hereor easier
tmpIconArray = {}; //this is the same as new Object()var array = ['value1','value2'];
var associativeArray = {'key1':'value1','key2':'value2'};(Just to show the difference)
Why it behaved differently with and without Xinha, I don't know ![]()
In your example XinhaCore.js is not loaded (404)
It's really simple: It does not more than what would happen with an HTML submit button. The data of the form is sent to the URL defined in the action attribute of the form. Any further action is up to the server-side script.
Just checked this out. seemed to work in "both" browsers
If I get you right you want to load new contents in the editor. If that's the case, you don't have to insert a whole new textarea in the page. Use the Xinha method setHTML() instead.
var newHtml = "some HTML";
xinha_editors.myTextArea.setHTML(newHtml);If the anchor is in the same page, it should show up in the Linker plugin. If it doesn't theres sth wrong
please give more details. see http://xinha.gogo.co.nz/punbb/viewtopic.php?id=899
Especially:
* have you checked the parameters in plugins/ImageManager/config.inc.php
* does this occur if you switch to HTML mode and back to wysiwyg
Are you using Firefox? There are some nice extensions (e.g. FireBug) that help analysing problems like this. I'm still of the opinion that there is a problem with the paths
Ok I think there is nothing more at this point I can say without seeing the actual installation, sorry ![]()
Let's say you have:
www.domain.com/administration/page.html
www.domain.com/administration/xinha/XinhaCore.js etc.
Then it would be
<script type="text/javascript">
_editor_url = "/administration/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
</script>
<script type="text/javascript" src="/administration/xinha/XinhaCore.js"></script>It's also advisable to use the form /path/from/webroot/to/file/ (with leading slash)
Enter ~/Administration/xinha/XinhaCore.js in your location bar. Is the file found?
Otherwise if you have this page online, I could look at it. usually its just a simple error...
Seems XinhaCore.js is not loaded.
Is suppose this path is wrong
<script type="text/javascript" src="~/Administration/xinha/XinhaCore.js"></script>
as it doesn't correspond with this
_editor_url = "/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed