wiki:TracWysiwygPlugin

Version 29 (modified by figaro, 8 years ago) (diff)

Further cosmetic changes

TracWiki WYSIWYG Editor Plugin

Description

This plugin implements a Wysiwyg editor embedded into textarea.wikitext.

Key features:

  • Generation of "native" Trac wikitext.
  • Supports heading 1-6, code block, quote format (slightly buggy on quote format).
  • Bold / italics / underline hotkeys are supported.
  • teletype, superscript, subscript, strikethrough.
  • hyperlinks, and automatic Trac link highlighting for CamelCase as you type (optional).
  • List formatting, allows you to select and change list levels very easily, as in MS Word.
  • Table Editor and the plugin is almost worth getting just for this point alone: the table editor allows add/remove columns, rows, etc as well as wiki format inside of the cells.
  • Trac macros shown as normal text but expand when saved and viewed in wiki.
  • Formatted code blocks.
  • I tested copy/paste in Firefox 2 and 3:
    • Paste into MS Word was tested and worked quite well (although links are not valid; instead of http whatever, you get hyperlinks that point to trac-links like wiki:TracWysiwygPlugin, which of course only Trac understands).
    • Paste into editor from MS Word worked somewhat, but I tested only styles that Trac wiki can support like headings, lists, bold/italics, etc. However, all special Word formatting (and even images) will appear (at least in Firefox 3), but when you save the page it will convert it down to the plain formatting that Trac supports.

Basic styling features in Firefox:

Further styling features in Internet Explorer:

Editing tables in Opera:

A reported problem is that sometimes the appearance is correct on the screen, but the result generated is different. However, this almost always happens when pasting in from external programs, but usually not in other situations.

Bugs/Feature Requests

Existing bugs and feature requests for TracWysiwygPlugin are here.

If you have any issues, create a new ticket.

defect

86 / 109

enhancement

12 / 27

task

0 / 1

Download

Download the zipped source from here.

Source

Check out TracWysiwygPlugin from here using Subversion, or browse the source with Trac.

Installation

  1. Install the plugin:
    • For Trac 0.10: easy_install https://trac-hacks.org/svn/tracwysiwygplugin/0.10
    • For Trac 0.11: easy_install https://trac-hacks.org/svn/tracwysiwygplugin/0.11
    • For Trac 0.12, 1.0 or later: easy_install https://trac-hacks.org/svn/tracwysiwygplugin/0.12
  2. Enable the plugin in your trac.ini file:
    [components]
    tracwysiwyg.* = enabled
    

The configuration options can be viewed on the TracIni page after installing the plugin.

Reviews

By JasonWinnebeck:

I wanted to try to highlight the current state of this plugin as of r2732 (revisited at r4135). This is a very promising plugin in Trac and sometimes it is hard to determine how far along plugins are in development. The short story is that it is about 95% of the way to being suitable for "production" use, and it is usable now if one is willing to stand small quirks or the occasional bug. My department uses it to help improve Trac adoption and team acceptance by users not used to wiki format. We have been using it for quite a long time now (since 0.10), and it does work well to allow these users to contribute.

Per the screenshots, all of the formatting is available. The biggest thing to note is that this plugin generates wiki code, not HTML or something else, so it will integrate with existing pages and work well with Trac's differences history, and installation is "revertible" in the sense that you can just opt to not use the editor if there are any problems.

I evaluated this originally in Firefox 2, and a little in IE6 on Trac 0.10.5dev, but today we are using it with Firefox 3, IE7, and Trac 0.11. What has happened in out long deployment is that the most technical users (programmers on our team) use the original "textarea" functionality, but non-technical users always use "wysiwyg," and are quite productive at using it, and I haven't heard any complaints.

By akaihola:

We're using r3092 with Trac 0.11b1, and it has so far worked very, very well for all the formatting we've used (headings, links, tables). Especially table editing is immensely helpful. We're using Firefox 2 exclusively on Ubuntu and WinXP. Warmly recommended!

Summary

For someone who is already a good Trac user, the quirks are easy enough to recognize and the tool is still quite helpful. For new users, the current state is a toss-up on whether to use it directly or train the users on wiki formatting. For almost all basic edits it works well, but quirks on atypical cases or handling of newlines can be surprising to new users.

Recent Changes

18546 by jun66j5 on 2023-06-06 09:05:30
TracWysiwygPlugin: enable universal of bdist_wheel and add classifiers
18482 by jun66j5 on 2022-04-11 07:53:15
TracWysiwygPlugin: use absolute length for font-size to fit toolbar height because font-size of root element is too large (closes #13873)
17972 by jun66j5 on 2021-01-26 03:41:52
TracWysiwygPlugin: use height: 0 rather than position: absolute in order to fix wrong layout when collapsing a section in ticket view
(more)

Author/Contributors

Author: jun66j5
Maintainer: jun66j5
Contributors: OpenGroove,Inc. and ciklone

Attachments (4)

Download all attachments as: .zip