textedit
an simple text editor with syntax highlighting (codemirror)
highlight for syntax configured at the moment:
- html/xml
- css
Overview
- Name:
- textedit
- Namespace:
- http://litwan.com/yanel/resource/1.0
- Universal Name:
- <{http://litwan.com/yanel/resource/1.0}textedit/>
- Description:
- textedit resource type.
- Java Class:
- com.litwan.yanel.impl.resources.imageresizer.TextEditResource
Resource Configuration
the svg-edit resource needs a ExecutableUsecaseResource alike custom-config e.g.
<yanel:custom-config>
<views>
<view id="default" type="jelly-XML">
<template>rthtdocs:/textedit.jelly</template>
<mime-type>text/html</mime-type>
<xslt>/xslt/global.xsl</xslt>
</view>
<view id="done" type="jelly-text">
<template>rthtdocs:/textedit-status.jelly</template>
<mime-type>text/html</mime-type>
<xslt>/xslt/global.xsl</xslt>
</view>
<view id="cancel" type="jelly-text">
<template>rthtdocs:/textedit-status.jelly</template>
<xslt>/xslt/global.xsl</xslt>
<mime-type>text/html</mime-type>
</view>
</views>
</yanel:custom-config>
Request Paramter
- yanel.resource.svg-edit.editor-content
- the editors content
- yanel.resource.svg-edit.continue-path
- the path to go after the response.
Basic Example:
First you need to register the resource type as usual. add following line with the correct path to your (local.)resource-types.xml
<resource-type src="/home/simon/src/3k3-yanel-contrib/resource-types/textedit/" compile="true"/>
after this you need to add a matcher to the map.rc-map file e.g.
<matcher pattern="**.textedit.html" rcpath="/usecases/textedit.html.yanel-rc"/>
then you need to create in /usecses an svg-edit.html.yanel-rc file with following content.
<?xml version="1.0"?>
<yanel:resource-config xmlns:yanel="http://www.wyona.org/yanel/rti/1.0">
<yanel:rti name="textedit" namespace="http://litwan.com/yanel/resource/1.0"/>
<yanel:property name="matcher-extension" value=".textedit.html"/>
<yanel:custom-config>
<views>
<view id="default" type="jelly-XML">
<template>rthtdocs:/textedit.jelly</template>
<mime-type>text/html</mime-type>
<xslt>/xslt/global.xsl</xslt>
</view>
<view id="done" type="jelly-text">
<template>rthtdocs:/textedit-status.jelly</template>
<mime-type>text/html</mime-type>
<xslt>/xslt/global.xsl</xslt>
</view>
<view id="cancel" type="jelly-text">
<template>rthtdocs:/textedit-status.jelly</template>
<xslt>/xslt/global.xsl</xslt>
<mime-type>text/html</mime-type>
</view>
</views>
</yanel:custom-config>
</yanel:resource-config>
to edit http://localhost:8080/realm/css/screen.css go to http://localhost:8080/3k3-resource-type-demo/css/screen.css.textedit.html
release log
date version details 18.01.2011 1.0 first release
Demo
http://demo.yanel-contribution.3k3.org/textedit/example.xml.textedit.html
Source
browse svn repo: http://trac.yanel-contribution.3k3.org/browser/resource-types/textedit
checkout source:
svn co https://svn.3k3.org/repos/public/yanel/resource-types/textedit
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)