You are not logged in.
Yep. If you do find that you've indented a bunch of stuff that didn't need to be (I have a bad habit of that because I have jedit set to convert tabs to spaces on save) then
svn diff --diff-cmd /usr/bin/diff --extensions '-bc' filename.herehelps root out the actual changes so you can reapply them to a clean copy.
It's a known bug in Gecko (I reported it a while ago).
In Xinha, what you want to do is issue a deactivateEditor() when (before) hiding and actiateEditor() when restoring (after showing), these are methods of the editor object you create. In HTMLArea you'll have more of a problem.
Basically, any time you are changing the style, be it directly, or inherited, of the iframe containing the editor, the safe way is to deactivate, change the style, activate, otherwise Moz will throw a hissy fit more often than not.
If you do that, please don't check browser version (navigator.userAgent). Not many people know of (or at least use) this technique, but JavaScript allows the developer to check if some capability exists at runtime. This is both safer and browser-friendlier
The problem is that the API we use is not a standard at all it was something MS came up with and Moz *almost* copied a few years back, between IE and Gecko however it's somewhat different (contentEditable vs designMode for one) and buggy. Theres no way of knowing what, if any, API KHTML, or Opera (or any other browser) will come up with to allow for HTML editing before time, it's just not a standard and thus an't be predicted.
We also must know the browser version in order to fix broken functionality, or even to know what functionality to expect, or what variables with the same names actually represent (IE and Gecko sometimes use the same name but different values). Additionally, particularly in IE, some functionality is exposed but it either doesn't work or doesn't work all the time (I'm specifically thinking of set/getAttribute DOM methods here).
I agree for DOM standard stuff, checking for functionality (or better inserting missing functionality into prototypes ourself (where possible, IE is not complete in that regard)) is better than sniffing, but in some cases it is still necessary to sniff.
It's impossible for me to load
http://xinha.gogo.co.nz/xinha-nightly/e … ample.html
with Firefox 1.0 and Windows XP SP1. It ends with a timeout and the little buttons are not loaded.
With IE there is no problem.Rudi
How about the latest releas example - http://xinha.gogo.co.nz/xinha-latest/ex … ylist.html
Do you get any Javascript errors in the console when trying the nightly?
{{module_name?key1=value1&key2=value2&key_N=value_N}}
Images are nicer, I could even use gd library to display the name of the module that is being loaded...
I'd definately like to see this implemented, should I add a ticket then?
Hmm, I think this would be a pretty specific implementation rather than a general-use plugin? If you want to have a go at creating a plugin though it's quite easy, a good one for example might be the Linker plugin.
It see how stylesheets are added from plugins, but I haven't found a good example of how to include a new javascript file from a plugin. loadScript doesn't seem to fit the bill or am I missing something?
Try the HTMLArea._loadback() function, it will load a javascript file and hit a callback when it's done (so you can set a ready flag in the plugin for example).
Should general questions about bugs go here or in the trac?
Trac, so we can track them ![]()
div.htmlarea-context-menu tr.item td.icon img {
width: 18px;
height: 18px;
}Commenting out the width and height causes the images to show up, but I'm afraid I don't why. Is it possibly that this style is scaling the ed_buttons image down to 18x18 before the viewport code is applied?
That'll be it!
You want to commit that?
NB: Before you commit do a diff on the file to make sure that there are unnecessary changes (indentation changes etc) lest we end up with huge changesets for no reason.
For a number of reasons I don't think that floating menus will ever work 100% fine wit IE. What about putting the plugin options as a submenu out of the context menu?
Basic things should be at the toolbar, but things people use time to time could perfectly be in the context menu.
Mmmm. Typically you would only put "shortcuts" to actions in a context menu, everything you can do in the context menu should be available additionally in a visible way (toolbar/menu/...).
By this example, Xinha is a software tool, mostly for web developers . Is that more-or-less the scope of the project?
Yeesssss. Probably it helps if you know html to understand what Xinha is. Basically it replaces <textarea> tags, like the one you wrote your forum posts in, with a graphical editor allowing you to for example just press the "bold" button after highlighting foobar rather than writing <bold>foobar</bold>.
It doesn't have any file loading/saving capability, nor any capability oter than providing a graphical means to markup HTML.
Best you see the examples page: http://xinha.gogo.co.nz/cgi-bin/trac.cgi/wiki/Examples
Hi all,
as you know, most plugins insert buttons or drop-downs into the toolbar. As it stands it's not particularly great, for example, loading the CSS plugin will insert a bunch of drop downs into the toolbar, which more likely than not will break out of the toolbar and look terrible.
So what can we do about this, we need a better way of allowing plugins to insert items into the toolbar without breaking it. I think we need to firstly edit the plugins so that they only auto-insert into the toolbar if the end developer hasn't already inserted the relevant items into the toolbar, that would allow end developers to manually tweak the toolbar when plugins are involved.
Apart frm that, which means that developers will have to manually configure the toolbar (if they aren't happy with the initial results, which is quite likely) does anybody have any better ideas? I thought about a dynamic toolbar (using floats, so if the toolbar is smaller then the "row" is wrapped), but experiments with that a couple of years back were not fruitful (worked well in Moz, but as expected IE had some issues which ultimatly meant I gave up on it) - has anybody tried that with more success?
Hey guys. I've been looking through the htmlArea docs that are in our release. I still haven't found a good overview of the software, so i have a few questions.
CMS- google define, best guess, this is a "content management system"? and if so, then give me a definition of that, or a demo site to look at.
Yes, CMS = Content Management System. It's such a broad area, and people have lots of different definitions of it. Some think that CMS means a PHPNuke type site (umm, blogish news/community site), but we refer to it as something wider than that, simply a web browser based system which allows the management of website content (html, images etc).
WYSIWYG Text Area replacement- instead of a user being able to put non formatted plain text into an html text area, Xinha gives the user the opportunity to make the text look nicer.
A normal HTML textarea, just like I'm typing in here, only allows plain text (which could of course be HTML "source code", or any other textual content). Xinha, and other WYSIWYG (almost) allow one to use a more "word processer" type interface to edit (ultimatly) html source code in the textarea, displaying how it will (roughly) look on the site, instead of a whole lot of plain text source code.
Well known example, perhaps the Hotmail mail editor (I think it allows bold etc, been a while since I've used Hotmail
), to, say bold something you hightlight the something and click bold. Behind the scenes the editor writes html code into the textarea, like
<strong>the thing you bolded</strong>the user doesn't know that, and just as well, because most users wouldn't understand it.
That is what Xinha, and other editors do, think of it (almost) as a word processor embedded into your web browser used for editing things that the website developer provides for you to edit.
Thats part of the reason for the new system actually, I didn't want to have the Xinha translations seperate from whatever other translation system (eg gettext) that people were using. Particularly for developers like myself who when it's necessary to do a foreign language job pass of the translation to the client - not need the client to translate things in different ways.
The other reason is that the existing L10n system breaks horribly the instant things get out of sync (when new phrases are added but not translated), what it should do is return the english phrase with a special marker.
Anyway, to answer your question, I havn't fully thought it through yet, but my plan is to have translations passed through a gettext style "_()" function. In addition html dialog files would use l10n tags
<l10n>Some Message</l10n>which get passed through the _() function for translation. And also attribute translation like
<img alt="_(Some Message)" />You can see I have started this in the linker dialog (plugins/Linker/dialog.html).
If you have a look in htmlarea.js, search for "_lc", you will see the new functions in a rudimentary form, but they dont' translate yet. HTMLArea._loadlang needs to be filled in, and I'm not sure about the "context" idea, because I'm not sure how to take the context and from that determine where a language file should be loaded from.
Any suggestions are welcome, it's not set in stone or anything, it's not even set in jelly (the wobbly stuff, jello to the merkins) yet so feel free to completely ridicule the idea if it's seems silly.
Have you ever heard of tinymce (in sourceforge, i've forgotten the url but its easy to find there).
They have an interesting aproach to inline editing.
Hmm, it does sound familiar. I'll hunt it down and have a look later. Anybody else seen it?
I would like to write a quickstart about TortoiseSVN but I'm a german and I learned that one schould only write a helptext in his own language. If you need a german description of TortoiseSVN I will do this after I've made some experineces with this tool.
Sounds good to me! Anything anybody wants to contribute, whatever language, is more than welcome.
I hope no postings will be deleted here and we can write all together on future versions of Xinha.
I'm not a great believe in censorship. As long as nobody gets abusive towards one another or anything, I care not what you write ![]()
I never worked with subversion so what is the best client for windows and where can I get further Information about it.
I think the most widely used Windows client is TortiseSVN, it's quite easy to use - http://tortoisesvn.tigris.org/
Perhaps you would be so kind as to write a "quickstart" page in the Wiki about using TortoiseSVN to checkout the subversion source when you have worked it out, link it off the DownloadsPage if you want, feel free to upload a screenshot to better describe the process ![]()
Other SVN clients are listed at http://subversion.tigris.org/project_links.html
Another important point for me is that I would like to have a 'manager' of the code completion.
Thats me. I'm "leading" the effort, however there are a number of developers who I hope will be contributing. Developers who prove themselves capable and responsible will be given commit access to the subversion repository so they can push thier own changes, and changes submitted by other contributors without my say-so, the list already includes more than me.
In HTMLArea there were a lot of hints and bugfixes but no one said: "this bugfix from you is now included..." or "Please include this in the code and the forum will test it later..." or "This bugfix is tested and was ok it is now in the main-code..."
Thats what the bug tracking ticket system is for. Any bugs you want fixed, any features you think need be implemented, any patches you have to fix bugs, or add features, anything you need to get the primary developers to see really, it all should be submitted as a New Ticket - http://xinha.gogo.co.nz/cgi-bin/trac.cgi/newticket
That way we can all keep track of development and people can easily see what has been done, and more importantly, pick a ticket that they can handle to do. The Trac system (http://xinha.gogo.co.nz/) in general allows you to keep an eye on development process, the "Timeline" feature will give an overview of new things in the Wiki and Subversion Repository (if I had time to dig into the source (in Python) I'd also like to get forum posts in the timeline, who's a Python master here?).
Hi Chris,
I actually have that as a ticket to be looked at sometime in the future.
http://xinha.gogo.co.nz/cgi-bin/trac.cgi/ticket/8
I have a feeling, without investigating, that it would be quite a different task than Xinha is currently equipped for (primarily editing an entire chunk of html) and probably out of the scope of the current project. I do like the concept of "inline editing" though, and it's something Id like to have at my disposal.
You've obviously looked at Mozile in the past, do you know if it shares anything in common with the "Midas" API that we use for htmlarea (which essentially boils down to setting designMode='on' for an iframe with stuff inside and issuing "execCommand" when the user says "bold" etc)? If it does then my quick off the top of my head idea is that it could work and a useful first step would be to make the one toolbar, and plugins (yikes) set able to handle multiple editing areas. As for how that could be done I'm not sure.
Ideas anybody?
NB: Somebody suggested having the one-toolbar-controls-all-editors thing to me before, but I don't remember who off the top of my head ![]()
Good job on choosing to only have 1 forum for a new site. Too often people put up a new site and create 100 forums, thereby fracturing the community and thus preventing community growth.
Great minds think alike there Chris, 1 forum means more perceived traffic
Nothing kills a project quicker than a ghost town.
Thanks for introducing me to PunBB. I have not seen this before. I like the cleanness. I have followed phpBB for years.
Yea, I've used phpBB a good deal before, but frankly it's too heavy, and a big a target for the skript kiddies these days. So I dipped into the freshmeat.net grabbag and chose punbb, it looked nice and clean, simple and reasonably unknown ![]()
I've been looking for an open source project to get into for a while now. This one seems to be a good fit.
I'll see what i can do to convert the documenation over to Xinha.
~Bobb
Welcome aboard Bobb!
but it didn't work at the beginning, because the scan.php searched through my whole www - which is very, very big
...so where can i define the directory - and the other parameters avaliable in scan.php?
The method is something like this, in PHP..
<?php
$basedir = realpath($_SERVER['BASE_DIR'] . '/path/to/wherever') . '/';
$hash = sha1('dir=' . $basedir);
$_SESSION[$hash] = TRUE;
?>
yourEditor.config.Linker.backend = _editor_url + 'plugins/Linker/scan.php?dir=<?php echo urlencode($basedir) ?>';The reason for that hash in the session is so that Joe Bloggs can't just go change the directory on the url to whatever they want, you could equally as well just change the $dir = statement in scan.php and skip that whole m'larky above.
another question:
the dialog looks completely different from the other usually used dialogs - actually it looks great - but still it would be nice to open all dialogs the same way!
Yes. I'm not a fan of popups, they make life more difficult. But by the same token I know some people won't like the inline-dialog idea. To that means I'd like to see it configurable. I've designed the inline dialog system so that in the (not tooo distant) future it should be possible to determine if you want inline or popup dialogs with a config variable. At least that's the idea in theory ![]()
i have a dynamic website - where it isn't enough to list all avaliable files - for example i have a news.php that can be called with news.php?id=xx
can i define such links anywhere too?
Yes, what you need to do is have a look at scan.php and see what it returns (it just returns some a nested javascript array, nothng fancy). Then you can write your own scan.php (or modify the existing) and set the config variable yourEditor.config.Linker.backend appropriatly.
Dave has been making further accusations leveled towards me. Here is the last word.
I've put together a little _ddt() library that opens up a text area and drops messages into it. I've created a few simple functions to dump objects, HTML and straight messages into the area. It's made it much easier to see how all this stuff works together.
Sounds good, you have SVN commit, so feel free to put that in, what I'd suggest is just having a config variable Config.debug (might already be one) that turns this functionality on).
How do you guys do it? Do you actually use the javascript debugger when you're working on code?
Typically, alerts, yep. When something is bveing troublesome then I'll fire up venkman and set an appropriate breakpoint somewhere so I can examine the situation at my leisure ![]()
To start getting up to speed on DOM javascript, I was investigating the ContextMenu image bug. I'm thinking it's probably a relative path issue (as I mention in the bug report).
When running inside a plugin, what's the current working directory?
Is it the directory containing htmlarea.js or is it the directory containing the plugin javascript code?
The paths used in context-menu.js are "../images/ed_buttons...".
Hmm. It would be the htmlarea.js directory (_editor_url)
What is the most important thing for me is that the Extended File Manager works on Xinha. Did you test this?
No I havn't, but it should work fine, give it a try and let us know how it goes
There are a number of "new" plugins for htmlarea (on the htmlarea.com forums) which I would like to distribute with Xinha or make available here as a separate download, but we really need to ask each plugin author if they are ok with that.
What would be great is to have a package which is available for download. SVN is really nice, but might be tricky for some people
The downloads page has what you seek - http://xinha.gogo.co.nz/DownloadsPage
The SVN is more up to date of course, but I'll be making regular packages of the SVN as enough changes are made. I might make an automatic nightly package also for those who want the bleeding edge without SVN.
Welcome aboard Mirical,
I surely will use Xinha in my projects, as soon as it can replace htmlarea - which is not that bad.
Xinha should more or less be a drop-in replacement for htmlarea as it stands now. You might have to fiddle with your toolbars (newlines are not inserted automatically, you must use 'linebreak' items in your toolbar) but other than that Xinha should work OK pretty much now.
I'm not sure about chopping up the source into loads of little files like they've done. Twenty 4K files takes longer to load than one 80K file. If Xinha is to be chopped into IE and gecko files, I suggest one big file for each rather than chopping into little functions (plugins can still be separate). This is the same principle that led James to use a single image for all the buttons (though bigger code files are easier to maintain than a clump of buttons in one image).
I was more thinking splitting the core into three files
core.js
ie.js
gecko.js
core.js contains just pure JS stuff that works everywhere
ie.js is loaded by core.js when running in IE and contains method implementations that are specific to IE
gecko.js simiarly contains specifc to gecko stuff.
Plugins are left as is, just the core gets split. Thats mostly what makes it such a big load now, all that reimplementing of stuff for one browser that the other browser supports better (equal amounts of that for each browser, neither is blameless).
Having spent some time with HTMLArea, I do think its very messy. x-browser javascript issues aside, I really don't think it needs to be so convoluted. Try using a javascript debugger and tracing the code... it does a lot of stuffing around.
I don't think it's tooo bad (and I have done the odd debugging run in venkman with it to fix problems). Once the editor is built basically it's just updateToolbar and execCommand that do the work. There is room for improvement though. And I have done so in a few places.
I think the number of files and code size should be minimized. It would be nice if it could load in 10 seconds for dial-up users (about 50KB total).
Thats doable now using javascript compressors, at least for the core, plugins add a little.
How long does HTMLArea take on dial-up (anybody still have dial-up?) - must be >20secs.
I'd say about that. The combined images I did would help immensly there I expect. As you say, it's (mostly, IE seems finiky about it sometimes) a one time cost.
As regards FCK, I looked at it a while back and I found it's loads of tiny files strewn through piles of directories somewhat difficult to follow. I don't know if (I think the guys name is Fred?) the developer based it off htmlArea originally, but if so they changed it a LOT. I havn't played with it enough to know if it behaves better or worse than Xinha/htmlArea at all. I don't think thier demo had table operations last time I looked.
I'm told they have "40 developers", so a force to watch I imagine.
A friend of mine (also in Christchurch) has more recently looked at FCK (and decided to stick with Xinha), I'll see if I can get him to comment here.