All Downloads are FREE. Search and download functionalities are using the official Maven repository.

wicket.contrib.tinymce.settings.ImageUploadPlugin Maven / Gradle / Ivy

There is a newer version: 6.30.0
Show newest version
package wicket.contrib.tinymce.settings;

import wicket.contrib.tinymce.image.ImageUploadPanel.ImageUploadBehavior;

/**
 * Tiny MCE plugin for image upload.
 * 
 * @author Michal Letynski 
 */
public class ImageUploadPlugin extends Plugin
{

	private static final long serialVersionUID = 1L;

	private PluginButton imageUploadButton;
	private String callbackName;

	public ImageUploadPlugin(ImageUploadBehavior imageUploadBehavior)
	{
		super("imageupload");
		imageUploadButton = new PluginButton("upload", this);
		callbackName = imageUploadBehavior.getCallbackName();
	}

	/**
	 * @return the imageUploadButton
	 */
	public PluginButton getImageUploadButton()
	{
		return imageUploadButton;
	}

	@Override
	protected void definePluginSettings(StringBuffer pBuffer)
	{
		super.definePluginSettings(pBuffer);
		pBuffer.append(",\n\tuploadimage_callback: \"" + callbackName + "\"");
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy