mikitex70 / redmine_drawio

Macro plugin to embed draw.io diagrams into Redmine wiki pages
MIT License
121 stars 51 forks source link

Toolbar button is shown in WYSIWYG editor (plugin) but not in Redmine markdown editor #119

Closed CSCSxx closed 1 year ago

CSCSxx commented 1 year ago

System: Redmine 5.0.2 Text formatter: Common Markdown (Github flavored) Plugin: https://github.com/taqueci/redmine_wysiwyg_editor

Since switching to Redmine 5.x, we have been using the WYSIWYG editor instead of the CK editor as before. So the only option we had was to switch the text formatter to Common Markdown, as that was the only one left that rendered the CK editor's HTML elements reasonably correctly.

We have now installed drawio and it works so far, but:

Would be great if it works in WYSIWYG Editor!!!

mikitex70 commented 1 year ago

Hi @CSCSxx, the 1.4.3 version should fix your issue. The toolbar buttons now are working in the native and in the WYSIWYG editor. Thanks for reporting it.

CSCSxx commented 1 year ago

Hi @CSCSxx, the 1.4.3 version should fix your issue. The toolbar buttons now are working in the native and in the WYSIWYG editor. Thanks for reporting it.

Hello, First of all, many thanks for the super fast response and processing (really cool!). I migrated to the new version and lo and behold, the toolbar buttons appear in the native editor and work as well. However, they no longer appear in the plugin editor

mikitex70 commented 1 year ago

Hi @CSCSxx, you were right. The problem was a polling timeout in detecting when the TinyMCE editor is initialized: on recent (fast) machines the code was initializing too fast. I've reduced the timeout, now it seems to work find; try downloading the develop branch and let me know if it works.

CSCSxx commented 1 year ago

Ok, I installed the developer version. In most cases it works now, however I can keep reproducing a scenario where it doesn't work:

However, this is such a minimal error - if you know it ;)

Thanks again!

mikitex70 commented 1 year ago

Hi @CSCSxx, try to pull from the 'development' branch, I fixed the initialization of the toolbar and now the buttons should appear in every editor. I made some corrections in the macro insertion code as well, since sometimes the value was not saved after the change.

CSCSxx commented 1 year ago

Cool, it works. No matter what I wildly click back and forth, the buttons stay there :)