Edgewall Software
Modify

Opened 13 years ago

Closed 8 years ago

Last modified 6 years ago

#1682 closed enhancement (wontfix)

wysiwyg wiki editor

Reported by: mlichman@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: wiki system Version: 0.8.1
Severity: normal Keywords: wysiwyg editor
Cc: mjhweb-tractickets@…, dserodio@…, ttingey@…, panagiotis.korros@…, jeffhung@…, philip.tran@…, nick+trac@…, jens@…, daved@…, mbertier@…, sstarr@…, bryan@…, hw@…, felix@…, ellis@…, sromanow@…, rtimon@…, Drop_s@…, franz.mayer@…
Release Notes:
API Changes:

Description

Allow users to switch between wiki markup edit mode and a wysiwyg editor such as fckeditor ala seedwiki (http://www.seedwiki.com/wiki/online_teaching_and_learning_issues/online_teaching_and_learning_issues.cfm?wpid=&edit=yes&editorchoice=3)

Attachments (2)

wikiwyg-0.5.zip (23.9 KB ) - added by soloturn 12 years ago.
a first prototype to review the concept. save not implemented, convert to wiki not yet correct, seems not yet working in internet explorer
TraciWyg-0.5-py2.4.egg (39.0 KB ) - added by soloturn 12 years ago.
traciwyg (wikiwyg) plugin integration example

Download all attachments as: .zip

Change History (40)

comment:1 Changed 13 years ago by Matthew Good

This is an interesting idea, though it's a bit complicated since the WYSIWYG editors produce HTML output which would need translated back to Trac's Wiki syntax.

See the mailing list thread about this starting here: http://lists.edgewall.com/archive/trac/2005-June/003465.html

comment:2 Changed 12 years ago by Matthew Good

Summary: switch between wysiwyg and wiki editorwysiwyg wiki editor
Type: defectenhancement

In #2212 the reporter mentioned Wikiwyg which is a Javascript library that handles the WYSIWYG editing and translation of the editor contents to Wiki markup. It looks like it allows overriding of the markup rules for the Wiki syntax.

Wikiwyg is licensed under the LGPL, so some care would need to be taken in how it was integrated since the core of Trac is BSD licensed.

comment:3 Changed 12 years ago by anonymous

Cc: mjhweb-tractickets@… added

comment:4 Changed 12 years ago by barry.scott@…

The translation from HTML to Wiki has obviously been solved in the moin moin code.

comment:5 Changed 12 years ago by dserodio@…

Cc: dserodio@… added

comment:6 Changed 12 years ago by anonymous

Cc: ttingey@… added

comment:7 Changed 12 years ago by anonymous

Cc: panagiotis.korros@… added

comment:8 Changed 12 years ago by anonymous

Cc: jeffhung@… added

comment:9 Changed 12 years ago by anonymous

Cc: philip.tran@… added

comment:10 Changed 12 years ago by anonymous

Cc: nick+trac@… added

comment:11 Changed 12 years ago by soloturn

added WysiWyg page to discuss implementation possibilities.

Changed 12 years ago by soloturn

Attachment: wikiwyg-0.5.zip added

a first prototype to review the concept. save not implemented, convert to wiki not yet correct, seems not yet working in internet explorer

comment:12 Changed 12 years ago by soloturn

i added an attachment to show how it could look like. its not a plugin (don't know how to do that). its a svn diff against trunk, revision 3136.

comment:13 Changed 12 years ago by soloturn

i forgot to mention that the edit-button is not overwritten. the wikiwyg edit only comes up if you double click on a wiki page.

comment:14 Changed 12 years ago by Christian Boos

Component: generalwiki
Keywords: wysiwyg editor added

The patch you provided is a bit broken, as the added binary files are not in. I'd suggest that instead, you should:

  • provide a link to or attach a well identified wikiwyg release
  • provide a patch against the above if you modify/add something to wikiwyg
  • finally provide a patch against Trac with your 3 templates/*.cs files

Then, when the above is done, you're not far away to the point you could package that in a plugin.

From a superficial look in the .cs, only the addition of the id="wikipage" seems to require core Trac changes. If I understand correctly, this means that there can be only one wikiwyg per page, which seems a bit limitative (think Ticket edition, you have the comment and description textareas…).

That was for the form, then for the content. Well, I'm a bit afraid that the Wiki formatter has grown a bit too complex to be adapted by just filling the markupRules. This will certainly require a lot of work.

comment:15 Changed 12 years ago by soloturn

the id="wikipage" is just an artificial restriction, because i just tried to extract a div tag which might be useful.

maybe you could take a look into mediawiki.js, functions media_wiki_init and klass.setup_wikiwyg_section? mediawiki has section edit and therefor must have solved this problem by default.

currently i just took trunk from http://svn.wikiwyg.net/code/trunk/wikiwyg/, r23, and flattened the lib,images, and css directories into the wikiwyg directory of the patch. but now that you say i think that was medium brilliant ;)

comment:16 Changed 12 years ago by Matthew Good

You don't need to add an id to the tag in order to get the DOM node. cssQuery is a convenient way to look up nodes using CSS-style selectors. You should be able to get the wiki editing fields like:

var wiki_editors = cssQuery("textarea.wikitext");

comment:17 Changed 12 years ago by anonymous

the current approach is to double click on some text, and then you are able to edit it (if you are allowed to). then save, and you are done.

but class "wikitext" is on the textarea, AFTER somebody decided to edit (i.e. after clicking the edit button)?

comment:18 Changed 12 years ago by anonymous

Cc: jens@… added

comment:19 Changed 12 years ago by anonymous

Cc: daved@… added

Changed 12 years ago by soloturn

Attachment: TraciWyg-0.5-py2.4.egg added

traciwyg (wikiwyg) plugin integration example

comment:20 Changed 12 years ago by anonymous

thanks to alec i found now where to put the integration stuff. installation:

  1. put the plugin in a trac instance plugin dir
  2. apply the patch to trac-trunk
  3. restart trac

useage: double click on wiki text, e.g. double click into the main page.

i uploaded the integration demo plugin. wikiwyg-0.5.zip should be removed. integration is done via:

$ svk diff //trac-trunk //mirror/trac-trunk
=== templates/wiki.cs
==================================================================
--- templates/wiki.cs   (/trac-trunk)   (revision 53)
+++ templates/wiki.cs   (/mirror/trac-trunk)    (revision 53)
@@ -197,7 +197,7 @@
     if wiki.action == "preview" ?>
      <fieldset id="preview">
       <legend>Preview (<a href="#edit">skip</a>)</legend>
-      <div id="wikipage" class="wikipage"><?cs var:wiki.page_html ?></div>
+      <div class="wikipage"><?cs var:wiki.page_html ?></div>
      </fieldset><?cs
      elif wiki.action =="collision"?>
      <div class="system-message">
@@ -273,7 +273,7 @@
    </form>
   <?cs /if ?>
   <?cs if wiki.action == "view" ?>
-   <div id="wikipage" class="wikipage">
+   <div class="wikipage">
     <div id="searchable"><?cs var:wiki.page_html ?></div>
    </div>
    <?cs if:len(wiki.attachments) ?>

the following things are not solved:

  • save (not at all)
  • html - wiki convert (just partially)
  • image links for the buttons (are broken)

comment:21 Changed 12 years ago by soloturn

uhm … sorry. i did the diff in the wrong direction. the id=wikipage is the addition.

comment:22 Changed 12 years ago by anonymous

Cc: mbertier@… added

comment:23 Changed 12 years ago by anonymous

Cc: sstarr@… added

comment:24 Changed 12 years ago by anonymous

Cc: bryan@… added

comment:25 Changed 11 years ago by Holger Winkelmann <hw@…>

Cc: hw@… added

comment:26 Changed 11 years ago by anonymous

Cc: felix@… added

comment:27 Changed 11 years ago by ThurnerRupert

comment:28 Changed 11 years ago by Christian Boos

Milestone: 2.0

Leaving this open in order to document what should be improved in the WikiEngine so that interoperability with Trac plugins can be improved.

comment:29 Changed 11 years ago by anonymous

I wanted to note that there is working plugin called TinyMceWikiPlugin. I managed to get it working on 0.9.3 (pay close attention to the included README, for it includes one critical instruction not found at the above link!), and it is usable. However it does more-or-less permanently mangle the clean wikitext of any page it edits, so may not be workable for some uses.

However my efforts to get TinyMceWikiPlugin working on 0.10.x failed. Apparently a patch is needed, and one has been built, but as documented here, all links to it seem to be empty.

C'est la vie. The WikiWygPlugin approach would be far better (it emits true wiki text), but it's still in the over, and probably won't finish baking for several months at least.

comment:30 Changed 11 years ago by ellis@…

Cc: ellis@… added

Just wanted to CC myself, adding this comment to avoid spam detection.

comment:31 Changed 11 years ago by sromanow@…

Cc: sromanow@… added

comment:32 Changed 10 years ago by ThurnerRupert

Resolution: fixed
Status: newclosed

works now nearly flawless with th:TracWysiwygPlugin. thanks to japanese jun66j5 quality :)

comment:33 Changed 10 years ago by spstarr

Resolution: fixed
Status: closedreopened

I would rather this not be closed unless this is an official merge into Trac?

Can someone confirm this is part of trac now or it will remain a trac-hack component?

comment:34 Changed 10 years ago by rtimon@…

Cc: rtimon@… added

comment:35 Changed 8 years ago by Drop_s@…

Cc: Drop_s@… added

Nice plugin! Thank author for the really good job. We have started to use this plugin in our work. Before this plugin I tried to create some process specification using "plain" Wiki syntax. This was like in hell and we returned to MS Word. I will add my review notes after full testing of the plugin functionality.

I am interesting, do you plan support of color text button?

comment:36 Changed 8 years ago by Remy Blank

Milestone: 2.0
Resolution: wontfix
Status: reopenedclosed

Please move this discussion over to trac-hacks, close to the plugin itself. And to reply to comment:33, no this functionality will remain as a plugin.

comment:37 Changed 6 years ago by franz.mayer@…

see also CkEditorPlugin, which is a Wysiwyg wiki editor plugin using the open-source CKEditor

comment:38 Changed 6 years ago by franz.mayer@…

Cc: franz.mayer@… added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .

 
Note: See TracTickets for help on using tickets.