Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about some plugin improvements #30

Open
AndreySolod opened this issue Apr 21, 2023 · 2 comments
Open

Question about some plugin improvements #30

AndreySolod opened this issue Apr 21, 2023 · 2 comments

Comments

@AndreySolod
Copy link

AndreySolod commented Apr 21, 2023

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
Copy link
Author

AndreySolod commented Apr 21, 2023

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant