On Mon, May 28, 2012 at 4:36 AM, liujinlong5788 <[email protected]> wrote: > Hello . I write a plugin in "org.xwiki.gwt.wysiwyg.client.plugin " as what > other plugins do , a plugin ,a pluginfactory, and execuable class.
You also need to "register" the plugin factory in WysiwygEditorFactory. >And I package it with maven ,copy the jar to lib , restart the tomcat ,but I >can't find the plugin written by me. The WYSIWYG editor is mostly written in Java but that is actually GWT code that needs to be compiled to JavaScript. The editor is a JavaScript widget, it runs on the client side, in the browser. JARs are for code executed on server side. You need to build xwiki-platform-wysiwyg-client (with your changes) and then xwiki-platform-wysiwyg-war to compile the Java code into JavaScript. Then you need to replace (don't overwrite) /resources/js/xwiki/wysiwyg/xwe folder from your XWiki instance with the one from the generated war. No server restart is needed (in this case), just clear your browser cache. >And I even copy the whole format plugin to another package ,and change the >name of it ,it can't be loaded neither.I mean I can't find them neither in >administrator wiki wysiwyg editor nor when I edit the document. Finally, to use your plugin you need to add it to the list of plugins in the WYSIWYG editor administration section, and also its features to the tool bar or menu bar. Hope this helps, Marius >So ,I wander is there anything else needed to do ? change the *.vm file or >js file ? Thanks a lot for helpping . > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

