Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#226 Re: User Discussion & Help » using <script src=""> in edit area » 2007-03-02 14:56:25

ray

The editor area is an iframe, thus a different window, thus js in the main window is not available inside

#227 Re: User Discussion & Help » IE and insertNodeAtSelection » 2007-02-28 09:49:10

ray

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

#229 Re: User Discussion & Help » Changing default Textarea style » 2007-02-25 20:08:43

ray

To change the behaviour of unshifted enter, in Mozilla set xinha_config.mozParaHandler = "built-in". In IE there is now way to change this.

#231 Re: User Discussion & Help » Xinha doesn't run with own files » 2007-02-23 22:09:56

ray

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 sad

#232 Re: User Discussion & Help » Xinha doesn't run with own files » 2007-02-23 14:53:48

ray

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>

#234 Re: User Discussion & Help » getElementById on elements inside Xinha » 2007-02-22 07:53:03

ray

Are you using FireBug? You should, it's a must for js development and could have answered your questions within a few clicks smile

#235 Re: User Discussion & Help » HTML tags. » 2007-02-22 07:39:39

ray

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.

#236 Re: User Discussion & Help » HTML tags. » 2007-02-22 07:29:41

ray

Well, pasting from Word is always a pain sad

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

#238 Re: User Discussion & Help » xinha not working in a jsf application » 2007-02-21 11:24:58

ray

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);
  }
}

#239 Re: User Discussion & Help » xinha not working in a jsf application » 2007-02-21 08:01:54

ray

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

#240 Re: User Discussion & Help » HTML tags. » 2007-02-21 07:22:02

ray

No, certainly you can use all sorts of tags and HTML versions (valid markup, of course).

Speficically, which are the problems you're experiencing?

#242 Re: User Discussion & Help » Plugin adds custom submit event » 2007-02-19 11:19:47

ray

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

#244 Re: User Discussion & Help » ExtendedFileManager Standalone / Independent EFM - delete trash files? » 2007-02-16 17:59:05

ray

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 smile

#246 Re: User Discussion & Help » ExtendedFileManager Standalone / Independent EFM - delete trash files? » 2007-02-16 16:22:43

ray

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)

#247 Re: User Discussion & Help » Dtds » 2007-02-16 10:17:22

ray

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

#249 Re: User Discussion & Help » all buttons stay gray » 2007-02-16 07:13:01

ray

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?

#250 Re: User Discussion & Help » Change Addition Process » 2007-02-15 21:08:25

ray

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

Board footer

Powered by FluxBB