taqueci / redmine_wysiwyg_editor

Redmine WYSIWYG Editor plugin
GNU General Public License v2.0
115 stars 27 forks source link

Preview is not working with Redmine Mentions plugin #82

Open Jamalc0m opened 4 years ago

Jamalc0m commented 4 years ago

When editing or adding new ticket, preview option is not working

Jamalc0m commented 4 years ago

@taqueci

taqueci commented 4 years ago

Hi @Jamalc0m

Please tell me:

Jamalc0m commented 4 years ago

Create new ticket

Type your description

image

Click preview

image

Nothing There!

Browser Chrome - Firefox

Installed plugins & Versions:

image

Console messages of development tool No error reported!

image

Note: Normal editor which comes with redmine working fine with no issue.

taqueci commented 4 years ago

Note to self: The plugin conflicts with Redmine Mentions plugin. Dockerfile.zip

Jamalc0m commented 4 years ago

any work around to fix ?

etoosamoe commented 4 years ago

same problem. we have Mentions plugin installed and preview is not working. Any fix?

etoosamoe commented 4 years ago

This trouble appears only in Issue editing\creating. May be there is any option to disable wysiwig in issues, only wiki?

taqueci commented 4 years ago

Hi @etoosamoe

You can hide visual editor in issue creating/editing by:

--- a/app/views/redmine_wysiwyg_editor/_redmine_wysiwyg_editor_partial.html.erb
+++ b/app/views/redmine_wysiwyg_editor/_redmine_wysiwyg_editor_partial.html.erb
@@ -52,6 +52,12 @@ function initRedmineWysiwygEditor() {
     $('.jstTabs, .jstElements, .jstEditor').css('visibility', 'visible');
   };

+  if (<%= @issue ? 'true' : 'false' %>) {
+    setVisible();
+    $('#content .jstBlock .jstTabs ul li:not(.tab-elements)').show();
+    return;
+  }
+
   var previewTab = $('.jstTabs .tab-preview');
   var previewButton = $('a[accesskey=r]');
etoosamoe commented 4 years ago

@taqueci thanks! it works. wysiwyg editor now disabled in issues, but works fine (with preview) in Wiki. nice workaround

varenius commented 3 years ago

I also have this problem. It would be nice to have the editor working also with preview in issues. Is there any plan to fix this incompatibility?