You are not logged in.
Pages: 1
Anyone knows of any similar open source development like helene? I remember seeing one before which gives have separate version of IE and Firefox... but I can seem to find it now.
I did encounter a similar problem when I try to strip down the codes in full_example-body.html.
If I remember correctly, the culprit is this line of code "<script src="full_example.js"></script>" somewhere at the bottom.
1. When you try to access the forum through www.xinha.org, I can't seem to be able to login.
2. When you access http://xinha.gogo.co.nz/punbb/ instead of http://xinha.gogo.co.nz/punbb/index.php, you get internal server error. The link without the index.php is found on the main page under :
Have you got a forum?
Yes, ->here it is.
Sorry. I probably missed that email thinking is some spam email cos I get tons of them in my mailbox everyday. ![]()
Here's the tgz of the latest update on the plugin including the helene files.
FF as in firefox? The version in the svn is actually better for firefox, but introduces some problem on the IE when you have very long text.
Hey thanks! I'm sure is pretty useful for those who want to replace with ya icons if xinha cannot put them with the main distributor in case of copyright issues.
Hi! Wonder if you can generate a tar.gz of all the icons, so anyone who wants to use it can just take the package and unzip into the original xinha folder. ![]()
PS : A CharacterMap and SuperClean plugin icon for me please
Thanks
This should fix the bug for IE:
CharacterMap.prototype.buttonPress = function(editor) {
var sel = editor._getSelection();
var range = editor._createRange(sel);
if (HTMLArea.is_ie) {
if (!editor._iframe.contentWindow.document.body.createTextRange().inRange(range)) editor.setMode("wysiwyg");
}
editor._popupDialog( "plugin://CharacterMap/select_character", function( entity )
ok. I've uploaded a screenshot of the bug
This is seriously tempting me to try and figure out code shielding just to get it done and usable hehe.
Aside from that, does anyone know how easy it is to change/add tags for Helene to work with? One thing I'd like to do for my personal use is swap <?php and ?> for [php] and [/php] to go with my template system.
You should be able to modify it to ya own custom tags inside highlight.js. Search for "php end" in the file and there's the regular expresession which define the end tag, and few lines down, is the start tag. Hope that helps.
I've update to toggle btw the 3 modes and handling of the fullscreen resize in the original code above.
Any idea why I need to explicately call the updateToolbar?
I'll check on the fullscreen plugin to see what's required.
Currently it toggles btw the wysiwyg mode and the helene editor mode. I'm looking at allowing to cycle btw wysiwyg, standard textarea mode and helene editor mode.
Uploaded to my old server at home, please be gentle on this cos is just on a celeron with 64mb on linux. ![]()
http://www.netsingapore.com/xinha/examp … -body.html
Sorry, missed out a piece of code while copy and pasting. Here's the missing definition. Updated the code above with the missing fragment as well. Anyway, I'm just started looking at xinha only few days ago, so a lot are written from copy and pasting codes from the existing plugins available, so they are probably not implemented correctly in some areas. So some pointers and help to improve this from the experienced developers here would be greatly appreciated.
Helene.prototype.onGenerateOnce = function()
{
var editor = this.editor;
var fr = document.createElement('iframe');
fr.style.backgroundColor='window';
fr.style.display = 'none';
fr.src = _editor_url + "plugins/Helene/editor.html";
editor._textArea.parentNode.insertBefore(fr, editor._textArea );
editor._helene_iframe = fr;
}
The above was created in a folder Helene inside plugins, with all the helene files inside there as well. Hope some experts could help improve this.
Thanks. It works... I've sort of got it working here... here's the code I've written. Wonder if you can tell me where i'm doing something not correct. I'll be trying to make it 3 state, so it will be able to go to the default textmode, currently it does not.
function Helene(editor)
{
this.editor = editor;
editor.config.registerButton('helene', Helene.I18N.tooltip, editor.imgURL('ed_helene.gif', 'Helene'), true, function(e) { e._helene(editor); });
var helene = this;
editor.getHTML_pre_helene = editor.getHTML;
editor.getHTML = function() { return helene.getHTML(); }editor.setInnerSize_default = editor.setInnerSize;
editor.setInnerSize = function(width,height) {helene.setInnerSize(width,height);}editor.isActive = false;
// See if we can find 'htmlmode' and replace it with helene
var t = editor.config.toolbar;
var done = false;
for(var i = 0; i < t.length && !done; i++)
{
for(var x = 0; x < t[i].length && !done; x++)
{
if(t[i][x] == 'htmlmode')
{
t[i][x] = 'helene';
done = true;
}
}
}if(!done)
{
t[t.length-1].push('helene');
}
}Helene._pluginInfo =
{
name : "Helene",
version : "0.5",
developer : "",
developer_url: "http://helene.muze.nl/",
c_owner : "",
license : "htmlArea",
sponsor : "",
sponsor_url : ""
}Helene.prototype.onGenerateOnce = function()
{
var editor = this.editor;
var fr = document.createElement('iframe');
fr.style.backgroundColor='window';
fr.style.display = 'none';
fr.src = _editor_url + "plugins/Helene/editor.html";
editor._textArea.parentNode.insertBefore(fr, editor._textArea );
editor._helene_iframe = fr;
}
HTMLArea.prototype._helene = function(editor)
{
var editor = this;
if (this._editMode == 'wysiwyg')
{
// wysiwyg -> helene
var D = this.getInnerHTML();
this.setMode();
editor._textArea.style.display = 'none';
this._helene_iframe.style.display = '';
this._helene_iframe.style.width = editor._innerSize.width + "px";
this._helene_iframe.style.height = editor._innerSize.height + "px";
this._helene_iframe.contentWindow.init();
this._helene_iframe.contentWindow.setContents(D);
editor.isActive = true;
} else {
if (editor.isActive)
{
// helene -> textmode
this._helene_iframe.style.display = "none";
this._textArea.style.display = '';
this._textArea.value = this._helene_iframe.contentWindow.getContents();
this._textArea.focus();
} else {
// textmode -> wysiwyg
this._helene_iframe.style.display = "none";
this.setMode();
this._iframe.contentWindow.focus();
}
editor.isActive = false;
}
editor.updateToolbar();
}
Helene.prototype.getHTML = function()
{
if(this.editor.isActive) return this.editor._helene_iframe.contentWindow.getContents();
return this.editor.getHTML_pre_helene();
}
Helene.prototype.setInnerSize = function(width,height)
{
this.editor.setInnerSize_default(width,height);
if (typeof this.editor._helene_iframe != "undefined" && this.editor._helene_iframe.style.display != "none")
{
this.editor._helene_iframe.style.width = width + "px";
this.editor._helene_iframe.style.height= height+ "px";
this.editor._helene_iframe.contentWindow.document.getElementById('codeframe').style.height = height+ "px";
this.editor._helene_iframe.contentWindow.document.getElementById('linenumbers').style.height = height+ "px";
}
}
Do I have to do anything after I do a setMode to disable all the buttons not relevant to textmode?
I do a setmode, and the button do not get disabled until I click on one of them.
When the window is resized, the stylist plugin panel does not reposition itself, neither does the wysiwyg frame.
How do I add an iframe?
I believe i should add this inside : function Helene(editor, args)
Try creating an iframe using
var fr = document.createElement('iframe');
fr.style.backgroundColor='window';
fr.src = _editor_url + "plugins/Helene/editor.html";
But not sure where to add this...
Anyway, I'm still fiddling around...
I sort of manage to add the iframe only within HTMLArea.prototype._helene = function(opts, obj), but I've got problems accessing the functions defined within the iframe, though I've no problem setting the style.width and height of the iframe, which means I should be accessing the correct iframe object.
Cool... let me see if I can figure it out... ![]()
PS. : If anyone interested in volunteering his service, ya help is great appreciated. ![]()
Without modifying the htmlarea.js, how can we update back the _textarea.value when the form is submitted? Is it possible to override the onsubmit event?
ok. i've put in a bug, but not sure how i can attach a screenshot.
Been looking at the code for a day or two....
my guess the plugin will need to do something similar to HTMLArea.prototype.setMode ?
Do we need to define a new state, or is fine this work under wysiwyg?
hmm.... the wysiwyg mode is using an iframe? So I should make use of this iframe for the source editor or better to define another iframe instance?
Some pointers might be helpful for me to see if i can come out with something.
Is it doable without modifying htmlarea.js?
Using Internet Explorer 6.0 . Firefox does not seem to exhibit this problem.
I'm trying it out with the full-example.html, insert by clicking on the "Insert special character" icon.
Hope that helps. Do you still need me to submit a separate ticket for this bug?
BTW, I've using the nightly download version about 2 - 3 days back.
If nothing is selected in the text area (eg. try click on the top corner of the menu bar without clicking on the button), and when you try to insert a special character, it will get inserted outside the text area.
Wonder if it is doable to replace the default html editor with helene (http://helene.muze.nl/) or if not, implement it like a plugin?
Pages: 1