ogobrecht / markdown-apex-plugin

Oracle APEX Dynamic Action Type Plugin: Markdown
https://apex.oracle.com/pls/apex/f?p=66154
Other
16 stars 1 forks source link

Add support for APEX 20.1 #12

Closed jetsaredim closed 4 years ago

jetsaredim commented 4 years ago

We recently upgraded our APEX environment to 20.1 and this plugin seems to have stopped working. Are there any plans to upgrade the support to include 20.1?

Basically, the preview pane doesn't appear to be picking up the code from the editor to process it. Any suggestions?

ogobrecht commented 4 years ago

Hi Jared,

I have tested it on a 20.1 instance in a Universal Theme app. It works - on premise and also on apex.oracle.com.

But my sample application (which uses the older theme "Blue Responsive - 25") is also broken. I have with this old theme the problem to load a JavaScript library (https://static.oracle.com/cdn/apex/20.1.0.00.13-a/libraries/modernizr/2.6.2/modernizr.min.js?v=20.1.0.00.13). No idea, if this is one reason for the problem. The Markdown editor itself is working - only the preview is missing.

Can you provide me more details about your application (theme, JS errors from the browser console, ...)?

Shame on me - I should have had a look at my demo app by myself or migrated it to universal theme already...

Best regards Ottmar

jetsaredim commented 4 years ago

From what I can tell, we're using "Scarlet - 300" Theme. I'm not seeing any errors specifically when I look at the browser console. (I'm using Chrome, maybe I'm not looking in the right place?)

Also, I'm not sure what you mean by Universal Theme. I'm not experienced in APEX development and only trying to fix an application that was coded by someone that is no longer available.

ogobrecht commented 4 years ago

Hi Jared,

the Universal Scheme is the standard theme for APEX apps from APEX 5.0 onwards. It is universal in the sense that it is working nicely on all devices - from big PC screens up to small smartphone screens. I think it is the standard in most APEX applications these days...

Regarding your problem: APEX 20.1 has an integrated Markdown editor. Please try to use this editor. Therefore your need to change the type of your current editor item from text area to the integrated Markdown editor. For other markdown conversions with my plugin (all other HTML tags with the class "markdown" in your page) you still need my Dynamic Action plugin.

Hope this helps. Please let me know your progress.

Currently, I can not put too much time into open source development - I am going on holiday for several weeks. Sorry about that. I will revisit my plugin after I am back from my holidays.

Best regards Ottmar

jetsaredim commented 4 years ago

So, I tried a couple things:

  1. I noticed the version of the plugin was 1.1, so I upgraded that to 1.3
  2. I attempting to convert the app to use the universal theme

Neither had the intended effect of bringing back the preview. In the case of converting the theme, it made a bunch of changes to the layout of the application such that I could not revert to the previous theme but instead had to import a backup copy to restore the previous incarnation.

You mention using the markdown editor which is included in APEX 20.1. I don't see anything in the docs or Google search for this feature. As I mentioned previously there doesn't appear to be any explicit error being reported in the js console in the browser. Do you think there is something in the newer version that might be preventing the plugin from being loaded by default? Like some setting that we have to change to have it rendered?

ogobrecht commented 4 years ago

Hi Jared,

please try to create a new empty app, import the markdown plugin and create a text area with the class markdown - this should work (I have no idea why the other themes are not working, there are no JS errors...)

Here a screenshot how to find the integrated Markdown editor as an alternative:

image

Hope this helps.

Best regards Ottmar

jetsaredim commented 4 years ago

Ok, thanks. I ended up switching to the Markdown Editor element as you suggested. Going to close this.

ogobrecht commented 4 years ago

Hi Jared,

thank you for your feedback.

Best regards Ottmar

ma-schroeder commented 4 years ago

Hi, i just came accross the same problem after upgrading our instances to APEX version 20.1. Each textarea has a setting called "Character Count" (Zeichenzähler in German). I found out that you need to disable this setting to use the mardown-plugin. Otherwise the class "markdown" gets stripped from the element on pageload and thus its not working.

ogobrecht commented 4 years ago

Hi @ma-schroeder ,

thank you for your feedback. And sorry for my late response - I was on vacation...

I think, this is a change (or bug) since APEX 20.1. I need to dig deeper. Hope I will find time for this soon...

Thanks again for the hint and shame on me - I should have checked the plug-in earlier before the final 20.1 release...

Best regards Ottmar