Support for CKEditor (replaces FCKEditor) in standard theme engine
git-svn-id: https://svn.libreccm.org/ccm/trunk@4777 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
9583369005
commit
b851db5f68
|
|
@ -186,74 +186,33 @@
|
||||||
|
|
||||||
<!-- DE Benutze FCKEditor -->
|
<!-- DE Benutze FCKEditor -->
|
||||||
<!-- EN Use FCKEditor -->
|
<!-- EN Use FCKEditor -->
|
||||||
<xsl:template match="bebop:fckeditor">
|
<xsl:template match="bebop:ckeditor">
|
||||||
|
|
||||||
<xsl:variable name="first-match">
|
<xsl:variable name="first-match">
|
||||||
<xsl:value-of select="//bebop:fckeditor/@name"/>
|
<xsl:value-of select="//bebop:ckeditor/@name"/>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<!-- EN Start of the FCKeditor component code -->
|
<!-- EN Start of the CKeditor component code -->
|
||||||
<xsl:if test="@name=$first-match">
|
<xsl:if test="@name=$first-match">
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript" src="/assets/ckeditor/ckeditor.js">
|
||||||
_editor_url = "/assets/fckeditor/";
|
|
||||||
_editor_lang = "en";
|
|
||||||
var numEd = 0;
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="/assets/fckeditor/fckeditor.js"/>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<xsl:for-each select="//bebop:fckeditor">
|
<xsl:value-of select="concat('ckeditorConfig = \'', //bebop:ckeditor/bebop:config/@path ,'\'')" />
|
||||||
var editor_<xsl:value-of select="@name"/> = null;
|
|
||||||
</xsl:for-each>
|
|
||||||
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
<xsl:for-each select="//bebop:fckeditor">
|
CKEditor.replaceAll(
|
||||||
editor_<xsl:value-of select="@name"/> = new FCKeditor("ta_<xsl:value-of select="@name"/>") ;
|
'ckeditor',
|
||||||
editor_<xsl:value-of select="@name"/>.Width =
|
customConfig: ckeditorConfig);
|
||||||
<xsl:choose>
|
};
|
||||||
<xsl:when test="@metadata.width">
|
|
||||||
'<xsl:value-of select="@metadata.width"/>';
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
'100%';
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
editor_<xsl:value-of select="@name"/>.Height =
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="@metadata.height">
|
|
||||||
'<xsl:value-of select="@metadata.height"/>';
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
'400';
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
|
|
||||||
editor_<xsl:value-of select="@name"/>.BasePath = "/assets/fckeditor/" ;
|
|
||||||
editor_<xsl:value-of select="@name"/>.PluginsPath = editor_<xsl:value-of select="@name"/>.BasePath + "editor/plugins/" ;
|
|
||||||
<xsl:if test="bebop:config/@path">
|
|
||||||
editor_<xsl:value-of select="//bebop:fckeditor/@name"/>.Config['CustomConfigurationsPath'] = "<xsl:value-of select="//bebop:fckeditor/bebop:config/@path"/>";
|
|
||||||
</xsl:if>
|
|
||||||
editor_<xsl:value-of select="@name"/>.ToolbarSet = "Basic";
|
|
||||||
editor_<xsl:value-of select="@name"/>.ReplaceTextarea();
|
|
||||||
}
|
|
||||||
</xsl:for-each>
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--
|
<!-- EN End of CKeditor setup -->
|
||||||
<style type="text/css">
|
|
||||||
textarea { background-color: #fff; border: 1px solid 00f; }
|
|
||||||
</style>
|
|
||||||
-->
|
|
||||||
</xsl:if>
|
|
||||||
<!-- EN End of FCKeditor setup -->
|
|
||||||
|
|
||||||
<xsl:call-template name="process-label">
|
<xsl:call-template name="process-label">
|
||||||
<xsl:with-param name="widget" select="."/>
|
<xsl:with-param name="widget" select="."/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<textarea id="ta_{@name}" name="{@name}" style="width:100%" rows="{@rows}" cols="{@cols}" wrap="{@wrap}">
|
<textarea id="ta_{@name}" name="{@name}" class="ckeditor" style="width:100%" rows="{@rows}" cols="{@cols}" wrap="{@wrap}">
|
||||||
<xsl:value-of disable-output-escaping="no" select="text()"/>
|
<xsl:value-of disable-output-escaping="no" select="text()"/>
|
||||||
</textarea>
|
</textarea>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue