Java Examples for wicket.contrib.tinymce.TinyMceBehavior

The following java examples will help you to understand the usage of wicket.contrib.tinymce.TinyMceBehavior. These source code samples are taken from different open source projects.

Example 1
Project: exameditor-master  File: View source code
     * @param returnPage
private void init() {
    add(new FeedbackPanel("feedback"));
    // add common SubTaskDef input fields
    TextField<String> idTf = new TextField<String>("xmlid");
    idTf.add(new AttributeAppender("placeholder", "eindeutiger Bezeichner"));
    final TextArea<String> problemText = new TextArea<String>("problem") {

        public IConverter<String> getConverter(Class type) {
            return new IConverter<String>() {

                public String convertToObject(final String text, final Locale locale) {
                    return text.replaceAll("<p>", "").replaceAll("</p>", "<br/>");

                public String convertToString(final String value, final Locale locale) {
                    return value == null ? "" : value.toString();
    // set the type, else the converter won't get called
    add(problemText.setRequired(true).add(new TinyMceBehavior(createFullFeatureset())));
    // add subtask input elements
    SubtaskSpecificsInputPanel<T> specificPanel = getTaskSpecificFormPanel("specificelements");
    IFormValidator fv = specificPanel.getFormValidator();
    if (fv != null)
    // add correction and hints
    add(new TextField<String>("hint").add(new AttributeAppender("placeholder", "Hinweis für Studenten")));
    add(new TextArea<String>("correctionHint"));
    add(new org.apache.wicket.markup.html.form.Button("saveButton"));
    add(new org.apache.wicket.markup.html.form.Button("cancelButton") {

        public void onSubmit() {
        // setResponsePage(returnPage);