alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  
<td> <td> <input type="checkbox" name="remember" id="rememberme" /> </tr> <tr> <td> <td colspan="2">" /> </tr> </table> </wiki:CheckRequestContext> <p> <input name='ok' type='submit' value='Save' />          <input name='preview' type='submit' value='Preview' />          <input name='cancel' type='submit' value='Cancel' /> </p> </div> </form>

Other jforum examples (source code examples)

Here is a short list of links related to this jforum FCK.jsp source code file:

jforum example source code file (FCK.jsp)

This example jforum source code file (FCK.jsp) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - jforum tags/keywords

fck, fck, homepage, javascript, jspwiki, jspwiki, so, so, string, string, this, utf-8, you, your

The jforum FCK.jsp source code

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki"%>
<%@ page import="com.ecyrd.jspwiki.*" %>
<%@ page import="com.ecyrd.jspwiki.ui.*" %>
<%@ page import="org.apache.commons.lang.*" %>

<%--
    This provides the FCK editor for JSPWiki.
--%>
<%  WikiContext context = WikiContext.findContext( pageContext );
    String usertext = EditorManager.getEditedText(pageContext);
    TemplateManager.addResourceRequest( context, "script", "scripts/fckeditor/fckeditor.js" );
 %>   
<wiki:CheckRequestContext context="edit"><%
    if( usertext == null )
    {
        usertext = context.getEngine().getText( context, context.getPage() );
    }%>
</wiki:CheckRequestContext>
<% if( usertext == null ) usertext = "";
   String pageAsHtml = StringEscapeUtils.escapeJavaScript( context.getEngine().textToHTML( context, usertext ) );
%>

<form accept-charset="" 
      name="editForm" enctype="application/x-www-form-urlencoded">
    <p>
        <%-- Edit.jsp relies on these being found.  So be careful, if you make changes. --%>
        <input name="page" type="hidden" value="
        <input name="action" type="hidden" value="save" />
        <input name="edittime" type="hidden" value="<%=pageContext.getAttribute("lastchange",
                                                                       PageContext.REQUEST_SCOPE )%>" />
    </p>
<div>
<script type="text/javascript">
   var oFCKeditor = new FCKeditor( 'htmlPageText' );
   oFCKeditor.BasePath = 'scripts/fckeditor/';
   oFCKeditor.Value = '<%=pageAsHtml%>';
   oFCKeditor.Width  = '100%';
   oFCKeditor.Height = '500';
   oFCKeditor.ToolbarSet = 'JSPWiki';
   oFCKeditor.Config['CustomConfigurationsPath'] = '<wiki:Link format="url" jsp="scripts/fckconfig.js"/>';
   oFCKeditor.Create();
</script>
<noscript>
  <br>
  <div class="error">You need to enable Javascript in your browser to use the WYSIWYG editor
</noscript> <wiki:CheckRequestContext context="comment"> <table border="0" class="small"> <tr> <td>
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.