Modify

Opened 16 years ago

Closed 10 years ago

#3059 closed defect (wontfix)

[Patch] Save reference to TracWysiwyg object as textarea element attribute

Reported by: Erik M. Bray Owned by: Jun Omae
Priority: normal Component: TracWysiwygPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I have a few wiki-related plugins that use JavaScript and that are broken when users have the Wysiwyg mode enable (but work fine otherwise since they're operating on the textarea element). There's not much I can do to get around it without specifically modify the plugins to account for the possibility that the tracwysiwyg plugin is in use, and that's fine. But I found it difficult without this patch, since no reference to the TracWysiwyg object is kept anywhere convenient. So this just attaches it directly to the textarea DOM element itself, which works fine.

Attachments (2)

tracwysiwyg_save_reference-r3703.patch (512 bytes) - added by Erik M. Bray 16 years ago.
tracwysiwyg_save_reference-r3414.patch (682 bytes) - added by anonymous 16 years ago.
An update to this patch so that textareas that already have a wysiwyg editor are skipped in TracWysiwyg.initialize()

Download all attachments as: .zip

Change History (5)

Changed 16 years ago by Erik M. Bray

comment:1 Changed 16 years ago by Erik M. Bray

My only concern with this is, which I just noticed, is that it creates a reference cycle. I'll have to see if that really gets to be a problem, but it probably won't.

Changed 16 years ago by anonymous

An update to this patch so that textareas that already have a wysiwyg editor are skipped in TracWysiwyg.initialize()

comment:2 Changed 16 years ago by anonymous

The above update to the patch is sort of a corollary that I found useful. Sometimes I dynamically add new elements to a page that should have wysiwyg wiki editing enabled, so I re-call TracWysiwyg.initialize(). But sometimes there are existing elements on the page that already have wysiwyg editing enabled, so I need to skip those.

comment:3 Changed 10 years ago by Jun Omae

Resolution: wontfix
Status: newclosed

I think that is not good idea to save instance in textarae element. Instead, use TracWysiwyg.findInstance(textarea).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.