Announcement

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

#376 Re: User Discussion & Help » Firefox 2.0 support - Has this been tested? » 2006-10-31 19:15:25

ray

It works (witout the ContextMenu plugin unfortunatly)

#377 Re: User Discussion & Help » MathML plugin » 2006-10-31 08:51:40

ray
BeeVee wrote:

Hi all!

Does the MathML plugin for Xinha really exist?

good question, it's not on the author's homepage anymore

#378 User Discussion & Help » New plugin: SmartReplace (a little advertising) » 2006-10-29 21:27:26

ray
Replies: 1

One irritating thing with text processing is the total absence of some typographic essentials on the keyboard -- "real" (typographic) quotes and the dash, typically miss-typed as inch or second sign (") and the hyphen (-).

This plugin lends the good old Word behaviour to Xinha, as ",', and - get converted to their respective typographic correct relatives while typing.

Configuration (to change the quote style from default English):
  * through language file
  * through a config variable
 
Additional config option:
  * disable automatic replacement by default
 
Additional features:
  * can be switched on/off
  * convert all quotes/dashes in a document that still has the boring  "/- stuff

#380 Re: User Discussion & Help » Refresh editor or kill old editor to reinitialize a new one. » 2006-10-19 14:39:52

ray

I did something like this, too, and there was no problem (if I remember right).

What do you mean with refresh? Is the editor not working when you show the tab? maybe you have to do sth. like this:

var editor = xinha_editors.myEditorId;
editor.deactivateEditor();
document.getElementById('edit').style.display = 'block';
editor.activateEditor();

#381 Re: User Discussion & Help » Parsing Xinha content onload. » 2006-10-18 04:24:53

ray

This sounds as you should process the text in the textarea before loading xinha.

Otherwise, try including this in xinha_init(), after   HTMLArea.startEditors(xinha_editors);

xinha_editors.myTextArea.whenDocReady(function() {any operations that need loaded editor} );

#382 Re: User Discussion & Help » unload Xinha » 2006-10-17 05:25:23

ray

Hi jou,
as far as I have read here in the forum this is not so easily possible.
Check your other post, though.

#383 Re: User Discussion & Help » InsertWords plugin: dynamically setting the dropdown list » 2006-10-17 05:21:58

ray

Hi juo,
add this function to insert-words.js

InsertWords.prototype.newValues = function (id,newValues) {
    var elem = this.editor._toolbarObjects[id].element;
    while (elem.length > 1)
    {
        elem.options[1] = null;
    }
    for (var i in newValues)
    {
        var opt = new Option(i,newValues[i]);
        elem[elem.length] = opt;
    }
}

Call it for example by something like this:

<a href="javascript:void(0);" onclick="xinha_editors.myTextArea.plugins.InsertWords.instance.newValues('IW-id0',{option1:'text1',option2:'text2'});">New Options</a>

xinha_editors.myTextArea (replace myTextArea with your editor id) is the editor object, supposed you use the xinha_editors array.
The first parameter is the internal id of the dropdown. If you have more than one, change the number.

#385 Re: User Discussion & Help » Get content with Xinha » 2006-10-13 05:35:51

ray

The Xinha object has the method getHTML() to retrieve the content of the editor.

var editor = xinha_object; // e.g. xinha_editors.myxinhatexterea if you use the xinha_objects array or __htmlareas.indexNumber
var html = editor.outwardHtml(editor.getHTML()); //editor.outwardHtml() does some needed changes to the raw HTML from getHTML()

What exactly do you want to do?

#386 Re: User Discussion & Help » Independent EFM Use? » 2006-10-12 20:24:13

ray

Basically I have created a subset of HTMLArea with only the functions like _lc() etc. that were used, and stripped all stuff that was related to click a file and return a path.
This was only a proof of concept  though, I'd like to mention

#387 Re: User Discussion & Help » Get content with Xinha » 2006-10-12 14:30:10

ray

easiest would be to call document.myform.onsubmit() which writes the contents of the editor back to the textarea

#388 Re: User Discussion & Help » Save data from submit? » 2006-10-11 06:19:40

ray

Xinha puts the data back to the textarea on submit. What's then happening is up to the browser.

#389 Re: User Discussion & Help » Xinha and permission folder Image » 2006-10-11 06:13:54

ray

Hi,
if your CMS is using php, you can easily set the folders for each user either in config.inc.php or see here

#390 Re: User Discussion & Help » Developers Developers Developers » 2006-10-09 12:53:57

ray

If you don't want to use svn, just post your patch in the ticket system.

#391 Re: User Discussion & Help » Clear All Text Fields & Text Areas JS (Xinha Editor Doesn't Clear?) » 2006-10-08 19:32:50

ray
rburko wrote:

When I included the code exactly as you have it, I got the error:
Missing } after function body

Sorry for the mistake

xinha_editors is an array that holds the ids of the textareas that shall be turned to editors and is used in the sample config that is proposed here http://xinha.python-hosting.com/wiki/NewbieGuide
As you didn't write anything about how you create the editors, I was referencing to that.

rburko wrote:

(I’m not sure if it makes a difference, but I have things setup so that Xinha effects every textarea that appears on the page.)

Ok, you seem to do it differently, no matter, there are other ways.

/* This function empties all editors in the page */
function clearAllEditors () {
   for (var i=0;i<__htmlareas.length;i++) { //__htmlareas contains all editors
       __htmlareas[i].setHTML('');  //set the contents of the respective to nothing
   }
    return false;
}
/* This function empties all editors in a form specified by its name */
function clearEditors (formName) {
   for (var i=0;i<__htmlareas.length;i++) {
       if (__htmlareas[i]._textArea.form.name == formName) {
          __htmlareas[i].setHTML('');
        }
   }
   return false;
}
/* Combined with your function to wipe outthe whole form */
function clearall (formName) {
   var f = document.forms[formName];
   var len = f.elements.length;
   var i=0;
   for( i=0 ; i<len ; i++) {
     if (f.elements[i].type=='text' || f.elements[i].type=='textarea') {
       f.elements[i].value='';
     }
   }
   
   for (var i=0;i<__htmlareas.length;i++) {
     if (__htmlareas[i]._textArea.form.name == formName) __htmlareas[i].setHTML('');
   }
   return false;
}
/* name is not allowed for forms in XHTML 1.0 strict, so you may have to use id instead*/
function clearall (formId) {
   var f = document.getElementById(formId);
   var len = f.elements.length;
   var i=0;
   for( i=0 ; i<len ; i++) {
     if (f.elements[i].type=='text' || f.elements[i].type=='textarea') {
       f.elements[i].value='';
     }
   }
   
   for (var i=0;i<__htmlareas.length;i++) {
     if (__htmlareas[i]._textArea.form.id == formId) __htmlareas[i].setHTML('');
   }
   return false;
}

Hope you find the right for your use

#392 Re: User Discussion & Help » Clear All Text Fields & Text Areas JS (Xinha Editor Doesn't Clear?) » 2006-10-07 20:06:29

ray

The problem is that that Xinha runs somewhat independly from the textarea. You would have to check if the textarea is a Xinha area, for example:

function clearall (f) {
    for(var i=0 ; i<f.elements.length ; i++) {
    if (f.elements[i].type=='text' || f.elements[i].type=='textarea') {
        f.elements[i].value='';
        if (typeof xinha_editors[f.elements[i].id] != 'undefined') {
          xinha_editors[f.elements[i].id].setHTML('');
        }
    }
    return false;
    }

#393 Re: User Discussion & Help » Run Xinha plugin automatically? » 2006-10-06 17:07:20

ray

It's possible to make EFM run standalone with relatively little effort (as koto mentioned in the other post)
Just to give you a start I played around with it a little bit. Check this out http://raimundmeyer.de/xinha/EFM_standalone.zip
You have to assign _editor_url in assets/popup.js which is the path of the directory (just for convenience in this file as it is loaded in every window).
Just open manager.php
Obviously this works in link mode all the time

#395 Re: User Discussion & Help » Can't get Xinha to fit my site's looks. » 2006-10-02 18:59:08

ray

Well, it's still in IE, and it has been in Mozilla, too. I've checked it with xinha rev 1. I dont't know when and why it changed?

#396 Re: User Discussion & Help » Upload problem with EFM 1.1.1 » 2006-09-29 10:08:47

ray

Standard setting for upload_tmp_dir is NULL. php then uses the servers standard tmp directory

upload_tmp_dir  string

    The temporary directory used for storing files when doing file upload. Must be writable by whatever user PHP is running as. If not specified PHP will use the system's default.

from http://www.php.net/manual/en/ini.core.php

#397 Re: User Discussion & Help » How do I get EFM to work with files as well as images? » 2006-09-29 08:18:27

ray
mjpg wrote:

* If you upload a file, the JS alert has odd extra characters:
File "$file=filename.ext$" sucessfully uploaded.

Hmm, this should actually be replaced. Did you also update htmlarea.js?

mjpg wrote:

* It would be fantastic to be able to MOVE files beween folders using EFM.

Interesting Idea, create a ticket

mjpg wrote:

* URL is corrected inserted in the <a href as "http://www.domain.com/downloads/filename.ext" BUT shown in the EFM dialog as "/filename.ext". It would give reassurance if it were "/downloads/filename.ext".

Not such good idea imho, because it it is not in every case desirable that the user knows about the complete path

#398 Re: User Discussion & Help » How do I get EFM to work with files as well as images? » 2006-09-28 19:17:46

ray

There has be somewhat of a development In EFM, there is now a separate setting for the files directory which is $IMConfig['files_dir'].
Though it results in  a certain backwards incompatibility, it seemed advisable as it allows complete configurability from config.js which in turn faciliates the updating process.
There are also a bunch of other new options, so have a look at config.inc.php and the included readme file which provides instructions about the new frontend config system.
Sorry for any inconvenience.

As to the button problem: no, you don't have to add buttons from plugins to your custom toolbar. They appear on their own and are added by the plugin to whichever toolbar provided.

#399 Re: User Discussion & Help » using config.hideSomeButtons » 2006-09-26 06:30:22

ray
dlst wrote:

This makes sense, since I'm overriding the buttons being generated.

No, normally the plugins just add their buttons to the toolbar

If it doesn't work as expected, there seems to be a different  error.
If you post your config we can have a look at it and maybe spot the error.

#400 Re: User Discussion & Help » Empty Text Area = <p> </p> » 2006-09-22 09:51:43

ray

Have a look at the post near yours. There may be answers to discover.

Board footer

Powered by FluxBB