Directory

← Back

CKEditor wrapper for Vaadin

CKEditor wrapper for use in Vaadin applications

Author

Rating

Popularity

100+

CKEditor is a javascript-based HTML "rich text" editor that works in common browsers. This component provides a wrapper around it for use in a Vaadin-based application.

Vaadin 6: Developed using Vaadin 6.8.10 and CKEditor 4.1.1 in an Eclipse environment. This is no longer supported here.

Vaadin 7: Developed using Vaadin 7.7.16 and CKEditor 4.11.3 in an Eclipse environment. This is currently being support.

Vaadin 8: Currently no plans are in the works. Note there is another project that claims to have done so: https://vaadin.com/directory#!addon/ckeditor

Vaadin 10: Unsure about this as it's unclear when we'll rework our huge Vaadin 7 app that makes use of the editor.

You simply can drop the JAR file into your Vaadin WEB-INF/lib and begin using it, but as for all new add-ons, do a Vaadin widgetset compile.

Note this was compiled with JDK 1.6.

Sample code

public class VaadinCKEditorUI extends UI {

	@Override
	public void init(VaadinRequest request) {
		
		getPage().setTitle("Vaadin7 CKEditor UI");
		
		VerticalLayout mainView = new VerticalLayout();
		setContent(mainView);
		
		final String editorInitialValue = 
				"<p>Thanks TinyMCEEditor for getting us started on the CKEditor integration.</p>\n\n<h1>Like TinyMCEEditor said, &quot;Vaadin rocks!&quot;</h1>\n\n<h1>And CKEditor is no slouch either.</h1>\n";

		CKEditorConfig config = new CKEditorConfig();
		config.useCompactTags();
		config.disableElementsPath();
		config.setResizeDir(CKEditorConfig.RESIZE_DIR.HORIZONTAL);
		config.disableSpellChecker();
		config.setWidth("100%");
		
		final CKEditorTextField ckEditorTextField = new CKEditorTextField(config);
		mainView.addComponent(ckEditorTextField);
		
		ckEditorTextField.setValue(editorInitialValue);
		ckEditorTextField.addValueChangeListener(new Property.ValueChangeListener() {
			public void valueChange(ValueChangeEvent event) {
				Notification.show("CKEditor v" + ckEditorTextField.getVersion() + " - contents: " + event.getProperty().getValue().toString());
			}
		});	
		
	    Button button = new Button("Hit server");
	    mainView.addComponents(button);
	}
}

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Released
2019-02-27
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.2+
Vaadin 6.3+ in 0.1
Vaadin 6.4+ in 0.5
Vaadin 6.5+ in 1.0
Vaadin 6.6+ in 1.3
Vaadin 6.7+ in 1.5.0
Vaadin 6.8+ in 1.7.0
Vaadin 7.0+ in 7.8.2
Vaadin 7.1+ in 7.8.4
Browser
Browser Independent

CKEditor wrapper for Vaadin - Vaadin Add-on Directory

CKEditor wrapper for use in Vaadin applications CKEditor wrapper for Vaadin - Vaadin Add-on Directory
CKEditor is a javascript-based HTML "rich text" editor that works in common browsers. This component provides a wrapper around it for use in a Vaadin-based application. Vaadin 6: Developed using Vaadin 6.8.10 and CKEditor 4.1.1 in an Eclipse environment. This is no longer supported here. Vaadin 7: Developed using Vaadin 7.7.16 and CKEditor 4.11.3 in an Eclipse environment. This is currently being support. Vaadin 8: Currently no plans are in the works. Note there is another project that claims to have done so: https://vaadin.com/directory#!addon/ckeditor Vaadin 10: Unsure about this as it's unclear when we'll rework our huge Vaadin 7 app that makes use of the editor. You simply can drop the JAR file into your Vaadin WEB-INF/lib and begin using it, but as for all new add-ons, do a Vaadin widgetset compile. Note this was compiled with JDK 1.6.
Online