관리-도구
편집 파일: control.js.map
{"mappings":"AAGAA,GAAGC,UAAUC,mBAAkB,gBAAqBF,GAAGC,UAAUE,oBAAoBC,OAAM,CAC1FC,iBAAgB,SAAYC,GAC3B,IAAIC,EAASC,EAAQC,EAAIC,EAEzBH,GADAD,EAAUA,GAAOK,MACCC,UAAUC,KAAI,YAChCJ,EAAE,gBAA0BH,EAAQG,GAAGK,QAAO,IAAK,IAAOA,QAAO,IAAK,IAEtEJ,EAAa,CACZK,QAAO,CACNC,SAAS,GAEVC,WAAW,EACXC,cAAc,GAIVlB,GAAGQ,QAAUR,GAAGQ,OAAOW,YAC3BnB,GAAGQ,OAAOW,WAAYV,EAAIW,OAAOhB,OAAM,GAAMM,EAAeJ,EAAQe,OAAOC,WAG5Ed,EAASe,QAAQC,IAAKf,KAGrBD,EAAOiB,SAASC,KAAG,SAAYC,GAC9B,IAAIC,EAEJD,EAAGE,OACHD,EAAUpB,EAAOsB,aACjBvB,EAAQwB,IAAKH,GAAUI,QAAO,UAC9BhC,GAAGC,UAAUgC,SAAU3B,EAAQG,IAAKyB,IAAKN","sources":["src/control.js"],"sourcesContent":["import \"./control.scss\";\n\n/* global tinyMCE */\nwp.customize.controlConstructor[ 'kirki-editor' ] = wp.customize.kirkiDynamicControl.extend( {\n\tinitKirkiControl: function( control ) {\n\t\tvar element, editor, id, defaultParams;\n\t\tcontrol = control || this;\n\t\telement = control.container.find( 'textarea' );\n\t\tid = 'kirki-editor-' + control.id.replace( '[', '' ).replace( ']', '' );\n\n\t\tdefaultParams = {\n\t\t\ttinymce: {\n\t\t\t\twpautop: true\n\t\t\t},\n\t\t\tquicktags: true,\n\t\t\tmediaButtons: true\n\t\t};\n\n\t\t// Overwrite the default paramaters if choices is defined.\n\t\tif ( wp.editor && wp.editor.initialize ) {\n\t\t\twp.editor.initialize( id, jQuery.extend( {}, defaultParams, control.params.choices ) );\n\t\t}\n\n\t\teditor = tinyMCE.get( id );\n\n\t\tif ( editor ) {\n\t\t\teditor.onChange.add( function( ed ) {\n\t\t\t\tvar content;\n\n\t\t\t\ted.save();\n\t\t\t\tcontent = editor.getContent();\n\t\t\t\telement.val( content ).trigger( 'change' );\n\t\t\t\twp.customize.instance( control.id ).set( content );\n\t\t\t} );\n\t\t}\n\t}\n} );\n"],"names":["wp","customize","controlConstructor","kirkiDynamicControl","extend","initKirkiControl","control","element","editor","id","defaultParams","this","container","find","replace","tinymce","wpautop","quicktags","mediaButtons","initialize","jQuery","params","choices","tinyMCE","get","onChange","add","ed","content","save","getContent","val","trigger","instance","set"],"version":3,"file":"control.js.map"}