Package wicket.contrib.tinymce4

Source Code of wicket.contrib.tinymce4.TinyMceInitializer

package wicket.contrib.tinymce4;

import org.apache.wicket.Application;
import org.apache.wicket.IInitializer;
import org.apache.wicket.markup.html.IPackageResourceGuard;
import org.apache.wicket.markup.html.SecurePackageResourceGuard;

public class TinyMceInitializer implements IInitializer
{

  public void init(Application application)
  {
    application.getRootRequestMapperAsCompound().add(new TinyMceRequestMapper());

    // Resource Package Guard security settings to fix .htm file problem
    IPackageResourceGuard packageResourceGuard = application.getResourceSettings().getPackageResourceGuard();
    if (packageResourceGuard instanceof SecurePackageResourceGuard)
    {
      SecurePackageResourceGuard guard = (SecurePackageResourceGuard) packageResourceGuard;
      guard.addPattern("+wicket/contrib/tinymce/tiny_mce/**/*.htm");
    }
  }

  public void destroy(Application application)
  {
  }
}
TOP

Related Classes of wicket.contrib.tinymce4.TinyMceInitializer

TOP
Copyright © 2018 www.massapi.com. 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.