[[PageOutline(2-5,Contents,pullout)]] = CKEditor Wysiwyg Plugin = == Description == Wysiwyg wiki editor plugin using the open-source [http://ckeditor.com/ CKEditor], inspired by TracWysiwygPlugin. '''NOTE: The `full_integration` mode is not recommended for use in production! It is still experimental, and under massive development.''' The plugin does not contain the [http://ckeditor.com/ CKEditor] source (get it from their [https://svn.ckeditor.com/CKEditor SVN] - require >= 3.6). After installation of both the plugin and [http://ckeditor.com/ CKEditor], set the `[ckeditor] editor_source` option for this plugin to the path of the CKEditor `ckeditor.js` script. The plugin has several modes of integration, determined by the `[ckeditor] editor_type` option: || `html_wrapper` || CKEditor with HTML output wrapped in html-processor || || `full_integration` || CKEditor with TracWiki output ('''experimental''') || || `only_ticket` || CKEditor with TracWiki output for ticket fields ('''experimental'''); ''leaves wiki editing as in Trac standard'' || || `only_wiki` || CKEditor with TracWiki output for wiki pages ('''experimental'''); ''leaves ticket editing as in Trac standard'' || || `none` || No integration - plain old textarea || ''Using `CKEditorPlugin` looks like this'': [[Image(sample.png)]] The `full_integration` mode is the holy grail, but currently just a handful of elements are supported in this mode (see the [source:ckeditorplugin/trunk/ckintegration/htdocs/tracwiki.js tracwiki plugin] for details on that) - '''help with this is needed! ''' Disclaimer: - Does not co-exist with TracWysiwygPlugin - have only one of them enabled. - When using the `html_wrapper` mode and editing an existing wiki page, the page will be rendered in HTML upon save (macros are lost, etc.) == Known Bugs / Limitations == - marker and text color is not working in headers (see [http://groups.google.com/group/trac-dev/browse_thread/thread/a6d12d574c3544ca Google-Groups]) - when inserting an image, only full path to image is working - when entering a link manually, it is printed with an exclemation mark, see #9562 - Escaping of CamelCase words is only working the first time, see #9563 - copying lists from MS Word (tested with Word 2003) is not always working completely (in some browsers it the deep intention is lost) == Help Wanted == Help wanted for further development: - Killer Feature: Support TracWiki syntax (by HTML<->TracWiki conversions? or by making CKEditor's rendering engine emit TracWiki?) - Insert WikiLinks using cool dialogs (e.g. choose existing page from TitleIndex, insert link to stubbed page & open new tab to create the stubbed page) - Insert other kinds of TracLinks using cool dialogs (changesets, tickets, other resources...) - Insert images intuitively (selector from attachments / repositories / upload from file-system as attachment or into repository, maybe even drag-and-drop) - Macro-awareness - select macro to insert from supported macros, expand inserted macros inline == Bugs/Feature Requests == Existing bugs and feature requests for CkEditorPlugin are [report:9?COMPONENT=CkEditorPlugin here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=CkEditorPlugin&owner=itamarost&release=0.12 new ticket]. == Download == Download the zipped source from [download:ckeditorplugin here]. == Source == You can check out CkEditorPlugin from [http://trac-hacks.org/svn/ckeditorplugin here] using Subversion, or [source:ckeditorplugin browse the source] with Trac. == Installation == Install the plugin: {{{ easy_install http://trac-hacks.org/svn/ckeditorplugin/trunk }}} Get the CKEditor package and deploy it in a URL-accessible path, e.g. the `htdocs` directory of your Trac environmemt: {{{ $ mkdir /path/to/trac-env/htdocs/js $ svn checkout http://svn.ckeditor.com/CKEditor/releases/stable /path/to/trac-env/htdocs/js/ckeditor }}} == Configuration == Enable it from the Plugins section of the Administration panel, or by adding the following to the `[components]` section of your `trac.ini`: {{{ #!ini [components] ckintegration.* = enabled }}} === Options === The following options can be specified in the `[ckeditor]` section of your `trac.ini`: '''code_styles''' List of code styles, which should be processed by CKEditor and displayed in CKEditor dialog 'insert code'. Possible types are one of ''[http://pygments.org/ pygments-styles]''. ''default values:'' cpp, csharp, java, js, python, sql, default, xml '''editor_type''' Type of integrated editor. Possible types are: - `full_integration`: CKEditor with TracWiki output ('''experimental'''), - `only_ticket`: CKEditor with TracWiki output for ticket fields ('''experimental'''); ''leaves wiki editing as in Trac standard'', - `only_wiki`: CKEditor with TracWiki output for wiki pages ('''experimental'''); ''leaves ticket editing as in Trac standard'', - `html_wrapper`: CKEditor with HTML output wrapped in html-processor, - `none`: No integration - ''leaves editing as in Trac standard'' ''default value:'' full_integration '''editor_source''' Path to CKEditor 3.6.x javascript source. The path should be specified as viewed by the client, and must be accessible by the client-browser. A recommended setup involves installing CKEditor in the htdocs/js directory of the Trac environment, and setting this option to `site/js/ckeditor/ckeditor.js`. ''default value:'' `site/js/ckeditor/ckeditor.js` You can also type `[[TracIni(ckedior)]]` in any Wiki-Page to get a list of possible options and their descriptions; see also description in plugins-panel. == Example == Sample configuration (default values shown): {{{ #!ini [ckeditor] code_styles = cpp, csharp, java, js, python, sql, default, xml editor_type = full_integration editor_source = site/js/ckeditor/ckeditor.js }}} == Recent Changes == [[ChangeLog(ckeditorplugin, 5)]] == Author/Contributors == '''Author:''' Edan Maor, [wiki:itamarost] [[BR]] '''Maintainer:''' [wiki:itamarost] [[BR]] '''Contributors:''' framay