CKEditor for Vaadin 7 released - called version 7.8.2

We have done a “legacy conversion” of CKEditor for Vaadin 1.8.2 that runs under Vaadin 6.

The new version is CKEditor for Vaadin 7.8.2 and was built on Vaadin 7.0.5. This version sadly reintroduces an issue with using the editor in a modal Vaadin Window, so you should do that with this version until such a fix is in place. We consider this experimental as we’ve not used it in a production environment yet.

The code is now in the
Directory
as well as in
Google Code
.

If anybody is interested in creating a non-legacy port using the new Vaadin 7 shemes, your help would be appreciated as we will probably not touch that for some time as we need to work on porting our main application to Vaadin 7.

The CKEditor for Vaadin 7 demo is online now:
http://open.esignforms.com/Vaadin7CKEditor/

We have updated to version 7.8.3 with the fix for the modal windows. Turns out we can test the VWindow.vaadinModality public boolean. Not sure why we still need to do this “fix” for VWindow even under Vaadin 7, but here’s the code in case it can be used by Vaadin to patch their code should it be generally useful:


public class ModalFixVWindow extends VWindow {
	
    @Override
    public boolean onEventPreview(final Event event)
    {
        if (vaadinModality)
            return true; 
        return super.onEventPreview(event);
    }
}

Hello David, i’m using CKEditor plugin in my project. I have a question: is it possible to add some item to the context menu on right click?

Thank you

I’m not sure just what you are interested in, but you can certainly configure CKEditor in any way it needs, though many such ways mean setting the “in page configuration” to achieve those goals. CKEditor is just too big to attempt to replicate their entire API. If you can provide details on what the configuration would be for the editor, we can perhaps add it in or describe your best options.

Thanks for reply, and for this recent porting to Vaadin 7 :slight_smile: .
Adding some items to the context menu on right click i mean to add some functionality. I explain my use case:
i’m developing a web app where i can add semantic markup on the text. My idea is to select some text inside CKEditor, right click on it and select the kind of markup that i want to add from this context menu. Connected to this menu there will be some function that take the selected text and add on it the markup ( just wrapping specific html code on that text).

For this function, i didn’t find a way to solve : 1)Get selected text from CKEditor 2) Add items to the context menu on right click .

Thanks for your time!

Gianluca
12972.png

I think the first step is to implement your idea in CKEditor javascript code and then determine what you need to do. We do not have any way now to return selected text or the like back through the Vaadin adapter. That sounds like changes you need to make to CKEditor itself, but once you know how it’s done natively, there may be a way to allow that to work through Vaadin.

An earlier request for something that sounded simple, like getting the current cursor position, turned out to be complex in that most of the positions were relative to the nearest enclosing element, and not an offset from the HTML text buffer. If you can do it in javascript, though, then it can be analyzed to determine if it can be done via the Vaadin add-on. My guess is you will find you actually need to write a CKEditor plugin.

Hi

Small question:

What can i have wrong, because i`m getting error:
" Widgetset does not contain implementation for org.vaadin.openesignforms.ckeditor.CKEditorTextField. Check its component connector’s @Connect mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions."

I @connect this field, AppWidgetSet.gwt.xml looks correctly, jar is in war file, i have widgetset compiled (Im not sure, is it correctly done), everything looks ok. Im using maven plugin with config:

maven-clean-plugin 2.4.1 src/main/webapp/VAADIN/widgetsets src/main/webapp/VAADIN/gwt-unitCache com.vaadin vaadin-maven-plugin ${vaadin.plugin.version} -Xmx512M -Xss1024k ${basedir}/src/main/webapp/VAADIN/widgetsets ${basedir}/src/main/webapp/VAADIN/widgetsets true false true OBF true http://localhost:8080/ resources update-widgetset compile

Could you help me, and at least show me what i should looking for?

My vaadin version is 7.1.0.
CKEDitor version is 7.8.2

BRs
Paweł

I am not sure. The latest version for ckeditor is 7.8.3, but we’ve only tested on Vaadin 7.0.7. Perhaps something has broken with 7.1 that we’re not aware of yet.

unfortunately on 7.0.7 is the same situation :frowning:

Got me, but sounds like either something is wrong with your Vaadin setup or there’s some Vaadin bug. Not only do we build the widget itself under Vaadin 7.0.7 without any issue, but we use it another Vaadin 7.0.7 project. Of course, we do use Eclipse without Maven, so I don’t know about your specifics.

vaadinckeditor7.8.3.jar is placed in the usual WEB-INF/lib and this should automatically add an entry like this to your project’s widgetset .gwt.xml file:

and then the usual widgetset compilation for Vaadin projects.

Maybe someone with Mavin+Vaadin experience can comment with some insights if they’ve seen something similar.

Do you have a client-side widgetset which is properly referenced in your web.xml?
If so does your widgetset.gwt.xml include the inherits name = … David mentioned?
If not you have to recompile your widgetset. Also just to be safe: check your dependency settings in your pom.xml.

I found bugs in my pom & web.xml → Now it works! It took me a little while to find it. And you are right - main reason was web.xml typo bug - tag was closed too early :slight_smile:

Sorry for trouble!

BTW
This editor is probably the best from all frameworks\tools I met before :slight_smile:

I have the same problem:

" Widgetset does not contain implementation for org.vaadin.openesignforms.ckeditor.CKEditorTextField. Check its component connector’s @Connect mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions."

I put vaadinckeditor7.8.4.jar to WEB-INF/lib/ and widgetset was compiled succesfully.
.gwt.xml contains:

I use Vaadin 7.1.0 and VaadinCKeditor 7.8.4
I can not find a problem. Thank for help

IT SOLVED
The problem is, the web.xml file does not contain:

Application widgetset
widgetset
com.example.myproject.widgetset.MyprojectApplicationWidgetset

Is it working with vaadin7.1.1?

I’d use 7.8.5, which we have working on 7.1.2 (and was working find under 7.1.1).

Hi,

I just incorporated CKEditor for couple of days and everything looks great - really happy to have it, thanks a lot for the development effort!

Though, I have a small question: if you use CTRL+S in Chrome or IE 11 the browser’s “Save as HTML” dialog appears.

The application I run used this short cut to initiate a round trip to save the Editor content on the server, which worked great with the standard rich text area.

I found out how to stop the CKEditor to react on the CTRL+S, though I would like to use this shortcut as earlier. Is there any way to control it better?

Thanks

What exactly are you proposing? CKEditor is just an input field (like a textarea) and has nothing to do with buttons. Seems like you could create a Save button and perhaps associated CTRL-S to it so when triggered that takes place.

That’s right. I would expect an ability to control keystrokes, so I can react on them on the serverside as well as overwrite/configure them. The keystroke JS API is already available in the CKEditor but is not exposed by the Add-on.

I think the CKEditor does simply catch the keytrokes like CTRL+S and does not forward them to Vaadin’s mechanisms, so you have no chance to react on the serverside.

Could you please explain your idea with the save button? E.g. a line of (pseudo) code ?