MayamaTakeshi / redmine_rt

Redmine plugin for Real-Time notification of events
GNU General Public License v3.0
24 stars 4 forks source link

Question about some plugin improvements #30

Open AndreySolod opened 1 year ago

AndreySolod commented 1 year ago

Hi, I have a question about plugin improvements. In order to display the wiki toolbar, as well as highlight the "apply" button when saving, I slightly modified the app/overrides/issues/show.rb file as follows: Code:

<fieldset><legend><%= l(:field_notes) %></legend>
<textarea cols='60' rows='3' class='wiki-edit' name='quick_notes_ta' id='quick_notes_ta'></textarea>

<% if @issue.safe_attribute? 'private_notes' %>
<input type='checkbox' value='1' name='quick_notes_private_cbox' id='quick_notes_private_cbox' checked/>
<label for='quick_private_notes'><%= l(:field_private_notes) %></label>
<% end %>

<button type='button' id='quick_notes_btn'><%= l(:button_submit) %></button>

</fieldset>

Replaced by:

<div class='box'>
  <%= text_area 'quick_notes', 'ta', :cols => 60, :rows => 10, :class => 'wiki-edit' %>
  <%= wikitoolbar_for 'quick_notes_ta' %>
</div>
<% if @issue.safe_attribute? 'private_notes' %>
<input type='checkbox' value='1' name='quick_notes_private_cbox' id='quick_notes_private_cbox' checked/>
<label for='quick_private_notes'><%= l(:field_private_notes) %></label>
<% end %>
<button type='submit' id='quick_notes_btn'><%= l(:button_submit) %></button>

Everything worked fine until I tried to use the redmine_wysiwyg_editor plugin - in this case I have no way to change the "Visual Editor" field, although everything is still displayed and changed correctly in Textile Do you happen to know what I might be missing here?

AndreySolod commented 1 year ago

Hi, Visual Editor is an WYSIWYG editor like Word, libreOffice, etc - in this field I can, for example, copy and paste Image by ctrl+c -> ctrl+v. My changes do not give full opportunities to use this editor, since there is still no way to add files (images) to the comment - these are small things, and I'm already thinking how to fix it. Now I can edit the "Textile" field ("Markdown"), but I can't edit the "Visual Editor" field, and since this editor makes it possible to add comments through the Visual Editor wherever there is a field with Textile (for example, on custom workflow from the redmine_custom_workflows plugin), and here it does not, then me and there was a similar vopos. On the issue of the error - I reproduced it, apparently, you forgot to delete </fieldset>: image After deleting this line, the error is gone I will write a little more when I come for another computer - I still have error #29 on this one.

UPD: Sorry, I forgot a wrote - to use WYSIWYG editor it need to enable him on a project - then in "note" fields on "edit Issue" add a new tab "Wisual Editor", and on text area add a new tab "Wisual Editor" - in "edit Issue" I can edit text on tab "Wisual Editor", but on text area I can't edit text on this tab.

AndreySolod commented 1 year ago

Hi, I am test the solution. When I use the reverse chronological order, everything works correctly, except for the fact that the visual Editor field is not cleared of text after adding a comment. The problem occurs only in direct chronological order