Package wicket.contrib.tinymce4

Examples of wicket.contrib.tinymce4.TinyMceBehavior


  private StringBuffer buffer;

  @Override
  protected void setUp() throws Exception
  {
    settings = new TinyMCESettings(Theme.modern, Language.en);
    buffer = new StringBuffer();
  }
View Full Code Here


  private void init(Component triggerComponent)
  {
    setEscapeModelStrings(false);
    setOutputMarkupId(true);

    settings = new TinyMCESettings(Theme.modern);
    settings.setInLine(true);
   
    triggerComponent.add(new TinyMceBehavior(settings));
  }
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.modern);
   
    settings.addToolbar(new Toolbar(
        "toolbar",
        "insertfile undo redo | styleselect | bold italic | image | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | imageupload"));
    settings.addPlugins("imageupload");
    settings.addPlugins("image");
   
    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 FullFeaturedTinyMCEPage()
  {
    TinyMCESettings settings = new TinyMCESettings(TinyMCESettings.Theme.modern);
    String plugins = "advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker " +
                "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking " +
"table contextmenu directionality emoticons template textcolor paste fullpage textcolor";

    String[] pluginNames = plugins.split(" ");
   
    for (String name : pluginNames)
    {
      settings.addPlugins(name);
    }
   
    settings.setMenuBar(false);
       
    settings.addToolbar(new Toolbar("toolbar1",
                    "newdocument fullpage | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect formatselect fontselect fontsizeselect"));
    settings.addToolbar(new Toolbar("toolbar2",
                    "cut copy paste | searchreplace | bullist numlist | outdent indent blockquote | undo redo | link unlink anchor image media code | inserttime preview | forecolor backcolor"));
    settings.addToolbar(new Toolbar("toolbar3",
        "table | hr removeformat | subscript superscript | charmap emoticons | print fullscreen | ltr rtl | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft"));
   
        // 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));
View Full Code Here

  public ImageUploadTinyMCEPage()
  {
    TinyMCESettings settings = new TinyMCESettings(TinyMCESettings.Theme.modern);
   
    settings.addToolbar(new Toolbar(
        "toolbar",
        "insertfile undo redo | styleselect | bold italic | image | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | imageupload"));
    settings.addPlugins("imageupload");
    settings.addPlugins("image");
   
View Full Code Here

      settings.addPlugins(name);
    }
   
    settings.setMenuBar(false);
       
    settings.addToolbar(new Toolbar("toolbar1",
                    "newdocument fullpage | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect formatselect fontselect fontsizeselect"));
    settings.addToolbar(new Toolbar("toolbar2",
                    "cut copy paste | searchreplace | bullist numlist | outdent indent blockquote | undo redo | link unlink anchor image media code | inserttime preview | forecolor backcolor"));
    settings.addToolbar(new Toolbar("toolbar3",
        "table | hr removeformat | subscript superscript | charmap emoticons | print fullscreen | ltr rtl | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft"));
   
        // custom settings
        String styleFormats = "style_formats : ["
                + "{title : 'Bold text', inline : 'b'},"
View Full Code Here

TOP

Related Classes of wicket.contrib.tinymce4.TinyMceBehavior

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.