public class CkEditorWrapper
extends org.apache.wicket.markup.html.WebMarkupContainer
implements org.apache.wicket.markup.html.IHeaderContributor
WebMarkupContainer
and not a Panel so that we explicitly state the Markup in the calling component,
so its flexible to tweak and modify. One can also override this component and use in a Panel if we wish to associate markup.Modifier and Type | Class and Description |
---|---|
static class |
CkEditorWrapper.CKEditorConfigs |
Modifier and Type | Field and Description |
---|---|
static net.sf.json.util.PropertyFilter |
ckPropertyFilter |
protected CkEditorWrapper.CKEditorConfigs |
config |
protected String |
editorId |
Constructor and Description |
---|
CkEditorWrapper(String id,
org.apache.wicket.model.IModel<String> contentModel,
String editorId) |
Modifier and Type | Method and Description |
---|---|
protected void |
addCustomControls(org.apache.wicket.markup.html.WebMarkupContainer c)
In addition to main CkEditor, there may be added plugins, custom plugins we can add their behaviors here.
|
protected void |
addElements(org.apache.wicket.markup.html.WebMarkupContainer c)
Assumes custom functions createEditor() & removeEditor() exist and the
markup exist for:
|
CkEditorWrapper.CKEditorConfigs |
getConfigs() |
List<String> |
getCss()
All the CSS path that should be imported into the editor
|
protected org.apache.wicket.markup.html.WebMarkupContainer |
getExtraButtonsContainer(org.apache.wicket.markup.html.WebMarkupContainer parent)
An empty container is provided next to the last button to add new buttons via API if needed dynamically
|
protected String |
getRenderHead() |
void |
onInitialize() |
void |
renderHead(org.apache.wicket.markup.html.IHeaderResponse response) |
getMarkupType, getWebPage, getWebRequest
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeforeRender, onBeginRequest, onComponentTag, onConfigure, onDetach, onEndRequest, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap
protected CkEditorWrapper.CKEditorConfigs config
protected String editorId
public static net.sf.json.util.PropertyFilter ckPropertyFilter
protected void addElements(org.apache.wicket.markup.html.WebMarkupContainer c)
Example:
<td wicket:id="ckEditor">
<input wicket:id="originalContent" type="hidden" />
<a wicket:id="updateContentProxyLink">Proxy Link</a>
<input wicket:id="createEditor" type="button" value="Add / Edit" title='Modify the content' />
<input wicket:id="removeEditor" type="button" value="Read Only" style='display:none;'title='Ensure no accidental changes are made, and the content is only readable not editable' />
<input wicket:id="resetEditor" type="button" value="Reset" style='display:none;' title='Reset browser contents to content when page was opened. The state of this remains the same; even on saving. Only a page refresh changes the state. Also, this does not change the state on server/DB, use SAVE for that.' />
<br>
<div wicket:id="facetEditor"></div>
<div wicket:id="facetContents"><b style='font-size:0.8em;color:grey'><br>Last Edited:<br></b>
<span wicket:id="facetEditorContents" />
</div>
</td>
c
- protected org.apache.wicket.markup.html.WebMarkupContainer getExtraButtonsContainer(org.apache.wicket.markup.html.WebMarkupContainer parent)
parent
- as WebMarkupContainer
WebMarkupContainer
protected void addCustomControls(org.apache.wicket.markup.html.WebMarkupContainer c)
c
- public void onInitialize()
onInitialize
in class org.apache.wicket.Component
public CkEditorWrapper.CKEditorConfigs getConfigs()
protected String getRenderHead()
public void renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
renderHead
in interface org.apache.wicket.markup.html.IHeaderContributor
Copyright © 2018. All rights reserved.