siavashs / Prism

Prism is a {code} macro plugin for Atlassian Jira
https://marketplace.atlassian.com/plugins/com.catawiki.jira.prism
BSD 3-Clause "New" or "Revised" License
10 stars 6 forks source link

Prism.Macros.Code.convert is not a function #41

Closed bugza closed 3 years ago

bugza commented 4 years ago

An error occurred in browser console:

Prism.Macros.Code.convert  is not a function, this macro won't be supported by converter:  code-macro  - it may result in data loss.

a.forConverter | @ | batch.js?agile_globa…true:formatted:5356
-- | -- | --
  | z | @ | batch.js?agile_globa…true:formatted:5412
  | (anonymous) | @ | batch.js?agile_globa…true:formatted:5647
  | l | @ | batch.js?locale=en-UK:10
  | u | @ | batch.js?locale=en-UK:10
  | s | @ | batch.js?locale=en-UK:10
  | window.require | @ | batch.js?locale=en-UK:15
  | serialize | @ | batch.js?agile_globa…richediton=true:462
  | A | @ | batch.js?locale=en-UK:954
  | trigger | @ | batch.js?locale=en-UK:952
  | a._onChange | @ | batch.js?agile_globa…true:formatted:1035
  | e | @ | tinymce.js?batch=false:10
  | fire | @ | tinymce.js?batch=false:10
  | (anonymous) | @ | tinymce.js?batch=false:8
  | e | @ | tinymce.js?batch=false:10
  | fire | @ | tinymce.js?batch=false:10
  | h | @ | tinymce.js?batch=false:11
  | a | @ | tinymce.js?batch=false:2
  | p | @ | tinymce.js?batch=false:2

 /* module-key = 'com.atlassian.jira.plugins.jira-editor-plugin:converter', location = '/js/converter/handlers/external-handler.js' */
    define("jira/editor/converter/handlers/external-handler", ["jira/editor/converter/handlers/node-handler", "jira/editor/converter/handlers/text-handler", "jira/editor/converter/new-lines/new-lines", "jira/editor/converter", "underscore"], function(d, f, c, e, b) {
        var a = d.extend({
            init: function(g) {
                this.node = g
            },
            children: function() {
                var g = this.external(this.getParams());
                return [f.createPreformattedTextHandler(g)]
            },
            getParams: function() {
                return Object.create(Object.prototype, {
                    node: {
                        value: this.node
                    },
                    innerMarkup: {
                        get: function() {
                            return e.handleMarkup(this.node.innerHTML)
                        }
                    }
                })
            }
        });
        a.forConverter = function(g) {
            var h = AJS.namespace(g["function"]);
            if (!b.isFunction(h)) {
                console.error(g["function"], " is not a function, this macro won't be supported by converter: ", g.selector, " - it may result in data loss.");
                return
            }
            d.addHandler(g.selector, a.extend({
                external: h
            }))
        }
        ;
siavashs commented 4 years ago

Hello @bugza would you please provide more information:

siavashs commented 3 years ago

Closing this as the issue must be fixed in the latest release, feel free to reopen.