@@ -14,6 +14,7 @@ define([
1414] , function ( configDirectiveGenerator , customDirectiveGenerator , wysiwyg , jQuery ) {
1515 return function ( config ) {
1616 var self = null ,
17+
1718 magentovariable = function ( editor ) {
1819 this . widget = {
1920 /**
@@ -30,8 +31,10 @@ define([
3031
3132 magentoVariables = JSON . parse ( config . placeholders ) ;
3233
33- if ( magentoVariables [ match [ 1 ] ] && magentoVariables [ match [ 1 ] ] [ 'variable_type' ] === 'default' ) {
34- imageHtml = '<span id="%id" class="magento-variable magento-placeholder mceNonEditable">' +
34+ if ( magentoVariables [ match [ 1 ] ]
35+ && magentoVariables [ match [ 1 ] ] [ 'variable_type' ] === 'default' ) {
36+ imageHtml = '<span id="%id" ' +
37+ 'class="magento-variable magento-placeholder mceNonEditable">' +
3538 '%s</span>' ;
3639 imageHtml = imageHtml . replace ( '%s' , magentoVariables [ match [ 1 ] ] [ 'variable_name' ] ) ;
3740 } else {
@@ -53,7 +56,8 @@ define([
5356
5457 magentoVariables = JSON . parse ( config . placeholders ) ;
5558
56- if ( magentoVariables [ match [ 1 ] ] && magentoVariables [ match [ 1 ] ] [ 'variable_type' ] === 'custom' ) {
59+ if ( magentoVariables [ match [ 1 ] ]
60+ && magentoVariables [ match [ 1 ] ] [ 'variable_type' ] === 'custom' ) {
5761 imageHtml = '<span id="%id" class="magento-variable magento-custom-var ' +
5862 'magento-placeholder mceNonEditable">%s</span>' ;
5963 imageHtml = imageHtml . replace ( '%s' , magentoVariables [ match [ 1 ] ] [ 'variable_name' ] ) ;
0 commit comments