#1682 closed enhancement (wontfix)
wysiwyg wiki editor
Reported by: | 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@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal 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)
Change History (40)
comment:1 by , 20 years ago
comment:2 by , 19 years ago
Summary: | switch between wysiwyg and wiki editor → wysiwyg wiki editor |
---|---|
Type: | defect → enhancement |
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 by , 19 years ago
Cc: | added |
---|
comment:4 by , 19 years ago
The translation from HTML to Wiki has obviously been solved in the moin moin code.
comment:5 by , 19 years ago
Cc: | added |
---|
comment:6 by , 19 years ago
Cc: | added |
---|
comment:7 by , 19 years ago
Cc: | added |
---|
comment:8 by , 19 years ago
Cc: | added |
---|
comment:9 by , 19 years ago
Cc: | added |
---|
comment:10 by , 19 years ago
Cc: | added |
---|
by , 19 years ago
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 by , 19 years ago
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 by , 19 years ago
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 by , 19 years ago
Component: | general → wiki |
---|---|
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 by , 19 years ago
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 by , 19 years ago
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 by , 19 years ago
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 by , 19 years ago
Cc: | added |
---|
comment:19 by , 19 years ago
Cc: | added |
---|
by , 19 years ago
Attachment: | TraciWyg-0.5-py2.4.egg added |
---|
traciwyg (wikiwyg) plugin integration example
comment:20 by , 19 years ago
thanks to alec i found now where to put the integration stuff. installation:
- put the plugin in a trac instance plugin dir
- apply the patch to trac-trunk
- 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 by , 19 years ago
uhm … sorry. i did the diff in the wrong direction. the id=wikipage is the addition.
comment:22 by , 19 years ago
Cc: | added |
---|
comment:23 by , 19 years ago
Cc: | added |
---|
comment:24 by , 18 years ago
Cc: | added |
---|
comment:25 by , 18 years ago
Cc: | added |
---|
comment:26 by , 18 years ago
Cc: | added |
---|
comment:28 by , 18 years ago
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 by , 18 years ago
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 by , 18 years ago
Cc: | added |
---|
Just wanted to CC myself, adding this comment to avoid spam detection.
comment:31 by , 18 years ago
Cc: | added |
---|
comment:32 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
works now nearly flawless with th:TracWysiwygPlugin. thanks to japanese jun66j5 quality :)
comment:33 by , 17 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
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 by , 16 years ago
Cc: | added |
---|
comment:35 by , 15 years ago
Cc: | 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 by , 15 years ago
Milestone: | 2.0 |
---|---|
Resolution: | → wontfix |
Status: | reopened → closed |
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 by , 13 years ago
see also CkEditorPlugin, which is a Wysiwyg wiki editor plugin using the open-source CKEditor
comment:38 by , 13 years ago
Cc: | added |
---|
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