
Hello,
we just have released the new version of the FCKEditor integration in version 0.4
In the old version we used a helper jsp or html page to load the editor via a iframe solution.
In the new version we did a more direct integration with no separate iframe required. Yes, fullscreen button now works!
We did also rewrite the javascript glue code and the previous random initialization problems should be solved.
What also now works is having multiple editors displayed, the editor code is now loaded only once and concurrent initialization now behaves properly.
You can look at the examples and sources here http://www.aarboard.org/
Don't hesitate to contact me if you have questions or ideas on how to improve the component.
André
Great work. BTW, is there
Great work. BTW, is there any way to restrict the file upload feature? I don't think the default upload to server or browser server will work reliably.
Yes, that's possible. Just
Yes,
that's possible.
Just set the following properties to false in the fckconfig.js:
or via the setConfig() method of the component.
In our system we have them enabled and have also a corresponding servlet for this.
Do you think there is interest in having these possibilities in the echo component ?
André
Sure, it will make it easier
Sure, it will make it easier for people since they will need to add only a single jar file. We could also distribute (if there are no licensing issues) the "tested" FCKEditor files that need to be included in the root of the web application.
Great alternative to TinyMCE
Hi André,
We've been using TinyMCE via JFIX for about a year now but I've just run your online demo of FckEditor and it seems that it's much more reliable and produces much more predictable results that TinyMCE.
Clients and myself have seen some weird behaviour with TinyMCE at times. Sometimes with TinyMCE when it doesn't do what I want I edit the HTML code directly but it appears that if it's not happy with my new HTML code it just abandons it and reverts to what it wants to see.
I think I'll switch over to your FckEditor/Echo3 integration.
Other things I discovered about FckEditor from your demo:
- It appears to do 'on demand' loading of various popup windows - which is great. That should reduce the initial download delay and only download components as required.
- Ability to set up a servlet to provide image selection. This doesn't appear to be working on your site at the moment but I guess at least the FckEditor supports it as concept.
Step Ahead Software
Makers of Javelin Modeler+Coder for Java.
Automatic persistence of your object model using JDO and Hibernate.
http://stepaheadsoftware.com/products/javelin/javelin.htm
Hello, thanks. - The 'on
Hello,
thanks.
- The 'on demand' loading is in fact provided by Fckeditor itself.
- Image selection, (And also fileupload, image browser, link browser, flash browser etc.) are disabled in the demo, but are no problem to implement in a normal application. Perhaps we can provide some glue code, but finally it will be the question where you store your files.
André
setConfig() in the Echo component
Is it possible to just call, for example?:
rta.set("LinkUpload", new Boolean(false));
etc,.
Hmmm, that doesn't seem to work. I just noticed some client side stuff in Aar.FCKRichTextArea.js which seems to mean I'd need to add some client side shenannigans to get it working.
Step Ahead Software
Makers of Javelin Modeler+Coder for Java.
Automatic persistence of your object model using JDO and Hibernate.
http://stepaheadsoftware.com/products/javelin/javelin.htm
The problem with the
The problem with the fileupload stuff is, that it needs some sort of backend which does map the files/directories to some loccation/database or whatever.
I think we could use something or parts of this package.
http://java.fckeditor.net/connector.html
From the licensing point of view bundeling should be possible, since the editor and the java classes are both licensed under GPL, LGPL and MPL
André
That does look good. How do
That does look good. How do you map your upload servlet now? Can you point it to the web app root directory? That way the user can browse the web app contents and associate/link images as necessary.
Bugs.
Great work men. It' useful component but there are 2 bugs.
1) When RichTextArea.setText() is not invoked then the RichTextArea.getText() never return contained text in it. As result you must call at least RichTextArea.setText("") to get it work.
2) When RichTextArea.setText() is invoked then pasted (ctrl+v) text never appear in a RichTextArea. In other case (setText() never called) it's work great but 1) happens - vicious circle.
Hello Snog, thanks for your
Hello Snog,
thanks for your reports.
Can you tell me what browser and OS you are using ?
The FCKEditor is behaving very different based on the browser used.
André
Hello André. Firstly, I'm
Hello André.
Firstly, I'm sorry for my late answer but I spend some vacation time with my family therefore I hadn't enough time to handle it before.
Move towards my answer.
OS: Windows XP
Browser: Firefox 3.0.13, Explorer 8
Does it (Paste some text to FCK by CTRL+V) work on your side in demo application?
Best regards!
Server seems to be down
http://www.aarboard.org seems to be down.
We really want to get a hold of this code. Can you get the server back up?
Might it make more sense to create a google code project for it, or a project at another hosting provider? That would reduce dependence on your own server, and probably make it easier for others to use and contribute.
Hello, it's up again. (I
Hello,
it's up again. (I did shut it down a few days? ago to make some tests and apparently forgot to restart tomcat.
Until now, there has been no demand for participating on the codebase, but if there is real interest, then moving it to one of the big development websites would be a good idea.
Currently it's based on FCKEditor 2.6.4, 2.6.5 is out since a few days and probably would also work.
In the meantime CKEditor 3.0 has been released (which is a major rewrite), this one almost certainly won't work.
But any help in testing/coding is welcome.
André
Thanks for the quick response
Great - thanks for the quick response.
I think that the HTML Editor component is so vital that it really ought to have a project on google code or similar.
I mean no offence to Tod at all :) , but I just don't see the editor being done in Extras being suitable for many people. It is far too basic. FCKEditor (and now CKEditor) is really state of the art in this area, much better than TinyMCE in my experience.
I do think this will be a vital component for many people. Congratulations on some great work.
Feel free to add it to
Feel free to add it to EchoPoint.
In the start of the project
In the start of the project we did think about adding it to echopoint, but I don't remember why we did choose to not add it there...
If we find a way to include the editor itself in a jar, (Probably via some kind of servlet), then the echopoint jar file size will grow by 1MB in size... (Currently it has ~560kB)
Perhaps we can have it in the echopoint project and site, but as a separate component ?
As FCKEditor is licensed under "GPL, LGPL and MPL", we should have no license problem, since echopoint is licensed MPL.
André
If you prefer to have it as
If you prefer to have it as a separate jar file, that is fine. I personally prefer to have everything in one jar, since that makes the application developers task easier (just one jar to include instead of multiple). I do not think users will be worried about jar file size in this case.
CKEditor 3 - what's the likelihood of support for this?
I've just looked at CKEditor 3 and it looks very slick! I guess some re-engineering under the bonnet has also occurred which should also be pretty good, although I guess this is why you think that it's not going to work with your existing Echo3 FckEditor component right out of the box.
What's the likelihood that you will port your Echo3 FckEditor to CKEditor?
Step Ahead Software
Makers of Javelin Modeler+Coder for Java.
Automatic persistence of your object model using JDO and Hibernate.
http://stepaheadsoftware.com/products/javelin/javelin.htm
We will for sure support
We will for sure support CKEditor,
but actually we are very busy with another project (Echo3 based), so that's no sure we will have time to implement it in the next two months...
BTW: Do you think we should move the project over to echopoint ?
André
Moving to Echopoint
We actually already use a few components from the EchoPoint library so it would be convenient for us to treat it as part of that library.
Logically it would make sense also as EchoPoint has traditionally been the place where auxiliary Echo components live.
BTW: Have you tried to use the FckEditor.java ConnectorServlet? It looks pretty straightforward but I was wondering if there are any 'gotchas' that I should look out for.
Step Ahead Software
Makers of Javelin Modeler+Coder for Java.
Automatic persistence of your object model using JDO and Hibernate.
http://stepaheadsoftware.com/products/javelin/javelin.htm
Ok, I will move the code over to echopoint in the next days
Ok, I will move the code over to echopoint in the next days.
We have used the FckEditor connector servlet as a base a few years ago to write our own custom servlet for this.
Of course in the meantime both versions have evolved.
But the connector servlet is a very good place to start with.
André
Can't load fckeditor.js
I installed FckEditor and the FckEditor/Echo integration jar and when I launch a RichTextArea I get:
"Failed loading fckeditor.js with http status 404".
FckEditor.js must be installed ok because when I go to the sample
http://dev.mywebapp.com/fckeditor/_samples/default.html
the FckEditor sample opens up without a problem.
The tomcat log reveals the following http requests during the failed attempts to load fckeditor from my app:
127.0.0.1 - - [12/Oct/2009:22:28:59 +1100] "GET /admin?sid=Aar.FCKRichTextArea HTTP/1.1" 200 8815
127.0.0.1 - - [12/Oct/2009:22:28:59 +1100] "GET /undefinedfckeditor.js HTTP/1.1" 404 1018
the /undefined might mean there is something that I have to configure before it will know where to look for the fckeditor. Any ideas?
Could it be related to running the app in a virtual host on tomcat?
Step Ahead Software
Makers of Javelin Modeler+Coder for Java.
Automatic persistence of your object model using JDO and Hibernate.
http://stepaheadsoftware.com/products/javelin/javelin.htm
Found the cause of "Can't load fckeditor.js"
There is one more task necessary in addition to the ones you mention on your fckeditor page:
In addition to these steps:
downloading FckEditor and installing it to fckeditor in the root of your webapplication
adding fckeditor<version>.jar to the war file
Replace previous RichTextArea import with import org.aarboard.echo.RichTextArea;
You also need to set the editorUrl as it doesn't default to fckeditor/ (well it didn't in my case at least).
textArea.setFckeditorURL("fckeditor/");
Perhaps you could add this last step to your FckEditor/Echo integration webpage.
Great work! The FckEditor looks very nice in my Echo3 app!
Step Ahead Software
Makers of Javelin Modeler+Coder for Java.
Automatic persistence of your object model using JDO and Hibernate.
http://stepaheadsoftware.com/products/javelin/javelin.htm
Probably missing setFckeditorURL()
Probably you must set the URL to the fckeditor sources.
(setFckeditorURL(java.lang.String newValue)
André
Yep, that was it, see
Yep, that was it, see above - must have posted at almost the same time :)
Step Ahead Software
Makers of Javelin Modeler+Coder for Java.
Automatic persistence of your object model using JDO and Hibernate.
http://stepaheadsoftware.com/products/javelin/javelin.htm
NPE if editor content is emptied
I think it's possible that inputValue can be null in the case when the editor's content has been emptied.
This results in a NPE on the line indicated below:
public void processInput(String inputName, Object inputValue) { if (TEXT_CHANGED_PROPERTY.equals(inputName)) { this.text = inputValue.toString(); <--- NPE here. } }I suppose that line could be rewritten as:
this.text = ( inputValue != null ) ? inputValue.toString() : "";Regards,
Chris
Step Ahead Software
Makers of Javelin Modeler+Coder for Java.
Automatic persistence of your object model using JDO and Hibernate.
http://stepaheadsoftware.com/products/javelin/javelin.htm
You are right
Yes, that's true.
In a internal version I already had this fixed that way:
if (TEXT_CHANGED_PROPERTY.equals(inputName)) { if (inputValue != null) { this.text = inputValue.toString(); } else { this.text= null; } }I think it's time to integrate it in echopoint. ;)
André
Cool!
Yes, I think it will make a great addition to EchoPoint.
In breaking news: I've managed to get FckEditor File Browser functionality working now which is also very cool - but that has a lot less to do with Echo and a lot more to do with standard Servlet technology and setting/getting session attributes in the right places.
Step Ahead Software
Makers of Javelin Modeler+Coder for Java.
Automatic persistence of your object model using JDO and Hibernate.
http://stepaheadsoftware.com/products/javelin/javelin.htm