You are not logged in.
It works (witout the ContextMenu plugin unfortunatly)
Hi all!
Does the MathML plugin for Xinha really exist?
good question, it's not on the author's homepage anymore
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
I have filed this as Ticket #870
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();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} );Hi jou,
as far as I have read here in the forum this is not so easily possible.
Check your other post, though.
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.
Sadly it's not working indeed.
http://xinha.python-hosting.com/ticket/543
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?
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
easiest would be to call document.myform.onsubmit() which writes the contents of the editor back to the textarea
Xinha puts the data back to the textarea on submit. What's then happening is up to the browser.
If you don't want to use svn, just post your patch in the ticket system.
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.
(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
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;
}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
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?
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.
* 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?
* It would be fantastic to be able to MOVE files beween folders using EFM.
Interesting Idea, create a ticket
* 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
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.
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.
Have a look at the post near yours. There may be answers to discover.