SummerNote Wicket Component

This module (isis-wicket-summernote) integrates Summernote editor. Summernote is a JavaScript library based on Bootstrap that helps you create WYSIWYG editors online.

As of 1.15.0 this module is broken (upgrade to Wicket 7.x from Wicket 6.x).

Screenshots

The module’s functionality can be explored by running the quickstart with example usage using the org.incode.domainapp.example.app.modules.ExampleDomWktSummerNoteAppManifest.

A home page is displayed when the app is run:

010 install fixtures

The remaining screenshots below do demonstrate the functionality of this module, but are out of date in that they are taken from the original isisaddons/incodehq module (prior to being amalgamated into the incode-platform).

Edit mode:

020 edit mode

View mode:

030 view mode

... shows an additional button to view those entities in a summary chart:

API & Usage

Annotate any String property with @org.isisaddons.wicket.summernote.cpt.applib.SummernoteEditor. You may use the annotation attributes to configure some aspects of the rich editor, e.g. its maximum height.

import org.isisaddons.wicket.summernote.cpt.applib.SummernoteEditor;

public class SummernoteEditorToDoItem implements Comparable<SummernoteEditorToDoItem> {
    ...
    private String notes = "";

    @javax.jdo.annotations.Column(allowsNull="true", length=400)
    @SummernoteEditor(height = 100, maxHeight = 300)
    public String getNotes() {
        return notes;
    }
    ...
}.

How to configure/use

Classpath

Add the component to your project’s dom module’s pom.xml:

<dependency>
    <groupId>org.isisaddons.wicket.summernote</groupId>
    <artifactId>isis-wicket-summernote-cpt</artifactId>
    <version>1.15.0</version>
</dependency>

Check for later releases by searching Maven Central Repo.

For instructions on how to use the latest -SNAPSHOT, see the contributors guide.

Configuration Proeprties

Set up the facet factory in isis.properties (or in the AppManifest#getConfigurationProperties()):

isis.properties
isis.reflector.facets.include=\
    org.isisaddons.wicket.summernote.cpt.applib.SummernoteEditorFacetFactory

Known Issues

None known at this time.

Dependencies

Maven can report modules dependencies using:

mvn dependency:list -o -pl modules/wkt/summernote/impl -D excludeTransitive=true

which, excluding Apache Isis itself, returns these compile/runtime dependencies:

commons-codec:commons-codec:jar:1.7

For further details on 3rd-party dependencies, see:

It also includes a Javascript dependency on Summernote editor.