Announcement

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

#176 User Discussion & Help » FYI: new documentation effort » 2007-04-19 19:59:00

ray
Replies: 0

You can view the generated documentation at
http://xinha.raimundmeyer.de/JSdoc/Xinha/
or, for those with deeper interest in Xinha internals
http://xinha.raimundmeyer.de/JSdoc/XinhaWithPrivates/

I ask anybody who can to improve this!

Obviously file size hase increased considerably through the inline documentation, so I want to point out the existence of the compression script in contrib/comression.php.

#177 Re: User Discussion & Help » How to modify a Xinha textarea's value with Javascript ? » 2007-04-16 12:45:51

ray
<script language="javascript">
    function change_risk(valeur) {
      var reg = new RegExp("<font color=(\"|\')#[0-9a-fA-F]{6}(\"|\')>","gi");
    
     // the below retrieves the Xinha content and stores it in the variable html; now you can do things with it
      var html = xinha_editors.vulnerability_name.outwardHtml(xinha_editors.vulnerability_name.getHTML());
      // change it 
      html = html.replace(reg,"<font color='" + valeur + "'>");
      
      // then put it back in the editor
      xinha_editors.vulnerability_name.setHTML(xinha_editors.vulnerability_name.inwardHtml(html));
      
      // this does nothing, because the editor area is independent from the textarea
      //document.form.vulnerability_name.value = document.form.vulnerability_name.value.replace(reg,"<font color='" + valeur + "'>");
    }  
</script>

#178 Re: User Discussion & Help » How to modify a Xinha textarea's value with Javascript ? » 2007-04-16 10:46:49

ray
var html = xinha_editors.yourEditor.outwardHtml(xinha_editors.yourEditor.getHTML());
// do something with it 
xinha_editors.yourEditor.setHTML(xinha_editors.yourEditor.inwardHtml(html))

#179 Re: User Discussion & Help » How to modify a Xinha textarea's value with Javascript ? » 2007-04-16 10:30:19

ray
var html = xinha_editors.yourEditor.outwardHtml(xinha_editors.yourEditor.getHTML());
// do something with it 
xinha_editors.yourEditor.setHTML(xinha_editors.yourEditor.inwardHtml(html))

#180 Re: User Discussion & Help » scroll to... » 2007-04-16 10:21:43

ray

you have access to the document object inside the iframe through the Xinha object property

var doc = xinha_editors.myTextArea._doc; // get a grip on the document
var element = doc.getElementsByTagName('p')[5]; //get some element
xinha_editors.myTextArea.scrollToElement(element); // use one of the many built-in secret magic functions :)

#181 Re: User Discussion & Help » Add In Spell Checker » 2007-04-11 18:53:42

ray

You might have to use a version from the svn (or the nightly)

#183 Re: User Discussion & Help » Limited to 1024 characters » 2007-04-10 17:40:38

ray

or get the latest version of char-counter.js from the svn, which does not contain this limit anymore by default and offers a standard Xinha.Config parameter for setting the limit
see http://xinha.python-hosting.com/ticket/1003

#184 Re: User Discussion & Help » Limited to 1024 characters » 2007-04-10 17:11:21

ray

As I guess, you have installed the CharCounter plugin. Please try it without

#185 Re: User Discussion & Help » can I tell xinha to make a local copy of pictures added in xinha » 2007-04-09 18:54:36

ray

No, that functionality is not yet part of Xinha, but this seems not too hard to implement as a plugin. If I find the time, I will try and do it in the next days

#186 Re: User Discussion & Help » Lot's of LFs and tabs -> getHTML() » 2007-04-04 09:07:49

ray

It's fixed in changeset 807. Look at line 4140, it's using Xinha's own String.prototype.trim() function

#188 Re: User Discussion & Help » Attention translators » 2007-03-30 04:34:39

ray

There's a script (contrib/lc_parse_strings.php) that parses the js files and creates empty language files, this would have to be extended to sync the existing ones and, as I said, a nice interface (form)

#189 Re: User Discussion & Help » Textarea Data doesn't get submitted? (using PHP) » 2007-03-29 11:47:59

ray

is $_POST['content'] not set at all, or does it just not contain the edited content? Does it work with aplain textarea?

#190 Re: User Discussion & Help » Attention translators » 2007-03-28 17:04:17

ray

some php tool with UI would be cool smile

#191 Re: User Discussion & Help » Wrong link with ExtendedFileManager » 2007-03-28 16:56:25

ray

Hello sir_qwerty,

it looks like you have not set

$IMConfig['images_url']

Also, if want to use relative links, you have to set

xinha_config.expandRelativeUrl = false;

#192 Re: User Discussion & Help » Need some advice on module customizing » 2007-03-28 04:35:47

ray

Sounds like you are working on the compressed file, that's of course a tough job wink

You should check out the svn repository ( http://svn.xinha.python-hosting.com/trunk/ ) or download the nightly from the downloads page to get the indented code with the real variable names. It's not not well commented though, but if you once have understood how it works, it's not overly complicated

#194 Re: User Discussion & Help » Tab Key » 2007-03-27 18:04:03

ray

Just incidently found this, which does work like a tab (     actually is a tab)

<p>Text<span style="white-space:pre">    </span>Text</p>

EDIT: the empty space above is the numerical entity for the tab character which is &_#9; without the _ (don't know how to enter it smile)

#195 Re: User Discussion & Help » Need some advice on module customizing » 2007-03-27 16:20:17

ray

plugins/ExtendedFileManager/assets/manager.js around l. 50

There's a variable called offsetForInputs that's does the job

#197 Re: User Discussion & Help » prototype library submission » 2007-03-27 09:23:21

ray
function submitForm(myForm,message,serverScript,reloadContent)
    {
             document.getElementById(myForm).onsubmit(); // you have to trigger this manually, it copies the content of Xinha in the textarea
        var options = {
            method : 'post',
            parameters : Form.serialize(myForm),
            onSuccess : alert(message)
        };
        new Ajax.Request(serverScript, options);
        doSubNav(reloadContent,'content');
    }

OK, it missed that the argument myForm is a string (as opposed to a DOM object), sorry. Please try this one

#198 Re: User Discussion & Help » Disabling buttons » 2007-03-26 13:14:22

ray

The button status is updated (and thus enabled) by updateToolbar() all the time

Dirty hack: define a context for the buttons that never occurs

xinha_config.btnList.about[4] = 'del';

This would be the clean way, a plugin the disables the respective buttons on each cycle

function DisableButtons(editor) {
    this.editor = editor;
}

DisableButtons._pluginInfo = {
  name          : "DisableButtons",
  version       : "1.0",
  developer     : "Xinha Core Developer Team",
  developer_url : "http://xinha.org",
  c_owner       : "Xinha community",
  sponsor       : "",
  sponsor_url   : "",
  license       : "Creative Commons Attribution-ShareAlike License"
}
Xinha.Config.prototype.btnsToDisable =
[
    'about','formatblock','fullscreen'
]

DisableButtons.prototype.onUpdateToolbar = function()
{
    for (var i =0; i<this.editor.config.btnsToDisable.length;i++)
    {
        this.editor._toolbarObjects[this.editor.config.btnsToDisable[i]].state("enabled", false);
    }
}

#200 Re: User Discussion & Help » Need some advice on module customizing » 2007-03-26 11:30:23

ray

Short answer: the popup is plugins/ExtendedFileManager/manager.php, the code that inserts the image/link is to be found in plugins/ExtendedFileManager/extended-file-manager.js

If you have any further questions (and I'm sure you will smile ), ask and I will try to do my best to help

Board footer

Powered by FluxBB