Package wicket.contrib.tinymce.settings

Examples of wicket.contrib.tinymce.settings.TinyMCESettings$Align


* Date: Apr 26, 2010
*/
public class ImageUploadTinyMCEPage extends TinyMCEBasePage {

    public ImageUploadTinyMCEPage() {
        TinyMCESettings settings = new TinyMCESettings(TinyMCESettings.Theme.advanced);
        settings.disableButton(Button.styleselect);
        settings.disableButton(Button.hr);
        settings.disableButton(Button.removeformat);
        settings.disableButton(Button.visualaid);
        settings.disableButton(Button.sub);
        settings.disableButton(Button.sup);
        settings.disableButton(Button.charmap);

        settings.add(Button.fontselect, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after);
        settings.add(Button.fontsizeselect, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after);
        settings.add(Button.forecolor, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after);
        settings.add(Button.backcolor, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after);

        settings.setToolbarButtons(Toolbar.second, null);
        settings.setToolbarButtons(Toolbar.third, null);
        settings.setToolbarButtons(Toolbar.fourth, null);

        settings.setToolbarAlign(TinyMCESettings.Align.left);
        settings.setToolbarLocation(TinyMCESettings.Location.top);
        settings.setStatusbarLocation(TinyMCESettings.Location.bottom);
        ImageUploadPanel imageUploadPanel = new ImageUploadPanel("uploadPanel");
        ImageUploadPlugin plugin = new ImageUploadPlugin(imageUploadPanel.getImageUploadBehavior());
        settings.add(plugin.getImageUploadButton(), TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after);
        add(imageUploadPanel);
        TextArea<String> textArea = new TextArea<String>("ta", new Model<String>(TEXT));
        textArea.add(new TinyMceBehavior(settings));
        add(textArea);
    }
View Full Code Here


* @author Iulian-Corneliu COSTAN
*/
public class WordTinyMCEPage extends TinyMCEBasePage {

    public WordTinyMCEPage() {
        TinyMCESettings settings = new TinyMCESettings(TinyMCESettings.Theme.advanced);

        ContextMenuPlugin contextMenuPlugin = new ContextMenuPlugin();
        settings.register(contextMenuPlugin);

        // first toolbar
        settings.add(Button.newdocument, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.before);
        settings.add(Button.separator, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.before);
        settings.add(Button.fontselect, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after);
        settings.add(Button.fontsizeselect, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after);

        // second toolbar
        PastePlugin pastePlugin = new PastePlugin();
        SearchReplacePlugin searchReplacePlugin = new SearchReplacePlugin();
        DateTimePlugin dateTimePlugin = new DateTimePlugin();
        dateTimePlugin.setDateFormat("Date: %m-%d-%Y");
        dateTimePlugin.setTimeFormat("Time: %H:%M");
        PreviewPlugin previewPlugin = new PreviewPlugin();
        settings.add(Button.cut, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(Button.copy, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(pastePlugin.getPasteButton(), TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(pastePlugin.getPasteTextButton(), TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(pastePlugin.getPasteWordButton(), TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(Button.separator, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(searchReplacePlugin.getSearchButton(), TinyMCESettings.Toolbar.second,
                TinyMCESettings.Position.before);
        settings.add(searchReplacePlugin.getReplaceButton(), TinyMCESettings.Toolbar.second,
                TinyMCESettings.Position.before);
        settings.add(Button.separator, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(Button.separator, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(dateTimePlugin.getDateButton(), TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(dateTimePlugin.getTimeButton(), TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(Button.separator, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(previewPlugin.getPreviewButton(), TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(Button.separator, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(Button.forecolor, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(Button.backcolor, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);

        // third toolbar
        TablePlugin tablePlugin = new TablePlugin();
        EmotionsPlugin emotionsPlugin = new EmotionsPlugin();
        IESpellPlugin iespellPlugin = new IESpellPlugin();
        MediaPlugin mediaPlugin = new MediaPlugin();
        PrintPlugin printPlugin = new PrintPlugin();
        FullScreenPlugin fullScreenPlugin = new FullScreenPlugin();
        DirectionalityPlugin directionalityPlugin = new DirectionalityPlugin();
        settings.add(tablePlugin.getTableControls(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.before);
        settings.add(emotionsPlugin.getEmotionsButton(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(iespellPlugin.getIespellButton(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(mediaPlugin.getMediaButton(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(Button.separator, TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(printPlugin.getPrintButton(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(Button.separator, TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings
                .add(directionalityPlugin.getLtrButton(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings
                .add(directionalityPlugin.getRtlButton(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(Button.separator, TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(fullScreenPlugin.getFullscreenButton(), TinyMCESettings.Toolbar.third,
                TinyMCESettings.Position.after);

        // other settings
        settings.setToolbarAlign(TinyMCESettings.Align.left);
        settings.setToolbarLocation(TinyMCESettings.Location.top);
        settings.setStatusbarLocation(TinyMCESettings.Location.bottom);
        settings.setResizing(true);

        TextArea textArea = new TextArea("ta", new Model(TEXT));
        textArea.add(new TinyMceBehavior(settings));
        add(textArea);
    }
View Full Code Here

* @author syca
*/
public class FullFeaturedTinyMCEPage extends TinyMCEBasePage {

    public FullFeaturedTinyMCEPage() {
        TinyMCESettings settings = new TinyMCESettings(TinyMCESettings.Theme.advanced);

        ContextMenuPlugin contextMenuPlugin = new ContextMenuPlugin();
        settings.register(contextMenuPlugin);

        // first toolbar
        SavePlugin savePlugin = new SavePlugin();
        settings.add(savePlugin.getSaveButton(), TinyMCESettings.Toolbar.first, TinyMCESettings.Position.before);
        settings.add(Button.newdocument, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.before);
        settings.add(Button.separator, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.before);
        settings.add(Button.fontselect, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after);
        settings.add(Button.fontsizeselect, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after);

        // second toolbar
        PastePlugin pastePlugin = new PastePlugin();
        SearchReplacePlugin searchReplacePlugin = new SearchReplacePlugin();
        DateTimePlugin dateTimePlugin = new DateTimePlugin();
        dateTimePlugin.setDateFormat("Date: %m-%d-%Y");
        dateTimePlugin.setTimeFormat("Time: %H:%M");
        PreviewPlugin previewPlugin = new PreviewPlugin();
        settings.add(Button.cut, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(Button.copy, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(pastePlugin.getPasteButton(), TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(pastePlugin.getPasteTextButton(), TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(pastePlugin.getPasteWordButton(), TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(Button.separator, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(searchReplacePlugin.getSearchButton(), TinyMCESettings.Toolbar.second,
                TinyMCESettings.Position.before);
        settings.add(searchReplacePlugin.getReplaceButton(), TinyMCESettings.Toolbar.second,
                TinyMCESettings.Position.before);
        settings.add(Button.separator, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
        settings.add(Button.separator, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(dateTimePlugin.getDateButton(), TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(dateTimePlugin.getTimeButton(), TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(Button.separator, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(previewPlugin.getPreviewButton(), TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(Button.separator, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(Button.forecolor, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
        settings.add(Button.backcolor, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);

        // third toolbar
        TablePlugin tablePlugin = new TablePlugin();
        EmotionsPlugin emotionsPlugin = new EmotionsPlugin();
        IESpellPlugin iespellPlugin = new IESpellPlugin();
        MediaPlugin mediaPlugin = new MediaPlugin();
        PrintPlugin printPlugin = new PrintPlugin();
        FullScreenPlugin fullScreenPlugin = new FullScreenPlugin();
        DirectionalityPlugin directionalityPlugin = new DirectionalityPlugin();
        settings.add(tablePlugin.getTableControls(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.before);
        settings.add(emotionsPlugin.getEmotionsButton(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(iespellPlugin.getIespellButton(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(mediaPlugin.getMediaButton(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(Button.separator, TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(printPlugin.getPrintButton(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(Button.separator, TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings
                .add(directionalityPlugin.getLtrButton(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings
                .add(directionalityPlugin.getRtlButton(), TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(Button.separator, TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
        settings.add(fullScreenPlugin.getFullscreenButton(), TinyMCESettings.Toolbar.third,
                TinyMCESettings.Position.after);

        // fourth toolbar
        SpellCheckPlugin spellCheckPlugin = new SpellCheckPlugin();
        settings.add(spellCheckPlugin.getSpellCheckButton(), TinyMCESettings.Toolbar.fourth,
               TinyMCESettings.Position.after);

        // other settings
        settings.setToolbarAlign(TinyMCESettings.Align.left);
        settings.setToolbarLocation(TinyMCESettings.Location.top);
        settings.setStatusbarLocation(TinyMCESettings.Location.bottom);
        settings.setResizing(true);

        TextArea<String> textArea = new TextArea<String>("ta", new Model<String>(TEXT));
        textArea.add(new TinyMceBehavior(settings));
        add(textArea);
    }
View Full Code Here

    }

    private void init(Component triggerComponent) {
        setEscapeModelStrings(false);
        setOutputMarkupId(true);
        settings = new TinyMCESettings(Theme.advanced);
        // advanced theme required to add save/cancel buttons to toolbar
        inPlaceSaveBehavior = createSaveBehavior();
        if (inPlaceSaveBehavior != null) {
            add(inPlaceSaveBehavior);
            WicketSavePlugin savePlugin = new WicketSavePlugin(inPlaceSaveBehavior);
View Full Code Here

    private Component component;
    private TinyMCESettings settings;

    public TinyMceBehavior() {
        this(new TinyMCESettings());
    }
View Full Code Here

    public InPlaceEditComponent(String id, IModel model,
      Component triggerComponent, TinyMCESettings settings)
    {
  super(id, model);
  this.settings = settings != null ? settings : new TinyMCESettings(Theme.advanced);
  this.triggerComponent = triggerComponent != null ? triggerComponent : this;
    }
View Full Code Here

  private TinyMCESettings settings;
  private boolean rendered = false;

  public TinyMceBehavior()
  {
    this(new TinyMCESettings());
  }
View Full Code Here

  private static final long serialVersionUID = 1L;

  public ImageUploadTinyMCEPage()
  {
    TinyMCESettings settings = new TinyMCESettings(TinyMCESettings.Theme.advanced);
    settings.disableButton(Button.styleselect);
    settings.disableButton(Button.hr);
    settings.disableButton(Button.removeformat);
    settings.disableButton(Button.visualaid);
    settings.disableButton(Button.sub);
    settings.disableButton(Button.sup);
    settings.disableButton(Button.charmap);

    settings.add(Button.fontselect, TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.after);
    settings.add(Button.fontsizeselect, TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.after);
    settings.add(Button.forecolor, TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.after);
    settings.add(Button.backcolor, TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.after);

    settings.setToolbarButtons(Toolbar.second, null);
    settings.setToolbarButtons(Toolbar.third, null);
    settings.setToolbarButtons(Toolbar.fourth, null);

    settings.setToolbarAlign(TinyMCESettings.Align.left);
    settings.setToolbarLocation(TinyMCESettings.Location.top);
    settings.setStatusbarLocation(TinyMCESettings.Location.bottom);
    ImageUploadPanel imageUploadPanel = new ImageUploadPanel("uploadPanel");
    ImageUploadPlugin plugin = new ImageUploadPlugin(imageUploadPanel.getImageUploadBehavior());
    settings.add(plugin.getImageUploadButton(), TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.after);
    add(imageUploadPanel);
    TextArea<String> textArea = new TextArea<String>("ta", new Model<String>(TEXT));
    textArea.add(new TinyMceBehavior(settings));
    add(textArea);
View Full Code Here

  private static final long serialVersionUID = 1L;

  public WordTinyMCEPage()
  {
    TinyMCESettings settings = new TinyMCESettings(TinyMCESettings.Theme.advanced);

    settings.register(new ContextMenuPlugin());
                settings.register(new WordcountPlugin());
                settings.register(new AdvListPlugin());

    // first toolbar
    settings.add(Button.newdocument, TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.before);
    settings.add(Button.separator, TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.before);
    settings.add(Button.fontselect, TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.after);
    settings.add(Button.fontsizeselect, TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.after);

    // second toolbar
    PastePlugin pastePlugin = new PastePlugin();
    SearchReplacePlugin searchReplacePlugin = new SearchReplacePlugin();
    DateTimePlugin dateTimePlugin = new DateTimePlugin();
    dateTimePlugin.setDateFormat("Date: %m-%d-%Y");
    dateTimePlugin.setTimeFormat("Time: %H:%M");
    PreviewPlugin previewPlugin = new PreviewPlugin();
    settings.add(Button.cut, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
    settings.add(Button.copy, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
    settings.add(pastePlugin.getPasteButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(pastePlugin.getPasteTextButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(pastePlugin.getPasteWordButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(Button.separator, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(searchReplacePlugin.getSearchButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(searchReplacePlugin.getReplaceButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(Button.separator, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(Button.separator, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(dateTimePlugin.getDateButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(dateTimePlugin.getTimeButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(Button.separator, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(previewPlugin.getPreviewButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(Button.separator, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(Button.forecolor, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(Button.backcolor, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);

    // third toolbar
    TablePlugin tablePlugin = new TablePlugin();
    EmotionsPlugin emotionsPlugin = new EmotionsPlugin();
    IESpellPlugin iespellPlugin = new IESpellPlugin();
    MediaPlugin mediaPlugin = new MediaPlugin();
    PrintPlugin printPlugin = new PrintPlugin();
    FullScreenPlugin fullScreenPlugin = new FullScreenPlugin();
    DirectionalityPlugin directionalityPlugin = new DirectionalityPlugin();
    settings.add(tablePlugin.getTableControls(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.before);
    settings.add(emotionsPlugin.getEmotionsButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(iespellPlugin.getIespellButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(mediaPlugin.getMediaButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(Button.separator, TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(printPlugin.getPrintButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(Button.separator, TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(directionalityPlugin.getLtrButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(directionalityPlugin.getRtlButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(Button.separator, TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(fullScreenPlugin.getFullscreenButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);

    // other settings
    settings.setToolbarAlign(TinyMCESettings.Align.left);
    settings.setToolbarLocation(TinyMCESettings.Location.top);
    settings.setStatusbarLocation(TinyMCESettings.Location.bottom);
    settings.setResizing(true);

    TextArea textArea = new TextArea("ta", new Model(TEXT));
    textArea.add(new TinyMceBehavior(settings));
    add(textArea);
  }
View Full Code Here

  private static final long serialVersionUID = 1L;

  public FullFeaturedTinyMCEPage()
  {
    TinyMCESettings settings = new TinyMCESettings(TinyMCESettings.Theme.advanced);

                // Register non-buttuon plugins
    settings.register(new ContextMenuPlugin());
                settings.register(new AutoSavePlugin());
                settings.register(new WordcountPlugin());
                settings.register(new AdvListPlugin());

    // first toolbar
    SavePlugin savePlugin = new SavePlugin();
    settings.add(savePlugin.getSaveButton(), TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.before);
    settings.add(Button.newdocument, TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.before);
    settings.add(Button.separator, TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.before);
    settings.add(Button.fontselect, TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.after);
    settings.add(Button.fontsizeselect, TinyMCESettings.Toolbar.first,
      TinyMCESettings.Position.after);

    // second toolbar
    PastePlugin pastePlugin = new PastePlugin();
    SearchReplacePlugin searchReplacePlugin = new SearchReplacePlugin();
    DateTimePlugin dateTimePlugin = new DateTimePlugin();
    dateTimePlugin.setDateFormat("Date: %m-%d-%Y");
    dateTimePlugin.setTimeFormat("Time: %H:%M");
    PreviewPlugin previewPlugin = new PreviewPlugin();
    settings.add(Button.cut, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
    settings.add(Button.copy, TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
    settings.add(pastePlugin.getPasteButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(pastePlugin.getPasteTextButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(pastePlugin.getPasteWordButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(Button.separator, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(searchReplacePlugin.getSearchButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(searchReplacePlugin.getReplaceButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(Button.separator, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.before);
    settings.add(Button.separator, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(dateTimePlugin.getDateButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(dateTimePlugin.getTimeButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(Button.separator, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(previewPlugin.getPreviewButton(), TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(Button.separator, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(Button.forecolor, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);
    settings.add(Button.backcolor, TinyMCESettings.Toolbar.second,
      TinyMCESettings.Position.after);

    // third toolbar
    TablePlugin tablePlugin = new TablePlugin();
    EmotionsPlugin emotionsPlugin = new EmotionsPlugin();
    IESpellPlugin iespellPlugin = new IESpellPlugin();
    MediaPlugin mediaPlugin = new MediaPlugin();
    PrintPlugin printPlugin = new PrintPlugin();
    FullScreenPlugin fullScreenPlugin = new FullScreenPlugin();
    DirectionalityPlugin directionalityPlugin = new DirectionalityPlugin();
    settings.add(tablePlugin.getTableControls(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.before);
                settings.add(Button.separator, TinyMCESettings.Toolbar.third,
                        TinyMCESettings.Position.after);
    settings.add(emotionsPlugin.getEmotionsButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(iespellPlugin.getIespellButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(mediaPlugin.getMediaButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(Button.separator, TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(printPlugin.getPrintButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(Button.separator, TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(directionalityPlugin.getLtrButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(directionalityPlugin.getRtlButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(Button.separator, TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);
    settings.add(fullScreenPlugin.getFullscreenButton(), TinyMCESettings.Toolbar.third,
      TinyMCESettings.Position.after);

    // other settings
    settings.setToolbarAlign(TinyMCESettings.Align.left);
    settings.setToolbarLocation(TinyMCESettings.Location.top);
    settings.setStatusbarLocation(TinyMCESettings.Location.bottom);
    settings.setResizing(true);
               
                // custom settings
                String styleFormats = "style_formats : ["
                        + "{title : 'Bold text', inline : 'b'},"
                        + "{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},"
                        + "{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},"
                        + "{title : 'Example 1', inline : 'span', classes : 'example1'},"
                        + "{title : 'Example 2', inline : 'span', classes : 'example2'},"
                        + "{title : 'Table styles'},"
                        + "{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}]";
                settings.addCustomSetting(styleFormats);
               
                settings.addCustomSetting("content_css : \"../../../../../content.css\"");

    TextArea<String> textArea = new TextArea<String>("ta", new Model<String>(TEXT));
    textArea.add(new TinyMceBehavior(settings));
    add(textArea);
  }
View Full Code Here

TOP

Related Classes of wicket.contrib.tinymce.settings.TinyMCESettings$Align

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.