View ID | Mime type | Type |
---|---|---|
DEFAULT | text/html | jelly |
fix-wellformness | text/html | jelly |
done | text/html | jelly |
cancel | text/html | jelly |
error | text/html | jelly |
Name | Explanations |
---|---|
edit-path | (deprecated, use map matcher and matcher-extension instead)a data repository path. points to the document you want to edit |
Name | Explanations |
---|---|
matcher-extension | is removed from the requested path to get the content path. E.g. '.tinymce-edit.html' (see: Map Matcher) |
<matcher pattern="**.tinymce-edit.html" rcpath="/tinymce.html.yanel-rc"/>
<?xml version="1.0"?> <yanel:resource-config xmlns:yanel="http://www.wyona.org/yanel/rti/1.0"> <yanel:rti name="tinymce" namespace="http://www.wyona.org/yanel/resource/1.0"/> <yanel:custom-config> <views> <view id="default" type="jelly"> <template>rthtdocs:/tinymce.jelly</template> <xslt>/xslt/global.xsl</xslt> <mime-type>text/html</mime-type> </view> <view id="fix-wellformness" type="jelly"> <template>rthtdocs:/tinymce-fix.jelly</template> <xslt>/xslt/global.xsl</xslt> <mime-type>text/html</mime-type> </view> <view id="done" type="jelly"> <template>rthtdocs:/tinymce-status.jelly</template> <xslt>/xslt/global.xsl</xslt> </view> <view id="cancel" type="jelly"> <template>rthtdocs:/tinymce-status.jelly</template> <xslt>/xslt/global.xsl</xslt> </view> <view id="error" type="jelly"> <template>rthtdocs:/tinymce-status.jelly</template> <xslt>/xslt/global.xsl</xslt> </view> </views> </yanel:custom-config> </yanel:resource-config>
Once you registered the tinymce resource in yanel (add <resource-type src="$TINYMCE_RESOURCE_HOME" compile="true"/> to yanels resource-types.xml)
and added the above mentioned .yanel-rc to
your realms resource-config (e.g. /usecases/tinymce.yanel-rc) repository
you can access tinymce via browser e.g. https://localhost:8443/yanel/$YOUR_REALM/usecases/tinymce.html?edit-path=/de/ueber.html.
you have to provide a request parameter "edith-path" in order to allow the tinymce resource to know which document to edit.
an example how to add this resource to the menu
Index: src/realms/yanel-website/src/java/org/wyona/yanel/servlet/menu/impl/YanelWebsiteMenu.java =================================================================== --- src/realms/yanel-website/src/java/org/wyona/yanel/servlet/menu/impl/YanelWebsiteMenu.java (revision 31673) +++ src/realms/yanel-website/src/java/org/wyona/yanel/servlet/menu/impl/YanelWebsiteMenu.java (working copy) @@ -61,7 +61,15 @@ sb.append("<ul><li>"); sb.append("<div id=\"yaneltoolbar_menutitle\">Edit</div><ul>"); - sb.append("<li class=\"haschild\">Open with   <ul><li>Source editor</li><li>WYSIWYG editor</li></ul></li>"); + sb.append("<li class=\"haschild\">Open with   "); + sb.append("<ul><li>Source editor</li>"); + sb.append("<li>WYSIWYG editor</li>"); + if (ResourceAttributeHelper.hasAttributeImplemented(resource, "Modifiable", "2")) { + sb.append("<li><a href=\"" + backToRealm + resource.getPath().substring(1) + "\">Edit page with tinyMCE   </a></li>"); + } else { + sb.append("<li><a>Edit page with tinyMCE   </a></li>"); + } + sb.append("</ul></li>"); if (ResourceAttributeHelper.hasAttributeImplemented(resource, "Versionable", "2")) { RevisionInformation[] revisions = ((VersionableV2) resource).getRevisions();