| This page (and all pages in the Tech: namespace) is a developer discussion about a feature that is either proposed for inclusion in JAMWiki or one that has already been implemented. This page is NOT documentation of JAMWiki functionality - for a list of documentation, see Category:JAMWiki.
Status of this feature: NOT IMPLEMENTED. Some code has been written, but due to technical issues this feature is proving extremely difficult to implement fully. See below for discussion.
|
MediaWiki+FCKEditor is a Javascript-based GUI editor that offers an interface suitable for rich editing. Integrating this editor as an option for JAMWiki would provide a much simpler interface for new users to use when creating and editing wiki pages.
Initial code committed on /branches/ronin.
I've gotten a proof-of-concept version that uses MediaWiki+FCKEditor with minimal configuration changes working locally. It appears that the toughest part of this work will be integrating the Mediawiki extension with JAMWiki in a non-obtrusive way:
I suspect that this is something that will actually be done for JAMWiki 1.0.0 (finally!) but it may take some time to think through all of the issues and actually get this implemented. -- Ryan • (comments) • 26-Jun-2010 10:02 PDT
I've started committing code for this integration in revision 3257. The integration will be using elements of the pre-built implementation from the CKEditor project. A few comments on that decision:
This integration may be a bit rockier initially than I'd like - much of the Mediawiki plugin has PHP dependencies that obviously won't be useful in a Java-based wiki like JAMWiki, so things like templates and image uploads probably won't be supported initially, if ever. I'm still in the process of building out a working integration, so it's possible that an unforeseen problem might cause the whole integration to be scrapped. That said, it looks like it should be possible to create at least a basic integration, making JAMWiki much more accessible to non-technical editors than it was previously. -- Ryan • (comments) • 30-Oct-2010 12:27 PDT
I've gotten a bit further, but have hit a significant snag - the FCKEditor integration does not seem to handle metadata like __NOTOC__, HTML comments or categories. I'm sure there will be other deficiencies, but this is a major one. One workaround would be to add something like a "WYSIWYG" mode to the parser, but I definitely don't like the idea of changing core parser code to support an editor. I'll give this more attention, but it's possible that this issue could lead to a JAMWiki 1.0.0 release that still does not include a WYSIWYG editor. -- Ryan • (comments) • 13-Nov-2010 12:19 PST
A few quick review comments:
edit.jsp can still specify the toolbar, and simply add an addition option for FCK. To do so modify /jamwiki-war/src/main/resources/jamwiki-configuration.xml to add another editor, and that editor can then be selected as the "preferred editor" from Special:Account. Admins can also specify it as the "default editor" from Special:Admin.I suspect you've already thought through some of these items, so please ignore anything that's not relevant. I didn't want to change anything on your branch, but if you want me to jump in and make a few updates to allow easier configuration or anything like that let me know - it's definitely cool to see this proceeding. -- Ryan • (comments) • 25-Mar-2009 20:01 PDT
Unable to load tag handler class "com.fredck.FCKeditor.tags.FCKeditorTag" for tag "fck:editor" when I try to run this code. I tried adding the FCK java-core to the POM (see below), but the taglib TLD is referencing classes that aren't in the java-core-2.4.1.jar file. Is there a config missing or am I doing something wrong? -- Ryan • (comments) • 29-Mar-2009 19:34 PDT<dependency> <groupId>net.fckeditor</groupId> <artifactId>java-core</artifactId> <version>2.4.1</version> </dependency>
FCKeditor-2.3.jar doesn't end up in the WAR file that is generated when I build your branch - I'll try to investigate this tomorrow, but if you have any ideas please feel free to commit whatever changes you feel are needed. Sorry this is taking a bit long, but life has gotten crazy since I've returned from vacation... -- Ryan • (comments) • 30-Mar-2009 22:36 PDT
If Fckeditor isn't working out - how about TinyMCE?
No worries. Another option that could be better is to GWTify your app. http://gwt.google.com/samples/Showcase/Showcase.html#!CwRichText It's maybe not as sexy as FCKEditor or TinyMCE but it's java (kind of) and it's rock solid. Integration should be a snap.
Any chance the GWT RTE could make it into 0.9? Signed --Forever grateful.
Simple way to add fckeditor as Jamwiki editor , You don't need to recomplie any code.
you are needs to add some code like this:
...
<c:choose>
<c:when test="${editor == 'toolbar'}">
<%@ include file="editor-toolbar-include.jsp" %>
</c:when>
<c:when test="${editor == 'fckeditor'}">
<%@ include file="editor-fckeditor-include.jsp" %>
</c:when>
</c:choose>
<c:choose>
<c:when test="${editor == 'toolbar'}">
<p>
<textarea id="topicContents" name="contents" rows="25" cols="80" accesskey=",">
<c:out value="${contents}" escapeXml="true" /></textarea>
</p>
</c:when>
</c:choose>
...
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<script type="text/javascript">
function FCKeditor_OnComplete(editorInstance) {
window.status = editorInstance.Description;
}
</script>
<FCK:editor instanceName="contents">
<jsp:attribute name="value">${contents}</jsp:attribute>
</FCK:editor>
...
<editors>
<editor>
<name>None</name>
<key>none</key>
</editor>
<editor>
<name>Toolbar</name>
<key>toolbar</key>
</editor>
<editor>
<name>FCKEditor</name>
<key>fckeditor</key>
</editor>
</editors>
...
jamwiki\
+->fckeditor
+->WEB-INF\
+->lib\
\commons-fileupload-1.2.1.jar
\commons-io-1.3.2.jar
\imageinfo-1.9.jar
\java-core-2.6.jar
\slf4j-api-1.5.8.jar
\slf4j-simple-1.5.8.jar
+->classes\
\fckeditor.properties
(If you install Jamwiki on Tomcat)
Sorry Again.
Thanks for this! I'll take a closer look over the coming days. My only concern would be whether or not the fckeditor-java-demo-2.6.war package is generating HTML or wiki markup, since if it generates HTML then some features (like categories and wikilinks) would then be unavailable. However, the integration with the MediaWiki+FCKEditor package is very similar to what you've described, and that package generates wiki markup using FCKEditor, so it should be just as easy to include. Thanks again for the suggestions! -- Ryan • (comments) • 01-Jul-2010 08:54 PDT
This MediaWiki+FCKEditor package , I found it was be modified to support wiki syntax , you can see it has a button (Wiki Text) , but needs to modify fckeditor source code. -- nobody ; 02-Jul-2010 09:07
Had a look at FCKEditor, and it's successor CKEditor. It seems like there isn't much activity + alot of bugs in that project. So I thought I'd point out a few other links / alternatives: wikis in gwt and wave rich text editor.
Here is another link: round trip render engine
I had a look at the Xwiki editor and it's a huge thing dependencies so I think staying away from that is definitely a good choice. I did find a few other things: gwt-html-editor wysiwyg js-wiki-framework. If you are willing to remove wikitext markup from jamwiki entirely, I could probably join the project and build you something alot better than gwt-html-editor but keeping that (wikitext) in and trying to roundtrip between them (esp in the browser) seems like alot of complexity, though wikiwyg could be decent... The demo it ships with seems to work ok.
Touche. Thanks for the feedback.
Archived from the Feedback page:
I haven't had any time to play around with trying to integrate a WYSIWYG editor into JAMWiki but I thought it might be worthwhile to note that Wikia's use of their editor (I don't know which one they use) seems to be pretty sophisticated and they appear to have worked out or be in the process of working out accomodations with some of the higher-level MediaWiki functionality like templates and image embedding. --Floating World 01-Feb-2010 08:37 PST