matcha-components 20.214.0 → 20.216.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/matcha-components.mjs +2238 -7
- package/fesm2022/matcha-components.mjs.map +1 -1
- package/index.d.ts +69 -4
- package/package.json +1 -1
|
@@ -14543,6 +14543,2231 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
14543
14543
|
}]
|
|
14544
14544
|
}] });
|
|
14545
14545
|
|
|
14546
|
+
// SunEditor core — extracted from suneditor.html
|
|
14547
|
+
// Do NOT edit directly. Source: design-system/temp/suneditor.html
|
|
14548
|
+
// The SUNEDITOR.create() call is intentionally omitted — MatchaTextEditorComponent calls it dynamically.
|
|
14549
|
+
const SUNEDITOR_JS = `
|
|
14550
|
+
if(typeof window.SUNEDITOR=='undefined') window.SUNEDITOR = {};
|
|
14551
|
+
|
|
14552
|
+
/** default language english */
|
|
14553
|
+
SUNEDITOR.defaultLang = {
|
|
14554
|
+
toolbar : {
|
|
14555
|
+
fontFamily : 'Font',
|
|
14556
|
+
fontFamilyDelete : 'Remove Font Family',
|
|
14557
|
+
formats : 'Formats',
|
|
14558
|
+
bold : 'Bold',
|
|
14559
|
+
underline : 'Underline',
|
|
14560
|
+
italic : 'Italic',
|
|
14561
|
+
strike : 'Strike',
|
|
14562
|
+
fontColor : 'Font Color',
|
|
14563
|
+
hiliteColor : 'Background Color',
|
|
14564
|
+
indent : 'Indent',
|
|
14565
|
+
outdent : 'Outdent',
|
|
14566
|
+
align : 'Align',
|
|
14567
|
+
alignLeft : 'Align left',
|
|
14568
|
+
alignRight : 'Align right',
|
|
14569
|
+
alignCenter : 'Align center',
|
|
14570
|
+
justifyFull : 'Justify full',
|
|
14571
|
+
left : 'Left',
|
|
14572
|
+
right : 'Right',
|
|
14573
|
+
center : 'Center',
|
|
14574
|
+
bothSide : 'Justify full',
|
|
14575
|
+
list : 'list',
|
|
14576
|
+
orderList : 'Ordered list',
|
|
14577
|
+
unorderList : 'Unordered list',
|
|
14578
|
+
line : 'Line',
|
|
14579
|
+
table : 'Table',
|
|
14580
|
+
link : 'Link',
|
|
14581
|
+
image : 'Picture',
|
|
14582
|
+
video : 'Video',
|
|
14583
|
+
fullScreen : 'Full Screen',
|
|
14584
|
+
htmlEditor : 'Code View'
|
|
14585
|
+
},
|
|
14586
|
+
dialogBox : {
|
|
14587
|
+
linkBox : {
|
|
14588
|
+
title : 'Insert Link',
|
|
14589
|
+
url : 'URL to link',
|
|
14590
|
+
text : 'Text to display'
|
|
14591
|
+
},
|
|
14592
|
+
imageBox : {
|
|
14593
|
+
title : 'Insert Image',
|
|
14594
|
+
file : 'Select from files',
|
|
14595
|
+
url : 'Image URL',
|
|
14596
|
+
resize100 : 'resize 100%',
|
|
14597
|
+
resize75 : 'resize 75%',
|
|
14598
|
+
resize50 : 'resize 50%',
|
|
14599
|
+
resize25 : 'resize 25%',
|
|
14600
|
+
remove : 'remove image'
|
|
14601
|
+
},
|
|
14602
|
+
videoBox : {
|
|
14603
|
+
title : 'Insert Video',
|
|
14604
|
+
url : 'Media embed URL, YouTube',
|
|
14605
|
+
width : 'Width',
|
|
14606
|
+
height : 'Height'
|
|
14607
|
+
},
|
|
14608
|
+
submitButton : 'Submit'
|
|
14609
|
+
}
|
|
14610
|
+
};
|
|
14611
|
+
|
|
14612
|
+
/**
|
|
14613
|
+
* wysiwyg web editor
|
|
14614
|
+
*
|
|
14615
|
+
* suneditor.js
|
|
14616
|
+
* Copyright 2017 JiHong Lee.
|
|
14617
|
+
* MIT license.
|
|
14618
|
+
*/
|
|
14619
|
+
(function(){
|
|
14620
|
+
/**
|
|
14621
|
+
* utile func
|
|
14622
|
+
* @type {{returnTrue}}
|
|
14623
|
+
*/
|
|
14624
|
+
var func = (function(){
|
|
14625
|
+
return {
|
|
14626
|
+
returnTrue : function() {
|
|
14627
|
+
return true;
|
|
14628
|
+
}
|
|
14629
|
+
};
|
|
14630
|
+
})();
|
|
14631
|
+
|
|
14632
|
+
/**
|
|
14633
|
+
* document func
|
|
14634
|
+
* @type {{getArrayIndex, nextIdx, prevIdx, isCell, getListChildren, getParentNode, changeTxt, changeClass, addClass, removeClass, toggleClass}}
|
|
14635
|
+
*/
|
|
14636
|
+
var dom = (function(){
|
|
14637
|
+
return {
|
|
14638
|
+
getArrayIndex : function(array, element) {
|
|
14639
|
+
var idx = -1;
|
|
14640
|
+
|
|
14641
|
+
for(var i=0; i<array.length; i++) {
|
|
14642
|
+
if(array[i] === element) {
|
|
14643
|
+
idx = i;
|
|
14644
|
+
break;
|
|
14645
|
+
}
|
|
14646
|
+
}
|
|
14647
|
+
|
|
14648
|
+
return idx;
|
|
14649
|
+
},
|
|
14650
|
+
|
|
14651
|
+
nextIdx : function(array, item) {
|
|
14652
|
+
var idx = this.getArrayIndex(array, item);
|
|
14653
|
+
if (idx === -1) return -1;
|
|
14654
|
+
|
|
14655
|
+
return idx + 1;
|
|
14656
|
+
},
|
|
14657
|
+
|
|
14658
|
+
prevIdx : function(array, item) {
|
|
14659
|
+
var idx = this.getArrayIndex(array, item);
|
|
14660
|
+
if (idx === -1) return -1;
|
|
14661
|
+
|
|
14662
|
+
return idx - 1;
|
|
14663
|
+
},
|
|
14664
|
+
|
|
14665
|
+
isCell : function(node) {
|
|
14666
|
+
return node && /^TD$|^TH$/i.test(node.nodeName);
|
|
14667
|
+
},
|
|
14668
|
+
|
|
14669
|
+
getListChildren : function(element, validation) {
|
|
14670
|
+
var children = [];
|
|
14671
|
+
validation = validation || func.returnTrue;
|
|
14672
|
+
|
|
14673
|
+
(function recursionFunc(current){
|
|
14674
|
+
if (element !== current && validation(current)) {
|
|
14675
|
+
children.push(current);
|
|
14676
|
+
}
|
|
14677
|
+
for (var i = 0, len = current.children.length; i < len; i++) {
|
|
14678
|
+
recursionFunc(current.children[i]);
|
|
14679
|
+
}
|
|
14680
|
+
})(element);
|
|
14681
|
+
|
|
14682
|
+
return children;
|
|
14683
|
+
},
|
|
14684
|
+
|
|
14685
|
+
getParentNode : function(element, tagName) {
|
|
14686
|
+
var check = new RegExp("^"+tagName+"$", "i");
|
|
14687
|
+
|
|
14688
|
+
while(!check.test(element.tagName)) {
|
|
14689
|
+
element = element.parentNode;
|
|
14690
|
+
}
|
|
14691
|
+
|
|
14692
|
+
return element;
|
|
14693
|
+
},
|
|
14694
|
+
|
|
14695
|
+
changeTxt : function(element, txt) {
|
|
14696
|
+
element.textContent = txt;
|
|
14697
|
+
},
|
|
14698
|
+
|
|
14699
|
+
changeClass : function(element, className) {
|
|
14700
|
+
element.className = className;
|
|
14701
|
+
},
|
|
14702
|
+
|
|
14703
|
+
addClass : function(element, className) {
|
|
14704
|
+
if(!element) return;
|
|
14705
|
+
|
|
14706
|
+
var check = new RegExp("(\\s|^)" + className + "(\\s|$)");
|
|
14707
|
+
if(check.test(element.className)) return;
|
|
14708
|
+
|
|
14709
|
+
element.className += " " + className;
|
|
14710
|
+
},
|
|
14711
|
+
|
|
14712
|
+
removeClass : function(element, className) {
|
|
14713
|
+
if(!element) return;
|
|
14714
|
+
|
|
14715
|
+
var check = new RegExp("(\\s|^)" + className + "(\\s|$)");
|
|
14716
|
+
element.className = element.className.replace(check, " ").trim();
|
|
14717
|
+
},
|
|
14718
|
+
|
|
14719
|
+
toggleClass : function(element, className) {
|
|
14720
|
+
var check = new RegExp("(\\s|^)" + className + "(\\s|$)");
|
|
14721
|
+
|
|
14722
|
+
if (check.test(element.className)) {
|
|
14723
|
+
element.className = element.className.replace(check, " ").trim();
|
|
14724
|
+
}
|
|
14725
|
+
else {
|
|
14726
|
+
element.className += " " + className;
|
|
14727
|
+
}
|
|
14728
|
+
}
|
|
14729
|
+
};
|
|
14730
|
+
})();
|
|
14731
|
+
|
|
14732
|
+
/**
|
|
14733
|
+
* SunEditor
|
|
14734
|
+
* @param context
|
|
14735
|
+
*/
|
|
14736
|
+
var core = function(context){
|
|
14737
|
+
/** ë°°́—´ ê´€ë ¨ */
|
|
14738
|
+
var list = (function(){
|
|
14739
|
+
var commandMap = {
|
|
14740
|
+
'FONT': context.tool.fontFamily,
|
|
14741
|
+
'B' : context.tool.bold,
|
|
14742
|
+
'U' : context.tool.underline,
|
|
14743
|
+
'I' : context.tool.italic,
|
|
14744
|
+
'STRIKE' : context.tool.strike
|
|
14745
|
+
};
|
|
14746
|
+
|
|
14747
|
+
/** 글꼴 ëª©ë¡ ê°€́ ¸́˜¤ê¸° */
|
|
14748
|
+
var fontFamilyMap = {};
|
|
14749
|
+
var list_fontFamily = context.tool.list_fontFamily.children;
|
|
14750
|
+
|
|
14751
|
+
list_fontFamily[0].firstChild.getAttribute("data-value");
|
|
14752
|
+
for(var i=0; i<list_fontFamily.length; i++) {
|
|
14753
|
+
fontFamilyMap[list_fontFamily[i].firstChild.getAttribute("data-value").replace(/\s*/g,"")] = list_fontFamily[i].firstChild.getAttribute("data-txt");
|
|
14754
|
+
}
|
|
14755
|
+
|
|
14756
|
+
if(context.tool.list_fontFamily_add) {
|
|
14757
|
+
list_fontFamily = context.tool.list_fontFamily_add.children;
|
|
14758
|
+
for(var i=0; i<list_fontFamily.length; i++) {
|
|
14759
|
+
fontFamilyMap[list_fontFamily[i].firstChild.getAttribute("data-value").replace(/\s*/g,"")] = list_fontFamily[i].firstChild.getAttribute("data-txt");
|
|
14760
|
+
}
|
|
14761
|
+
}
|
|
14762
|
+
|
|
14763
|
+
list_fontFamily = null;
|
|
14764
|
+
|
|
14765
|
+
return {
|
|
14766
|
+
commandMap : commandMap,
|
|
14767
|
+
fontFamilyMap : fontFamilyMap
|
|
14768
|
+
}
|
|
14769
|
+
})();
|
|
14770
|
+
|
|
14771
|
+
/** selection ê´€ë ¨ */
|
|
14772
|
+
var wysiwygSelection = (function(){
|
|
14773
|
+
return {
|
|
14774
|
+
focus : function(){
|
|
14775
|
+
context.element.wysiwygWindow.document.body.focus();
|
|
14776
|
+
},
|
|
14777
|
+
|
|
14778
|
+
isEdgePoint : function(container, offset) {
|
|
14779
|
+
return (offset === 0) || (offset === container.nodeValue.length);
|
|
14780
|
+
},
|
|
14781
|
+
|
|
14782
|
+
createRange : function() {
|
|
14783
|
+
return context.element.wysiwygWindow.document.createRange();
|
|
14784
|
+
},
|
|
14785
|
+
|
|
14786
|
+
getSelection : function() {
|
|
14787
|
+
return context.element.wysiwygWindow.getSelection();
|
|
14788
|
+
},
|
|
14789
|
+
|
|
14790
|
+
getPElementInFocusNode : function() {
|
|
14791
|
+
var parentElement = context.argument._selectionNode;
|
|
14792
|
+
while(!/^P$/i.test(parentElement.tagName) && !/^BODY$/i.test(parentElement.tagName)) {
|
|
14793
|
+
parentElement = parentElement.parentNode;
|
|
14794
|
+
}
|
|
14795
|
+
|
|
14796
|
+
return parentElement;
|
|
14797
|
+
}
|
|
14798
|
+
}
|
|
14799
|
+
})();
|
|
14800
|
+
|
|
14801
|
+
/** ́—디터 */
|
|
14802
|
+
var editor = (function(){
|
|
14803
|
+
return {
|
|
14804
|
+
subMenu : null,
|
|
14805
|
+
originSub : null,
|
|
14806
|
+
modalForm : null,
|
|
14807
|
+
tabSize : 4,
|
|
14808
|
+
|
|
14809
|
+
pure_execCommand : function(command, showDefaultUI, value) {
|
|
14810
|
+
context.element.wysiwygWindow.document.execCommand(command, showDefaultUI, value);
|
|
14811
|
+
},
|
|
14812
|
+
|
|
14813
|
+
cancel_table_picker : function() {
|
|
14814
|
+
context.tool.tableHighlight.style.width = "1em";
|
|
14815
|
+
context.tool.tableHighlight.style.height = "1em";
|
|
14816
|
+
context.tool.tableUnHighlight.style.width = "5em";
|
|
14817
|
+
context.tool.tableUnHighlight.style.height = "5em";
|
|
14818
|
+
dom.changeTxt(context.tool.tableDisplay, "1 x 1");
|
|
14819
|
+
},
|
|
14820
|
+
|
|
14821
|
+
subOff : function() {
|
|
14822
|
+
if(this.subMenu) {
|
|
14823
|
+
this.subMenu.style.display = "none";
|
|
14824
|
+
this.subMenu = null;
|
|
14825
|
+
this.cancel_table_picker();
|
|
14826
|
+
}
|
|
14827
|
+
if(this.modalForm) {
|
|
14828
|
+
this.modalForm.style.display = "none";
|
|
14829
|
+
context.dialog.back.style.display = "none";
|
|
14830
|
+
context.dialog.modalArea.style.display = "none";
|
|
14831
|
+
}
|
|
14832
|
+
if(context.argument._imageElement) {
|
|
14833
|
+
event.cancel_resize_image();
|
|
14834
|
+
}
|
|
14835
|
+
|
|
14836
|
+
return;
|
|
14837
|
+
},
|
|
14838
|
+
|
|
14839
|
+
toggleFrame : function(){
|
|
14840
|
+
if(!context.argument._wysiwygActive) {
|
|
14841
|
+
var ec = {"&":"&"," ":"\u00A0",""":"\"","<":"<",">":">"};
|
|
14842
|
+
var source_html = context.element.source.value.replace(/&[a-z]+;/g, function(m){ return (typeof ec[m] === "string")?ec[m]:m; });
|
|
14843
|
+
context.element.wysiwygWindow.document.body.innerHTML = source_html.trim().length > 0? source_html: "<p></p>";
|
|
14844
|
+
context.element.wysiwygWindow.document.body.scrollTop = 0;
|
|
14845
|
+
context.element.source.style.display = "none";
|
|
14846
|
+
context.element.wysiwygElement.style.display = "block";
|
|
14847
|
+
context.argument._wysiwygActive = true;
|
|
14848
|
+
}
|
|
14849
|
+
else {
|
|
14850
|
+
context.element.source.value = context.element.wysiwygWindow.document.body.innerHTML.trim();
|
|
14851
|
+
context.element.wysiwygElement.style.display = "none";
|
|
14852
|
+
context.element.source.style.display = "block";
|
|
14853
|
+
context.argument._wysiwygActive = false;
|
|
14854
|
+
}
|
|
14855
|
+
},
|
|
14856
|
+
|
|
14857
|
+
toggleFullScreen : function(element){
|
|
14858
|
+
if(!context.argument._isFullScreen) {
|
|
14859
|
+
context.element.topArea.style.position = "fixed";
|
|
14860
|
+
context.element.topArea.style.top = "0";
|
|
14861
|
+
context.element.topArea.style.left = "0";
|
|
14862
|
+
context.element.topArea.style.width = "100%";
|
|
14863
|
+
context.element.topArea.style.height = "100%";
|
|
14864
|
+
|
|
14865
|
+
context.argument._innerHeight_fullScreen = (window.innerHeight - context.tool.bar.offsetHeight);
|
|
14866
|
+
context.element.editorArea.style.height = context.argument._innerHeight_fullScreen + "px";
|
|
14867
|
+
|
|
14868
|
+
dom.removeClass(element.firstElementChild, 'ico_full_screen_e');
|
|
14869
|
+
dom.addClass(element.firstElementChild, 'ico_full_screen_i');
|
|
14870
|
+
}
|
|
14871
|
+
else {
|
|
14872
|
+
context.element.topArea.style.cssText = context.argument._originCssText;
|
|
14873
|
+
context.element.editorArea.style.height = context.argument._innerHeight + "px";
|
|
14874
|
+
|
|
14875
|
+
dom.removeClass(element.firstElementChild, 'ico_full_screen_i');
|
|
14876
|
+
dom.addClass(element.firstElementChild, 'ico_full_screen_e');
|
|
14877
|
+
}
|
|
14878
|
+
|
|
14879
|
+
context.argument._isFullScreen = !context.argument._isFullScreen;
|
|
14880
|
+
},
|
|
14881
|
+
|
|
14882
|
+
appendHr : function(value) {
|
|
14883
|
+
var borderStyle = "";
|
|
14884
|
+
switch(value) {
|
|
14885
|
+
case 'hr1':
|
|
14886
|
+
borderStyle = "black 1px solid";
|
|
14887
|
+
break;
|
|
14888
|
+
case 'hr2':
|
|
14889
|
+
borderStyle = "black 1px dotted";
|
|
14890
|
+
break;
|
|
14891
|
+
case 'hr3':
|
|
14892
|
+
borderStyle = "black 1px dashed";
|
|
14893
|
+
break;
|
|
14894
|
+
}
|
|
14895
|
+
|
|
14896
|
+
var oHr = document.createElement("HR");
|
|
14897
|
+
oHr.style.border = "black 0px none";
|
|
14898
|
+
oHr.style.borderTop = borderStyle;
|
|
14899
|
+
oHr.style.height = "1px";
|
|
14900
|
+
context.argument._selectionNode.parentNode.appendChild(oHr);
|
|
14901
|
+
|
|
14902
|
+
editor.appendP(oHr);
|
|
14903
|
+
},
|
|
14904
|
+
|
|
14905
|
+
appendTable : function(x, y) {
|
|
14906
|
+
var oTable = document.createElement("TABLE");
|
|
14907
|
+
|
|
14908
|
+
var tableHTML = '<tbody>';
|
|
14909
|
+
while(y>0) {
|
|
14910
|
+
tableHTML += '<tr>';
|
|
14911
|
+
var tdCnt = x;
|
|
14912
|
+
while(tdCnt>0) {
|
|
14913
|
+
tableHTML += '<td><p></p></td>';
|
|
14914
|
+
--tdCnt;
|
|
14915
|
+
}
|
|
14916
|
+
tableHTML += '</tr>';
|
|
14917
|
+
--y;
|
|
14918
|
+
}
|
|
14919
|
+
tableHTML += '</tbody>';
|
|
14920
|
+
|
|
14921
|
+
oTable.innerHTML = tableHTML;
|
|
14922
|
+
|
|
14923
|
+
editor.insertNode(oTable);
|
|
14924
|
+
editor.appendP(oTable);
|
|
14925
|
+
},
|
|
14926
|
+
|
|
14927
|
+
appendP : function(element) {
|
|
14928
|
+
var oP = document.createElement("P");
|
|
14929
|
+
oP.innerHTML = '';
|
|
14930
|
+
element.parentNode.insertBefore(oP, element.nextElementSibling);
|
|
14931
|
+
},
|
|
14932
|
+
|
|
14933
|
+
openDialog : function(kind) {
|
|
14934
|
+
var focusText = null;
|
|
14935
|
+
|
|
14936
|
+
switch(kind) {
|
|
14937
|
+
case 'link':
|
|
14938
|
+
this.modalForm = context.dialog.link;
|
|
14939
|
+
focusText = context.dialog.linkText;
|
|
14940
|
+
break;
|
|
14941
|
+
case 'image':
|
|
14942
|
+
this.modalForm = context.dialog.image;
|
|
14943
|
+
focusText = context.dialog.imgInputUrl;
|
|
14944
|
+
break;
|
|
14945
|
+
case 'video':
|
|
14946
|
+
this.modalForm = context.dialog.video;
|
|
14947
|
+
focusText = context.dialog.videoInputUrl;
|
|
14948
|
+
break;
|
|
14949
|
+
}
|
|
14950
|
+
|
|
14951
|
+
context.dialog.modalArea.style.display = "block";
|
|
14952
|
+
context.dialog.back.style.display = "block";
|
|
14953
|
+
context.dialog.modal.style.display = "block";
|
|
14954
|
+
this.modalForm.style.display = "block";
|
|
14955
|
+
|
|
14956
|
+
this.subMenu = context.dialog.modal;
|
|
14957
|
+
|
|
14958
|
+
focusText.focus();
|
|
14959
|
+
},
|
|
14960
|
+
|
|
14961
|
+
showLoding : function() {
|
|
14962
|
+
context.element.loding.style.display = "block";
|
|
14963
|
+
},
|
|
14964
|
+
|
|
14965
|
+
closeLoding : function() {
|
|
14966
|
+
context.element.loding.style.display = "none";
|
|
14967
|
+
},
|
|
14968
|
+
|
|
14969
|
+
insertNode : function(oNode) {
|
|
14970
|
+
var selection = wysiwygSelection.getSelection();
|
|
14971
|
+
var nativeRng = null;
|
|
14972
|
+
|
|
14973
|
+
if(selection.rangeCount > 0) {
|
|
14974
|
+
nativeRng = selection.getRangeAt(0);
|
|
14975
|
+
} else {
|
|
14976
|
+
selection = context.argument._copySelection;
|
|
14977
|
+
|
|
14978
|
+
nativeRng = wysiwygSelection.createRange();
|
|
14979
|
+
nativeRng.setStart(selection.focusNode, selection.anchorOffset);
|
|
14980
|
+
nativeRng.setEnd(selection.focusNode, selection.focusOffset);
|
|
14981
|
+
}
|
|
14982
|
+
|
|
14983
|
+
var startCon = nativeRng.startContainer;
|
|
14984
|
+
var startOff = nativeRng.startOffset;
|
|
14985
|
+
var endCon = nativeRng.endContainer;
|
|
14986
|
+
var endOff = nativeRng.endOffset;
|
|
14987
|
+
|
|
14988
|
+
var pNode = startCon;
|
|
14989
|
+
if(/^#text$/i.test(startCon.nodeName)) {
|
|
14990
|
+
pNode = startCon.parentNode;
|
|
14991
|
+
}
|
|
14992
|
+
|
|
14993
|
+
/** ë²”́œ„́„ íƒ ́—†́„때 */
|
|
14994
|
+
if(startCon === endCon && startOff === endOff) {
|
|
14995
|
+
if(/^#text$/i.test(selection.focusNode.nodeName)) {
|
|
14996
|
+
var rightNode = selection.focusNode.splitText(endOff);
|
|
14997
|
+
pNode.insertBefore(oNode, rightNode);
|
|
14998
|
+
}
|
|
14999
|
+
else {
|
|
15000
|
+
if(/^BR$/i.test(pNode.lastChild.nodeName)) {
|
|
15001
|
+
pNode.removeChild(pNode.lastChild);
|
|
15002
|
+
}
|
|
15003
|
+
pNode.appendChild(oNode);
|
|
15004
|
+
}
|
|
15005
|
+
}
|
|
15006
|
+
/** ë²”́œ„́„ íƒ í–ˆ́„때 */
|
|
15007
|
+
else {
|
|
15008
|
+
var removeNode = startCon;
|
|
15009
|
+
var rightNode = null;
|
|
15010
|
+
var isSameContainer = startCon === endCon;
|
|
15011
|
+
|
|
15012
|
+
if(isSameContainer) {
|
|
15013
|
+
if(!wysiwygSelection.isEdgePoint(endCon, endOff)) {
|
|
15014
|
+
rightNode = endCon.splitText(endOff);
|
|
15015
|
+
}
|
|
15016
|
+
|
|
15017
|
+
if(!wysiwygSelection.isEdgePoint(startCon, startOff)) {
|
|
15018
|
+
removeNode = startCon.splitText(startOff);
|
|
15019
|
+
}
|
|
15020
|
+
|
|
15021
|
+
pNode.removeChild(removeNode);
|
|
15022
|
+
}
|
|
15023
|
+
else {
|
|
15024
|
+
var nodes = [];
|
|
15025
|
+
var container = startCon;
|
|
15026
|
+
while(container.nodeType == 3 && !(endCon == container)) {
|
|
15027
|
+
nodes.push(container);
|
|
15028
|
+
container = container.nextSibling;
|
|
15029
|
+
}
|
|
15030
|
+
|
|
15031
|
+
nodes.push(container);
|
|
15032
|
+
|
|
15033
|
+
for(var i=0; i<nodes.length; i++) {
|
|
15034
|
+
pNode.removeChild(nodes[i]);
|
|
15035
|
+
}
|
|
15036
|
+
}
|
|
15037
|
+
|
|
15038
|
+
pNode.insertBefore(oNode, rightNode);
|
|
15039
|
+
}
|
|
15040
|
+
}
|
|
15041
|
+
};
|
|
15042
|
+
})();
|
|
15043
|
+
|
|
15044
|
+
/** ́´ë²¤í¸ */
|
|
15045
|
+
var event = (function(){
|
|
15046
|
+
var resize_window = function() {
|
|
15047
|
+
// if(context.tool.barHeight == context.tool.bar.offsetHeight) return;
|
|
15048
|
+
|
|
15049
|
+
if(context.argument._isFullScreen) {
|
|
15050
|
+
context.argument._innerHeight_fullScreen += ((context.tool.barHeight - context.tool.bar.offsetHeight) + (this.innerHeight - context.argument._windowHeight));
|
|
15051
|
+
context.element.editorArea.style.height = context.argument._innerHeight_fullScreen + "px";
|
|
15052
|
+
}
|
|
15053
|
+
|
|
15054
|
+
context.tool.barHeight = context.tool.bar.offsetHeight;
|
|
15055
|
+
context.argument._windowHeight = this.innerHeight;
|
|
15056
|
+
};
|
|
15057
|
+
|
|
15058
|
+
var onClick_toolbar = function(e) {
|
|
15059
|
+
var targetElement = e.target;
|
|
15060
|
+
var display = targetElement.getAttribute("data-display");
|
|
15061
|
+
var command = targetElement.getAttribute("data-command");
|
|
15062
|
+
var className = targetElement.className;
|
|
15063
|
+
|
|
15064
|
+
e.preventDefault();
|
|
15065
|
+
e.stopPropagation();
|
|
15066
|
+
|
|
15067
|
+
wysiwygSelection.focus();
|
|
15068
|
+
|
|
15069
|
+
while(!command && !display && !/layer_color|layer_url|editor_tool/.test(className) && !/^BODY$/i.test(targetElement.tagName)){
|
|
15070
|
+
targetElement = targetElement.parentNode;
|
|
15071
|
+
command = targetElement.getAttribute("data-command");
|
|
15072
|
+
display = targetElement.getAttribute("data-display");
|
|
15073
|
+
className = targetElement.className;
|
|
15074
|
+
}
|
|
15075
|
+
|
|
15076
|
+
var value = targetElement.getAttribute("data-value");
|
|
15077
|
+
var txt = targetElement.getAttribute("data-txt");
|
|
15078
|
+
|
|
15079
|
+
/** ́„œë¸Œë©”뉴 ë³´́´ê¸° */
|
|
15080
|
+
if(display || /^BODY$/i.test(targetElement.tagName)) {
|
|
15081
|
+
var nextSibling = editor.subMenu;
|
|
15082
|
+
editor.subOff();
|
|
15083
|
+
|
|
15084
|
+
if(targetElement.nextElementSibling != null && targetElement.nextElementSibling != nextSibling){
|
|
15085
|
+
editor.subMenu = targetElement.nextElementSibling;
|
|
15086
|
+
editor.subMenu.style.display = "block";
|
|
15087
|
+
editor.originSub = editor.subMenu.previousElementSibling;
|
|
15088
|
+
}
|
|
15089
|
+
else if(/modal/.test(display)) {
|
|
15090
|
+
editor.openDialog(command);
|
|
15091
|
+
}
|
|
15092
|
+
|
|
15093
|
+
nextSibling = null;
|
|
15094
|
+
|
|
15095
|
+
return;
|
|
15096
|
+
}
|
|
15097
|
+
|
|
15098
|
+
if(/layer_color/.test(className) && /^BUTTON$/i.test(e.target.tagName)) {
|
|
15099
|
+
value = e.target.textContent;
|
|
15100
|
+
}
|
|
15101
|
+
|
|
15102
|
+
/** ́»¤ë©˜ë“œ ëª…ë ¹́–´ ́‹¤í–‰ */
|
|
15103
|
+
if(command) {
|
|
15104
|
+
if(/fontName/.test(command)) {
|
|
15105
|
+
dom.changeTxt(editor.originSub.firstElementChild, txt);
|
|
15106
|
+
editor.pure_execCommand(command, false, value);
|
|
15107
|
+
}
|
|
15108
|
+
else if(/format/.test(command)) {
|
|
15109
|
+
editor.pure_execCommand("formatBlock", false, value);
|
|
15110
|
+
}
|
|
15111
|
+
else if(/justifyleft|justifyright|justifycenter|justifyfull/.test(command)) {
|
|
15112
|
+
dom.changeTxt(editor.originSub.firstElementChild, targetElement.title.split(" ")[0]);
|
|
15113
|
+
// dom.changeClass(editor.originSub.firstElementChild, targetElement.firstElementChild.className);
|
|
15114
|
+
editor.pure_execCommand(command, false);
|
|
15115
|
+
}
|
|
15116
|
+
else if(/foreColor|hiliteColor/.test(command)) {
|
|
15117
|
+
editor.pure_execCommand(command, false, value);
|
|
15118
|
+
}
|
|
15119
|
+
else if(/horizontalRules/.test(command)) {
|
|
15120
|
+
editor.appendHr(value);
|
|
15121
|
+
}
|
|
15122
|
+
else if(/sorceFrame/.test(command)) {
|
|
15123
|
+
editor.toggleFrame();
|
|
15124
|
+
dom.toggleClass(targetElement, 'on');
|
|
15125
|
+
}
|
|
15126
|
+
else if(/fullScreen/.test(command)) {
|
|
15127
|
+
editor.toggleFullScreen(targetElement);
|
|
15128
|
+
dom.toggleClass(targetElement, "on");
|
|
15129
|
+
}
|
|
15130
|
+
else if(/indent|outdent/.test(command)) {
|
|
15131
|
+
editor.pure_execCommand(command, false);
|
|
15132
|
+
}
|
|
15133
|
+
else if(/insertTable/.test(command)) {
|
|
15134
|
+
editor.appendTable(context.argument._tableXY[0], context.argument._tableXY[1]);
|
|
15135
|
+
}
|
|
15136
|
+
else {
|
|
15137
|
+
editor.pure_execCommand(command, false, value);
|
|
15138
|
+
dom.toggleClass(targetElement, "on");
|
|
15139
|
+
}
|
|
15140
|
+
|
|
15141
|
+
editor.subOff();
|
|
15142
|
+
}
|
|
15143
|
+
|
|
15144
|
+
};
|
|
15145
|
+
|
|
15146
|
+
var onMouseDown_wysiwyg = function(e) {
|
|
15147
|
+
var targetElement = e.target;
|
|
15148
|
+
|
|
15149
|
+
editor.subOff();
|
|
15150
|
+
|
|
15151
|
+
if(/^IMG$/i.test(targetElement.nodeName)) {
|
|
15152
|
+
/** ie,firefox image resize handle : false*/
|
|
15153
|
+
targetElement.setAttribute('unselectable', 'on');
|
|
15154
|
+
targetElement.contentEditable = false;
|
|
15155
|
+
|
|
15156
|
+
var resizeDiv = context.element.imageResizeDiv;
|
|
15157
|
+
var w = targetElement.offsetWidth;
|
|
15158
|
+
var h = targetElement.offsetHeight;
|
|
15159
|
+
|
|
15160
|
+
var parentElement = targetElement.offsetParent;
|
|
15161
|
+
var parentT = 1;
|
|
15162
|
+
var parentL = 1;
|
|
15163
|
+
while(parentElement) {
|
|
15164
|
+
parentT += (parentElement.offsetTop + parentElement.clientTop);
|
|
15165
|
+
parentL += (parentElement.offsetLeft + + parentElement.clientLeft);
|
|
15166
|
+
parentElement = parentElement.offsetParent;
|
|
15167
|
+
}
|
|
15168
|
+
context.argument._imageResize_parent_t = (context.tool.bar.offsetHeight + parentT);
|
|
15169
|
+
context._imageResize_parent_l = parentL;
|
|
15170
|
+
|
|
15171
|
+
var t = (targetElement.offsetTop + context.argument._imageResize_parent_t - context.element.wysiwygWindow.document.body.scrollTop);
|
|
15172
|
+
var l = (targetElement.offsetLeft + parentL);
|
|
15173
|
+
|
|
15174
|
+
resizeDiv.style.top = t + "px";
|
|
15175
|
+
resizeDiv.style.left = l + "px";
|
|
15176
|
+
resizeDiv.style.width = w + "px";
|
|
15177
|
+
resizeDiv.style.height = h + "px";
|
|
15178
|
+
|
|
15179
|
+
context.element.imageResizeBtn.style.top = (h + t) + "px";
|
|
15180
|
+
context.element.imageResizeBtn.style.left = l + "px";
|
|
15181
|
+
|
|
15182
|
+
dom.changeTxt(context.element.imageResizeDisplay, w + " x " + h);
|
|
15183
|
+
|
|
15184
|
+
context.argument._imageElement = targetElement;
|
|
15185
|
+
context.argument._imageElement_w = w;
|
|
15186
|
+
context.argument._imageElement_h = h;
|
|
15187
|
+
context.argument._imageElement_t = t;
|
|
15188
|
+
context.argument._imageElement_l = l;
|
|
15189
|
+
|
|
15190
|
+
context.element.imageResizeDiv.style.display = "block";
|
|
15191
|
+
context.element.imageResizeBtn.style.display = "block";
|
|
15192
|
+
}
|
|
15193
|
+
else if(/^HTML$/i.test(targetElement.nodeName)){
|
|
15194
|
+
wysiwygSelection.focus();
|
|
15195
|
+
}
|
|
15196
|
+
};
|
|
15197
|
+
|
|
15198
|
+
/** selection ê°́²´ ë³µ́‚¬́©(IE...) */
|
|
15199
|
+
function copyObj(obj) {
|
|
15200
|
+
var copy = {};
|
|
15201
|
+
for (var attr in obj) {
|
|
15202
|
+
copy[attr] = obj[attr];
|
|
15203
|
+
}
|
|
15204
|
+
return copy;
|
|
15205
|
+
}
|
|
15206
|
+
|
|
15207
|
+
var onSelectionChange_wysiwyg = function() {
|
|
15208
|
+
context.argument._copySelection = copyObj(wysiwygSelection.getSelection());
|
|
15209
|
+
context.argument._selectionNode = wysiwygSelection.getSelection().anchorNode;
|
|
15210
|
+
|
|
15211
|
+
var selectionParent = context.argument._selectionNode;
|
|
15212
|
+
var selectionNodeStr = "";
|
|
15213
|
+
var fontFamily = context.tool.default_fontFamily;
|
|
15214
|
+
while(!/^P$|^BODY$|^HTML$/i.test(selectionParent.nodeName)) {
|
|
15215
|
+
selectionNodeStr += selectionParent.nodeName + "|";
|
|
15216
|
+
if(/^FONT$/i.test(selectionParent.nodeName) && selectionParent.face.length > 0) {
|
|
15217
|
+
var selectFont = list.fontFamilyMap[selectionParent.face.replace(/\s*/g,"")];
|
|
15218
|
+
fontFamily = (selectFont? selectFont: fontFamily);
|
|
15219
|
+
break;
|
|
15220
|
+
}
|
|
15221
|
+
selectionParent = selectionParent.parentNode;
|
|
15222
|
+
}
|
|
15223
|
+
|
|
15224
|
+
if(/^SPAN$/i.test(selectionParent.nodeName)) {
|
|
15225
|
+
for(var i=0; i<selectionParent.children.length; i++) {
|
|
15226
|
+
selectionNodeStr += selectionParent.children[i].tagName;
|
|
15227
|
+
}
|
|
15228
|
+
}
|
|
15229
|
+
|
|
15230
|
+
|
|
15231
|
+
/** add */
|
|
15232
|
+
var onNode = selectionNodeStr.split("|");
|
|
15233
|
+
var map = "B|U|I|STRIKE|FONT|";
|
|
15234
|
+
for(var i=0; i<onNode.length - 1; i++) {
|
|
15235
|
+
var nodeName = (/^STRONG$/.test(onNode[i])? 'B': (/^EM/.test(onNode[i])? 'I': onNode[i]));
|
|
15236
|
+
if(/^FONT$/i.test(nodeName)) {
|
|
15237
|
+
dom.changeTxt(list.commandMap[nodeName], fontFamily);
|
|
15238
|
+
}
|
|
15239
|
+
else {
|
|
15240
|
+
dom.addClass(list.commandMap[nodeName], "on");
|
|
15241
|
+
}
|
|
15242
|
+
map = map.replace(nodeName+"|", "");
|
|
15243
|
+
}
|
|
15244
|
+
|
|
15245
|
+
/** remove */
|
|
15246
|
+
map = map.split("|");
|
|
15247
|
+
for(var i=0; i<map.length - 1; i++) {
|
|
15248
|
+
if(/^FONT$/i.test(map[i])) {
|
|
15249
|
+
dom.changeTxt(list.commandMap[map[i]], fontFamily);
|
|
15250
|
+
}
|
|
15251
|
+
else {
|
|
15252
|
+
dom.removeClass(list.commandMap[map[i]], "on");
|
|
15253
|
+
}
|
|
15254
|
+
}
|
|
15255
|
+
};
|
|
15256
|
+
|
|
15257
|
+
var onKeyDown_wysiwyg = function(e) {
|
|
15258
|
+
var target = e.target;
|
|
15259
|
+
var keyCode = e.keyCode;
|
|
15260
|
+
var shift = e.shiftKey;
|
|
15261
|
+
var ctrl = e.ctrlKey;
|
|
15262
|
+
var alt = e.altKey;
|
|
15263
|
+
|
|
15264
|
+
|
|
15265
|
+
switch(keyCode) {
|
|
15266
|
+
case 8: /**backspace key*/
|
|
15267
|
+
if(target.childElementCount === 1 && target.children[0].innerHTML === "<br>") {
|
|
15268
|
+
e.preventDefault();
|
|
15269
|
+
e.stopPropagation();
|
|
15270
|
+
return false;
|
|
15271
|
+
}
|
|
15272
|
+
break;
|
|
15273
|
+
case 9: /**tab key*/
|
|
15274
|
+
e.preventDefault();
|
|
15275
|
+
e.stopPropagation();
|
|
15276
|
+
|
|
15277
|
+
if(ctrl || alt) break;
|
|
15278
|
+
|
|
15279
|
+
var currentNode = wysiwygSelection.getPElementInFocusNode().parentNode;
|
|
15280
|
+
|
|
15281
|
+
if(currentNode && /^TD$/i.test(currentNode.tagName)) {
|
|
15282
|
+
var table = dom.getParentNode(currentNode, "table");
|
|
15283
|
+
var cells = dom.getListChildren(table, dom.isCell);
|
|
15284
|
+
var idx = shift? dom.prevIdx(cells, currentNode): dom.nextIdx(cells, currentNode);
|
|
15285
|
+
|
|
15286
|
+
if(idx === cells.length && !shift) idx = 0;
|
|
15287
|
+
if(idx === -1 && shift) idx = cells.length - 1;
|
|
15288
|
+
|
|
15289
|
+
var moveCell = cells[idx];
|
|
15290
|
+
if(!moveCell) return false;
|
|
15291
|
+
|
|
15292
|
+
var range = wysiwygSelection.createRange();
|
|
15293
|
+
range.setStart(moveCell, 0);
|
|
15294
|
+
range.setEnd(moveCell, 0);
|
|
15295
|
+
|
|
15296
|
+
var selection = wysiwygSelection.getSelection();
|
|
15297
|
+
if (selection.rangeCount > 0) {
|
|
15298
|
+
selection.removeAllRanges();
|
|
15299
|
+
}
|
|
15300
|
+
selection.addRange(range);
|
|
15301
|
+
|
|
15302
|
+
break;
|
|
15303
|
+
}
|
|
15304
|
+
|
|
15305
|
+
/** P 노드́¼ë•Œ */
|
|
15306
|
+
if(shift) break;
|
|
15307
|
+
|
|
15308
|
+
var tabText = context.element.wysiwygWindow.document.createTextNode(new Array(editor.tabSize + 1).join("\u00A0"));
|
|
15309
|
+
editor.insertNode(tabText);
|
|
15310
|
+
|
|
15311
|
+
var selection = wysiwygSelection.getSelection();
|
|
15312
|
+
var rng = wysiwygSelection.createRange();
|
|
15313
|
+
|
|
15314
|
+
rng.setStart(tabText, editor.tabSize);
|
|
15315
|
+
rng.setEnd(tabText, editor.tabSize);
|
|
15316
|
+
|
|
15317
|
+
if (selection.rangeCount > 0) {
|
|
15318
|
+
selection.removeAllRanges();
|
|
15319
|
+
}
|
|
15320
|
+
|
|
15321
|
+
selection.addRange(rng);
|
|
15322
|
+
|
|
15323
|
+
break;
|
|
15324
|
+
}
|
|
15325
|
+
};
|
|
15326
|
+
|
|
15327
|
+
var onScroll_wysiwyg = function() {
|
|
15328
|
+
if(context.argument._imageElement) {
|
|
15329
|
+
var t = (context.argument._imageElement.offsetTop + context.argument._imageResize_parent_t - context.element.wysiwygWindow.scrollY);
|
|
15330
|
+
|
|
15331
|
+
context.element.imageResizeDiv.style.top = t + "px"
|
|
15332
|
+
context.element.imageResizeBtn.style.top = (t + context.argument._imageElement_h) + "px";
|
|
15333
|
+
}
|
|
15334
|
+
};
|
|
15335
|
+
|
|
15336
|
+
var onClick_dialog = function(e) {
|
|
15337
|
+
if(/modal-dialog/.test(e.target.className) || /close/.test(e.target.getAttribute("data-command"))) {
|
|
15338
|
+
editor.subOff();
|
|
15339
|
+
}
|
|
15340
|
+
};
|
|
15341
|
+
|
|
15342
|
+
var onChange_imgInput = function() {
|
|
15343
|
+
try {
|
|
15344
|
+
if (this.files && this.files[0]) {
|
|
15345
|
+
editor.showLoding();
|
|
15346
|
+
editor.subOff();
|
|
15347
|
+
|
|
15348
|
+
var reader = new FileReader();
|
|
15349
|
+
|
|
15350
|
+
reader.onload = function () {
|
|
15351
|
+
try {
|
|
15352
|
+
context.argument._imageFileSrc = reader.result;
|
|
15353
|
+
|
|
15354
|
+
var oImg = document.createElement("IMG");
|
|
15355
|
+
oImg.src = context.dialog.imgInputUrl.value.trim().length > 0 ? context.dialog.imgInputUrl.value : context.argument._imageFileSrc;
|
|
15356
|
+
oImg.style.width = context.user.imageSize;
|
|
15357
|
+
// wysiwygSelection.getPElementInFocusNode().appendChild(oImg);
|
|
15358
|
+
editor.insertNode(oImg);
|
|
15359
|
+
// editor.appendP(oImg);
|
|
15360
|
+
|
|
15361
|
+
context.argument._imageFileSrc = null;
|
|
15362
|
+
context.dialog.imgInputFile.value = "";
|
|
15363
|
+
context.dialog.imgInputUrl.value = "";
|
|
15364
|
+
} finally {
|
|
15365
|
+
editor.closeLoding();
|
|
15366
|
+
}
|
|
15367
|
+
};
|
|
15368
|
+
|
|
15369
|
+
reader.readAsDataURL(this.files[0]);
|
|
15370
|
+
}
|
|
15371
|
+
} catch(e) {
|
|
15372
|
+
editor.closeLoding();
|
|
15373
|
+
}
|
|
15374
|
+
};
|
|
15375
|
+
|
|
15376
|
+
var onClick_imageResizeBtn = function(e) {
|
|
15377
|
+
var command = e.target.getAttribute("data-command") || e.target.parentNode.getAttribute("data-command");
|
|
15378
|
+
|
|
15379
|
+
if(!command) return;
|
|
15380
|
+
|
|
15381
|
+
if(/^\d+$/.test(command)) {
|
|
15382
|
+
context.argument._imageElement.style.height = "";
|
|
15383
|
+
context.argument._imageElement.style.width = command + "%";
|
|
15384
|
+
}
|
|
15385
|
+
else if(/remove/.test(command)){
|
|
15386
|
+
context.argument._imageElement.remove();
|
|
15387
|
+
}
|
|
15388
|
+
|
|
15389
|
+
editor.subOff();
|
|
15390
|
+
wysiwygSelection.focus();
|
|
15391
|
+
|
|
15392
|
+
e.preventDefault();
|
|
15393
|
+
e.stopPropagation();
|
|
15394
|
+
};
|
|
15395
|
+
|
|
15396
|
+
var onMouseDown_image_ctrl = function(e) {
|
|
15397
|
+
e.preventDefault();
|
|
15398
|
+
e.stopPropagation();
|
|
15399
|
+
|
|
15400
|
+
context.element.resizeBackground.style.display = "block";
|
|
15401
|
+
context.element.imageResizeBtn.style = "none";
|
|
15402
|
+
|
|
15403
|
+
document.addEventListener('mousemove', resize_image);
|
|
15404
|
+
document.addEventListener('mouseup', function(){
|
|
15405
|
+
document.removeEventListener('mousemove', resize_image);
|
|
15406
|
+
cancel_resize_image();
|
|
15407
|
+
});
|
|
15408
|
+
};
|
|
15409
|
+
|
|
15410
|
+
var resize_image = function(e) {
|
|
15411
|
+
var w = (e.clientX - context.argument._imageElement_l - context.element.topArea.offsetLeft);
|
|
15412
|
+
var h = ((context.argument._imageElement_h/context.argument._imageElement_w) * w);
|
|
15413
|
+
|
|
15414
|
+
context.argument._imageElement.style.width = w + "px";
|
|
15415
|
+
context.argument._imageElement.style.height = h + "px";
|
|
15416
|
+
|
|
15417
|
+
var parentElement = context.argument._imageElement.offsetParent;
|
|
15418
|
+
var parentL = 1;
|
|
15419
|
+
while(parentElement) {
|
|
15420
|
+
parentL += (parentElement.offsetLeft + + parentElement.clientLeft);
|
|
15421
|
+
parentElement = parentElement.offsetParent;
|
|
15422
|
+
}
|
|
15423
|
+
|
|
15424
|
+
var l = (context.argument._imageElement.offsetLeft + parentL);
|
|
15425
|
+
|
|
15426
|
+
context.element.imageResizeDiv.style.left = l + "px";
|
|
15427
|
+
context.element.imageResizeDiv.style.width = w + "px";
|
|
15428
|
+
context.element.imageResizeDiv.style.height = h + "px";
|
|
15429
|
+
|
|
15430
|
+
dom.changeTxt(context.element.imageResizeDisplay, Math.round(w) + " x " + Math.round(h));
|
|
15431
|
+
};
|
|
15432
|
+
|
|
15433
|
+
var cancel_resize_image = function() {
|
|
15434
|
+
context.element.resizeBackground.style.display = "none";
|
|
15435
|
+
context.element.imageResizeDiv.style.display = "none";
|
|
15436
|
+
context.element.imageResizeBtn.style.display = "none";
|
|
15437
|
+
// context.argument._imageElement = null;
|
|
15438
|
+
};
|
|
15439
|
+
|
|
15440
|
+
var onMouseMove_tablePicker = function(e) {
|
|
15441
|
+
var x = Math.ceil(e.offsetX/18);
|
|
15442
|
+
var y = Math.ceil(e.offsetY/18);
|
|
15443
|
+
x = x<1? 1: x;
|
|
15444
|
+
y = y<1? 1: y;
|
|
15445
|
+
context.tool.tableHighlight.style.width = x + "em";
|
|
15446
|
+
context.tool.tableHighlight.style.height = y + "em";
|
|
15447
|
+
|
|
15448
|
+
var x_u = x<5? 5: (x>9? 10: x+1);
|
|
15449
|
+
var y_u = y<5? 5: (y>9? 10: y+1);
|
|
15450
|
+
context.tool.tableUnHighlight.style.width = x_u + "em";
|
|
15451
|
+
context.tool.tableUnHighlight.style.height = y_u + "em";
|
|
15452
|
+
|
|
15453
|
+
dom.changeTxt(context.tool.tableDisplay, x + " x " + y);
|
|
15454
|
+
context.argument._tableXY = [x, y];
|
|
15455
|
+
};
|
|
15456
|
+
|
|
15457
|
+
var onMouseDown_resizeBar = function(e) {
|
|
15458
|
+
context.argument._resizeClientY = e.clientY;
|
|
15459
|
+
context.element.resizeBackground.style.display = "block";
|
|
15460
|
+
|
|
15461
|
+
document.addEventListener('mousemove', resize_editor);
|
|
15462
|
+
document.addEventListener('mouseup', function () {
|
|
15463
|
+
document.removeEventListener('mousemove', resize_editor);
|
|
15464
|
+
context.element.resizeBackground.style.display = "none";
|
|
15465
|
+
});
|
|
15466
|
+
};
|
|
15467
|
+
|
|
15468
|
+
var resize_editor = function(e) {
|
|
15469
|
+
var resizeInterval = (e.clientY - context.argument._resizeClientY);
|
|
15470
|
+
|
|
15471
|
+
context.element.editorArea.style.height = (context.element.editorArea.offsetHeight + resizeInterval) + "px";
|
|
15472
|
+
|
|
15473
|
+
context.argument._innerHeight = (context.element.editorArea.offsetHeight + resizeInterval);
|
|
15474
|
+
|
|
15475
|
+
context.argument._resizeClientY = e.clientY;
|
|
15476
|
+
};
|
|
15477
|
+
|
|
15478
|
+
var dialog_submit = function(e) {
|
|
15479
|
+
var className = this.classList[this.classList.length - 1];
|
|
15480
|
+
|
|
15481
|
+
editor.showLoding();
|
|
15482
|
+
editor.subOff();
|
|
15483
|
+
|
|
15484
|
+
e.preventDefault();
|
|
15485
|
+
e.stopPropagation();
|
|
15486
|
+
|
|
15487
|
+
try {
|
|
15488
|
+
switch(className) {
|
|
15489
|
+
case 'sun-editor-id-submit-link':
|
|
15490
|
+
if(context.dialog.linkText.value.trim().length === 0) break;
|
|
15491
|
+
|
|
15492
|
+
var url = /^https?:\/\//.test(context.dialog.linkText.value)? context.dialog.linkText.value: "http://" + context.dialog.linkText.value;
|
|
15493
|
+
var anchor = context.dialog.linkAnchorText || context.dialog.document.getElementById("linkAnchorText");
|
|
15494
|
+
var anchorText = anchor.value.length === 0? url: anchor.value;
|
|
15495
|
+
|
|
15496
|
+
var oA = document.createElement("A");
|
|
15497
|
+
oA.href = url;
|
|
15498
|
+
oA.textContent = anchorText;
|
|
15499
|
+
|
|
15500
|
+
editor.insertNode(oA);
|
|
15501
|
+
// editor.pure_execCommand("createLink", false, url);
|
|
15502
|
+
// wysiwygSelection.getSelection().focusNode.parentNode.text = anchorText;
|
|
15503
|
+
|
|
15504
|
+
context.dialog.linkText.value = "";
|
|
15505
|
+
context.dialog.linkAnchorText.value = "";
|
|
15506
|
+
break;
|
|
15507
|
+
case 'sun-editor-id-submit-image':
|
|
15508
|
+
if(!context.argument._imageFileSrc && context.dialog.imgInputUrl.value.trim().length === 0) break;
|
|
15509
|
+
|
|
15510
|
+
var oImg = document.createElement("IMG");
|
|
15511
|
+
oImg.src = context.dialog.imgInputUrl.value.trim().length>0? context.dialog.imgInputUrl.value: context.argument._imageFileSrc;
|
|
15512
|
+
oImg.style.width = "350px";
|
|
15513
|
+
|
|
15514
|
+
// wysiwygSelection.getPElementInFocusNode().appendChild(oImg);
|
|
15515
|
+
editor.insertNode(oImg);
|
|
15516
|
+
// editor.appendP(oImg);
|
|
15517
|
+
|
|
15518
|
+
context.argument._imageFileSrc = null;
|
|
15519
|
+
context.dialog.imgInputFile.value = "";
|
|
15520
|
+
context.dialog.imgInputUrl.value = "";
|
|
15521
|
+
break;
|
|
15522
|
+
case'sun-editor-id-submit-video':
|
|
15523
|
+
if(context.dialog.videoInputUrl.value.trim().length === 0) break;
|
|
15524
|
+
|
|
15525
|
+
var url = context.dialog.videoInputUrl.value.replace(/^https?:/, '');
|
|
15526
|
+
var oIframe = document.createElement("IFRAME");
|
|
15527
|
+
var x_v = context.dialog.video_x.value;
|
|
15528
|
+
var y_v = context.dialog.video_y.value;
|
|
15529
|
+
|
|
15530
|
+
/** youtube */
|
|
15531
|
+
if(/youtu\.?be/.test(url)) {
|
|
15532
|
+
url = url.replace('watch?v=', '');
|
|
15533
|
+
if(!/^\/\/.+\/embed\//.test(url)) {
|
|
15534
|
+
var youtubeUrl = url.match(/^\/\/.+\//)[0]
|
|
15535
|
+
url = url.replace(youtubeUrl, '//www.youtube.com/embed/');
|
|
15536
|
+
}
|
|
15537
|
+
}
|
|
15538
|
+
|
|
15539
|
+
oIframe.src = url;
|
|
15540
|
+
oIframe.width = (/^\d+$/.test(x_v)? x_v: context.user.videoX);
|
|
15541
|
+
oIframe.height = (/^\d+$/.test(y_v)? y_v: context.user.videoY);
|
|
15542
|
+
oIframe.frameBorder = "0";
|
|
15543
|
+
oIframe.allowFullscreen = true;
|
|
15544
|
+
|
|
15545
|
+
// wysiwygSelection.getPElementInFocusNode().appendChild(oIframe);
|
|
15546
|
+
editor.insertNode(oIframe);
|
|
15547
|
+
editor.appendP(oIframe);
|
|
15548
|
+
|
|
15549
|
+
context.dialog.videoInputUrl.value = "";
|
|
15550
|
+
context.dialog.video_x.value = context.user.videoX;
|
|
15551
|
+
context.dialog.video_y.value = context.user.videoY;
|
|
15552
|
+
|
|
15553
|
+
break;
|
|
15554
|
+
}
|
|
15555
|
+
}catch(e) {
|
|
15556
|
+
editor.closeLoding();
|
|
15557
|
+
return false;
|
|
15558
|
+
}
|
|
15559
|
+
|
|
15560
|
+
editor.closeLoding();
|
|
15561
|
+
return false;
|
|
15562
|
+
};
|
|
15563
|
+
|
|
15564
|
+
/** ́´ë²¤í¸ ë“±ë¡ */
|
|
15565
|
+
window.onresize = function(){resize_window()};
|
|
15566
|
+
context.tool.bar.addEventListener("click", onClick_toolbar);
|
|
15567
|
+
context.dialog.modal.addEventListener("click", onClick_dialog);
|
|
15568
|
+
context.element.imageResizeBtn.addEventListener('click', onClick_imageResizeBtn);
|
|
15569
|
+
context.element.wysiwygWindow.addEventListener("keydown", onKeyDown_wysiwyg);
|
|
15570
|
+
context.dialog.imgInputFile.addEventListener("change", onChange_imgInput);
|
|
15571
|
+
context.element.wysiwygWindow.addEventListener('scroll', onScroll_wysiwyg);
|
|
15572
|
+
context.tool.tablePicker.addEventListener('mousemove', onMouseMove_tablePicker);
|
|
15573
|
+
context.element.resizebar.addEventListener("mousedown", onMouseDown_resizeBar);
|
|
15574
|
+
context.element.imageResizeController.addEventListener('mousedown', onMouseDown_image_ctrl);
|
|
15575
|
+
context.element.wysiwygWindow.addEventListener("mousedown", onMouseDown_wysiwyg);
|
|
15576
|
+
context.element.wysiwygWindow.document.addEventListener("selectionchange", onSelectionChange_wysiwyg);
|
|
15577
|
+
for(var i=0; i<context.dialog.forms.length; i++) {
|
|
15578
|
+
context.dialog.forms[i].getElementsByClassName("btn-primary")[0].addEventListener("click", dialog_submit);
|
|
15579
|
+
};
|
|
15580
|
+
|
|
15581
|
+
return {
|
|
15582
|
+
cancel_resize_image : cancel_resize_image
|
|
15583
|
+
};
|
|
15584
|
+
})();
|
|
15585
|
+
|
|
15586
|
+
/**
|
|
15587
|
+
* user func
|
|
15588
|
+
* @type {{save, getContent, setContent, appendContent, disabled, enabled, show, hide}}
|
|
15589
|
+
*/
|
|
15590
|
+
var user = (function() {
|
|
15591
|
+
return {
|
|
15592
|
+
save : function() {
|
|
15593
|
+
if(context.argument._wysiwygActive) {
|
|
15594
|
+
context.element.textElement.innerHTML = context.element.wysiwygWindow.document.body.innerHTML;
|
|
15595
|
+
} else {
|
|
15596
|
+
context.element.textElement.innerHTML = context.element.source.value;
|
|
15597
|
+
}
|
|
15598
|
+
},
|
|
15599
|
+
|
|
15600
|
+
getContent : function() {
|
|
15601
|
+
var content = "";
|
|
15602
|
+
if(context.argument._wysiwygActive) {
|
|
15603
|
+
content = context.element.wysiwygWindow.document.body.innerHTML;
|
|
15604
|
+
} else {
|
|
15605
|
+
content = context.element.source.value;
|
|
15606
|
+
}
|
|
15607
|
+
return content;
|
|
15608
|
+
},
|
|
15609
|
+
|
|
15610
|
+
setContent : function(content) {
|
|
15611
|
+
if(context.argument._wysiwygActive) {
|
|
15612
|
+
context.element.wysiwygWindow.document.body.innerHTML = content;
|
|
15613
|
+
} else {
|
|
15614
|
+
context.element.source.value = content;
|
|
15615
|
+
}
|
|
15616
|
+
},
|
|
15617
|
+
|
|
15618
|
+
appendContent : function(content) {
|
|
15619
|
+
if(context.argument._wysiwygActive) {
|
|
15620
|
+
context.element.wysiwygWindow.document.body.innerHTML += content;
|
|
15621
|
+
} else {
|
|
15622
|
+
context.element.source.value += content;
|
|
15623
|
+
}
|
|
15624
|
+
},
|
|
15625
|
+
|
|
15626
|
+
disabled : function() {
|
|
15627
|
+
context.tool.cover.style.display = "block";
|
|
15628
|
+
context.element.wysiwygWindow.document.body.setAttribute("contenteditable", false);
|
|
15629
|
+
},
|
|
15630
|
+
|
|
15631
|
+
enabled : function() {
|
|
15632
|
+
context.tool.cover.style.display = "none";
|
|
15633
|
+
context.element.wysiwygWindow.document.body.setAttribute("contenteditable", true);
|
|
15634
|
+
},
|
|
15635
|
+
|
|
15636
|
+
show : function() {
|
|
15637
|
+
context.element.topArea.style.cssText = context.argument._originCssText;
|
|
15638
|
+
},
|
|
15639
|
+
|
|
15640
|
+
hide : function() {
|
|
15641
|
+
context.element.topArea.style.display = "none";
|
|
15642
|
+
}
|
|
15643
|
+
};
|
|
15644
|
+
})();
|
|
15645
|
+
|
|
15646
|
+
return {
|
|
15647
|
+
save : user.save,
|
|
15648
|
+
getContent : user.getContent,
|
|
15649
|
+
setContent : user.setContent,
|
|
15650
|
+
appendContent : user.appendContent,
|
|
15651
|
+
disabled : user.disabled,
|
|
15652
|
+
enabled : user.enabled,
|
|
15653
|
+
show : user.show,
|
|
15654
|
+
hide : user.hide
|
|
15655
|
+
}
|
|
15656
|
+
};
|
|
15657
|
+
|
|
15658
|
+
var createEditor = function (options){
|
|
15659
|
+
var lang = SUNEDITOR.lang? SUNEDITOR.lang: SUNEDITOR.defaultLang;
|
|
15660
|
+
|
|
15661
|
+
var toolBar = function() {
|
|
15662
|
+
var html = '<div class="sun-editor-id-toolbar-cover"></div>'+
|
|
15663
|
+
/** 글꼴, í¬ë©§ */
|
|
15664
|
+
'<div class="tool_module">'+
|
|
15665
|
+
' <ul class="editor_tool">';
|
|
15666
|
+
if(options.showFont) {
|
|
15667
|
+
html += ''+
|
|
15668
|
+
' <li class="compact_editor">'+
|
|
15669
|
+
' <button type="button" class="btn_editor btn_font" title="'+lang.toolbar.fontFamily+'" data-display="sub">'+
|
|
15670
|
+
' <span class="txt sun-editor-font-family">'+lang.toolbar.fontFamily+'</span><span class="img_editor ico_more"></span>'+
|
|
15671
|
+
' </button>'+
|
|
15672
|
+
' <div class="layer_editor" style="display: none;">'+
|
|
15673
|
+
' <div class="inner_layer list_family">'+
|
|
15674
|
+
' <ul class="list_editor sun-editor-list-font-family">'+
|
|
15675
|
+
' <li><button type="button" class="btn_edit default" data-command="fontName" data-value="inherit" data-txt="'+lang.toolbar.fontFamily+'" style="font-family:inherit;">'+lang.toolbar.fontFamilyDelete+'</button></li>'+
|
|
15676
|
+
' <li><button type="button" class="btn_edit" data-command="fontName" data-value="Arial" data-txt="Arial" style="font-family:Arial;">Arial</button></li>'+
|
|
15677
|
+
' <li><button type="button" class="btn_edit" data-command="fontName" data-value="Comic Sans MS" data-txt="Comic Sans MS" style="font-family:Comic Sans MS;">Comic Sans MS</button></li>'+
|
|
15678
|
+
' <li><button type="button" class="btn_edit" data-command="fontName" data-value="Courier New,Courier" data-txt="Courier New" style="font-family:Courier New,Courier;">Courier New</button></li>'+
|
|
15679
|
+
' <li><button type="button" class="btn_edit" data-command="fontName" data-value="Georgia" data-txt="Georgia" style="font-family:Georgia;">Georgia</button></li>'+
|
|
15680
|
+
' <li><button type="button" class="btn_edit" data-command="fontName" data-value="tahoma" data-txt="tahoma" style="font-family:tahoma;">Tahoma</button></li>'+
|
|
15681
|
+
' <li><button type="button" class="btn_edit" data-command="fontName" data-value="Trebuchet MS,Helvetica" data-txt="Trebuchet MS" style="font-family:Trebuchet MS,Helvetica;">Trebuchet MS</button></li>'+
|
|
15682
|
+
' <li><button type="button" class="btn_edit" data-command="fontName" data-value="Verdana" data-txt="Verdana" style="font-family:Verdana;">Verdana</button></li>'+
|
|
15683
|
+
' </ul>';
|
|
15684
|
+
/** ́‚¬́©́ ́¶”ê°€ 글꼴 */
|
|
15685
|
+
if(options.addFont) {
|
|
15686
|
+
html += ' <ul class="list_editor list_family_add sun-editor-list-font-family-add">';
|
|
15687
|
+
for (var i = 0; i < options.addFont.length; i++) {
|
|
15688
|
+
var font = options.addFont[i];
|
|
15689
|
+
html += ' <li><button type="button" class="btn_edit" data-command="fontName" data-value="'+font.value+'" data-txt="'+font.text+'" style="font-family:'+font.value+'">'+font.text+'</button></li>';
|
|
15690
|
+
}
|
|
15691
|
+
html += ' </ul>';
|
|
15692
|
+
}
|
|
15693
|
+
|
|
15694
|
+
html += ' </div>'+
|
|
15695
|
+
' </div>'+
|
|
15696
|
+
' </li>';
|
|
15697
|
+
}
|
|
15698
|
+
if(options.showFormats) {
|
|
15699
|
+
html += ''+
|
|
15700
|
+
' <li class="compact_editor">'+
|
|
15701
|
+
' <button type="button" class="btn_editor btn_size" title="'+lang.toolbar.formats+'" data-display="sub">'+
|
|
15702
|
+
' <span class="txt">'+lang.toolbar.formats+'</span><span class="img_editor ico_more"></span>'+
|
|
15703
|
+
' </button>'+
|
|
15704
|
+
' <div class="layer_editor layer_size">'+
|
|
15705
|
+
' <div class="inner_layer">'+
|
|
15706
|
+
' <ul class="list_editor font_size_list">'+
|
|
15707
|
+
' <li><button type="button" class="btn_edit" style="height:30px;" data-command="format" data-value="P"><p style="font-size:13pt;">nomal</p></button></li>'+
|
|
15708
|
+
' <li><button type="button" class="btn_edit" style="height:45px;" data-command="format" data-value="h1"><h1>Header 1</h1></button></li>'+
|
|
15709
|
+
' <li><button type="button" class="btn_edit" style="height:34px;" data-command="format" data-value="h2"><h2>Header 2</h2></button></li>'+
|
|
15710
|
+
' <li><button type="button" class="btn_edit" style="height:26px;" data-command="format" data-value="h3"><h3>Header 3</h3></button></li>'+
|
|
15711
|
+
' <li><button type="button" class="btn_edit" style="height:23px;" data-command="format" data-value="h4"><h4>Header 4</h4></button></li>'+
|
|
15712
|
+
' <li><button type="button" class="btn_edit" style="height:19px;" data-command="format" data-value="h5"><h5>Header 5</h5></button></li>'+
|
|
15713
|
+
' <li><button type="button" class="btn_edit" style="height:15px;" data-command="format" data-value="h6"><h6>Header 6</h6></button></li>'+
|
|
15714
|
+
' </ul>'+
|
|
15715
|
+
' </div>'+
|
|
15716
|
+
' </div>'+
|
|
15717
|
+
' </li>' ;
|
|
15718
|
+
}
|
|
15719
|
+
html += '</ul>'+
|
|
15720
|
+
'</div>'+
|
|
15721
|
+
/** 굵게, ë°‘́¤„ 등 */
|
|
15722
|
+
'<div class="tool_module">'+
|
|
15723
|
+
' <ul class="editor_tool">';
|
|
15724
|
+
if(options.showBold) {
|
|
15725
|
+
html += ''+
|
|
15726
|
+
' <li class="compact_editor">'+
|
|
15727
|
+
' <button type="button" class="btn_editor sun-editor-id-bold" title="'+lang.toolbar.bold+' (Ctrl+B)" data-command="bold"><div class="ico_bold"></div></button>'+
|
|
15728
|
+
' </li>';
|
|
15729
|
+
}
|
|
15730
|
+
if(options.showUnderline) {
|
|
15731
|
+
html += ''+
|
|
15732
|
+
' <li class="compact_editor">'+
|
|
15733
|
+
' <button type="button" class="btn_editor sun-editor-id-underline" title="'+lang.toolbar.underline+' (Ctrl+U)" data-command="underline"><div class="ico_underline"></div></button>'+
|
|
15734
|
+
' </li>';
|
|
15735
|
+
}
|
|
15736
|
+
if(options.showItalic) {
|
|
15737
|
+
html += ''+
|
|
15738
|
+
' <li>'+
|
|
15739
|
+
' <button type="button" class="btn_editor sun-editor-id-italic" title="'+lang.toolbar.italic+' (Ctrl+I)" data-command="italic"><div class="ico_italic"></div></button>'+
|
|
15740
|
+
' </li>';
|
|
15741
|
+
}
|
|
15742
|
+
if(options.showStrike) {
|
|
15743
|
+
html += ''+
|
|
15744
|
+
' <li>'+
|
|
15745
|
+
' <button type="button" class="btn_editor sun-editor-id-strike" title="'+lang.toolbar.strike+' (Ctrl+D)" data-command="strikethrough"><div class="ico_strike"></div></button>'+
|
|
15746
|
+
' </li>';
|
|
15747
|
+
}
|
|
15748
|
+
html +='</ul>'+
|
|
15749
|
+
'</div>'+
|
|
15750
|
+
/** ́ƒ‰́ƒ ́„ íƒ */
|
|
15751
|
+
'<div class="tool_module">'+
|
|
15752
|
+
' <ul class="editor_tool">';
|
|
15753
|
+
if(options.showFontColor) {
|
|
15754
|
+
html += ''+
|
|
15755
|
+
' <li class="compact_editor">'+
|
|
15756
|
+
' <div class="box_color" data-display="sub">'+
|
|
15757
|
+
' <strong class="screen_out">'+lang.toolbar.fontColor+'</strong>'+
|
|
15758
|
+
' <button type="button" class="btn_editor" title="'+lang.toolbar.fontColor+'">'+
|
|
15759
|
+
' <div class="ico_fcolor">'+
|
|
15760
|
+
' <em class="color_font" style="background-color:#1f92fe"></em>'+
|
|
15761
|
+
' </div>'+
|
|
15762
|
+
' </button>'+
|
|
15763
|
+
' </div>'+
|
|
15764
|
+
' <div class="layer_editor layer_color" data-command="foreColor">'+
|
|
15765
|
+
' <div class="inner_layer">'+
|
|
15766
|
+
' <div class="pallet_bgcolor">'+
|
|
15767
|
+
' <ul class="list_color list_bgcolor">'+
|
|
15768
|
+
' <li><button type="button" class="btn_color color_ff0000" style="background-color:#ff0000;">#ff0000<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15769
|
+
' <li><button type="button" class="btn_color color_ff5e00" style="background-color:#ff5e00;">#ff5e00<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15770
|
+
' <li><button type="button" class="btn_color color_ffe400" style="background-color:#ffe400;">#ffe400<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15771
|
+
' <li><button type="button" class="btn_color color_abf200" style="background-color:#abf200;">#abf200<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15772
|
+
' <li><button type="button" class="btn_color color_00d8ff" style="background-color:#00d8ff;">#00d8ff<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15773
|
+
' <li><button type="button" class="btn_color color_0055ff" style="background-color:#0055ff;">#0055ff<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15774
|
+
' <li><button type="button" class="btn_color color_6600ff" style="background-color:#6600ff;">#6600ff<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15775
|
+
' <li><button type="button" class="btn_color color_ff00dd" style="background-color:#ff00dd;">#ff00dd<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15776
|
+
' <li><button type="button" class="btn_color color_000000" style="background-color:#000000;">#000000<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15777
|
+
' <li><button type="button" class="btn_color color_ffd8d8" style="background-color:#ffd8d8;">#ffd8d8<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15778
|
+
' <li><button type="button" class="btn_color color_fae0d4" style="background-color:#fae0d4;">#fae0d4<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15779
|
+
' <li><button type="button" class="btn_color color_faf4c0" style="background-color:#faf4c0;">#faf4c0<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15780
|
+
' <li><button type="button" class="btn_color color_e4f7ba" style="background-color:#e4f7ba;">#e4f7ba<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15781
|
+
' <li><button type="button" class="btn_color color_d4f4fa" style="background-color:#d4f4fa;">#d4f4fa<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15782
|
+
' <li><button type="button" class="btn_color color_d9e5ff" style="background-color:#d9e5ff;">#d9e5ff<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15783
|
+
' <li><button type="button" class="btn_color color_e8d9ff" style="background-color:#e8d9ff;">#e8d9ff<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15784
|
+
' <li><button type="button" class="btn_color color_ffd9fa" style="background-color:#ffd9fa;">#ffd9fa<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15785
|
+
' <li><button type="button" class="btn_color color_ffffff color_white" style="background-color:#ffffff;">#ffffff<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15786
|
+
' <li><button type="button" class="btn_color color_ffa7a7" style="background-color:#ffa7a7;">#ffa7a7<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15787
|
+
' <li><button type="button" class="btn_color color_ffc19e" style="background-color:#ffc19e;">#ffc19e<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15788
|
+
' <li><button type="button" class="btn_color color_faed7d" style="background-color:#faed7d;">#faed7d<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15789
|
+
' <li><button type="button" class="btn_color color_cef279" style="background-color:#cef279;">#cef279<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15790
|
+
' <li><button type="button" class="btn_color color_b2ebf4" style="background-color:#b2ebf4;">#b2ebf4<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15791
|
+
' <li><button type="button" class="btn_color color_b2ccff" style="background-color:#b2ccff;">#b2ccff<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15792
|
+
' <li><button type="button" class="btn_color color_d1b2ff" style="background-color:#d1b2ff;">#d1b2ff<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15793
|
+
' <li><button type="button" class="btn_color color_ffb2f5" style="background-color:#ffb2f5;">#ffb2f5<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15794
|
+
' <li><button type="button" class="btn_color color_bdbdbd" style="background-color:#bdbdbd;">#bdbdbd<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15795
|
+
' <li><button type="button" class="btn_color color_f15f5f" style="background-color:#f15f5f;">#f15f5f<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15796
|
+
' <li><button type="button" class="btn_color color_f29661" style="background-color:#f29661;">#f29661<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15797
|
+
' <li><button type="button" class="btn_color color_e5d85c" style="background-color:#e5d85c;">#e5d85c<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15798
|
+
' <li><button type="button" class="btn_color color_bce55c" style="background-color:#bce55c;">#bce55c<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15799
|
+
' <li><button type="button" class="btn_color color_5cd1e5" style="background-color:#5cd1e5;">#5cd1e5<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15800
|
+
' <li><button type="button" class="btn_color color_6699ff" style="background-color:#6699ff;">#6699ff<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15801
|
+
' <li><button type="button" class="btn_color color_a366ff" style="background-color:#a366ff;">#a366ff<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15802
|
+
' <li><button type="button" class="btn_color color_f261df" style="background-color:#f261df;">#f261df<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15803
|
+
' <li><button type="button" class="btn_color color_8c8c8c" style="background-color:#8c8c8c;">#8c8c8c<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15804
|
+
' <li><button type="button" class="btn_color color_980000" style="background-color:#980000;">#980000<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15805
|
+
' <li><button type="button" class="btn_color color_993800" style="background-color:#993800;">#993800<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15806
|
+
' <li><button type="button" class="btn_color color_998a00" style="background-color:#998a00;">#998a00<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15807
|
+
' <li><button type="button" class="btn_color color_6b9900" style="background-color:#6b9900;">#6b9900<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15808
|
+
' <li><button type="button" class="btn_color color_008299" style="background-color:#008299;">#008299<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15809
|
+
' <li><button type="button" class="btn_color color_003399" style="background-color:#003399;">#003399<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15810
|
+
' <li><button type="button" class="btn_color color_3d0099" style="background-color:#3d0099;">#3d0099<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15811
|
+
' <li><button type="button" class="btn_color color_990085" style="background-color:#990085;">#990085<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15812
|
+
' <li><button type="button" class="btn_color color_353535" style="background-color:#353535;">#353535<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15813
|
+
' <li><button type="button" class="btn_color color_670000" style="background-color:#670000;">#670000<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15814
|
+
' <li><button type="button" class="btn_color color_662500" style="background-color:#662500;">#662500<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15815
|
+
' <li><button type="button" class="btn_color color_665c00" style="background-color:#665c00;">#665c00<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15816
|
+
' <li><button type="button" class="btn_color color_476600" style="background-color:#476600;">#476600<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15817
|
+
' <li><button type="button" class="btn_color color_005766" style="background-color:#005766;">#005766<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15818
|
+
' <li><button type="button" class="btn_color color_002266" style="background-color:#002266;">#002266<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15819
|
+
' <li><button type="button" class="btn_color color_290066" style="background-color:#290066;">#290066<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15820
|
+
' <li><button type="button" class="btn_color color_660058" style="background-color:#660058;">#660058<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15821
|
+
' <li class="compact_color"><button type="button" class="btn_color" style="background-color:#222222;">#222222<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15822
|
+
' </ul>'+
|
|
15823
|
+
' </div>'+
|
|
15824
|
+
' </div>'+
|
|
15825
|
+
' </div>'+
|
|
15826
|
+
' </li>';
|
|
15827
|
+
}
|
|
15828
|
+
if(options.showHiliteColor) {
|
|
15829
|
+
html += ''+
|
|
15830
|
+
' <li>'+
|
|
15831
|
+
' <strong class="screen_out">'+lang.toolbar.hiliteColor+'</strong>'+
|
|
15832
|
+
' <button type="button" class="btn_editor btn_fbgcolor" title="'+lang.toolbar.hiliteColor+'" data-display="sub">'+
|
|
15833
|
+
' <div class="img_editor ico_fcolor_w">'+
|
|
15834
|
+
' <em class="color_font" style="background-color:#1f92fe"></em>'+
|
|
15835
|
+
' </div>'+
|
|
15836
|
+
' </button>'+
|
|
15837
|
+
' <div class="layer_editor layer_color" data-command="hiliteColor">'+
|
|
15838
|
+
' <div class="inner_layer">'+
|
|
15839
|
+
' <div class="pallet_bgcolor pallet_text">'+
|
|
15840
|
+
' <ul class="list_color list_bgcolor">'+
|
|
15841
|
+
' <li><button type="button" class="btn_color" style="color:#fff;background-color:#1e9af9;">#1e9af9<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15842
|
+
' <li><button type="button" class="btn_color" style="color:#fff;background-color:#00b8c6;">#00b8c6<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15843
|
+
' <li><button type="button" class="btn_color" style="color:#fff;background-color:#6cce02;">#6cce02<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15844
|
+
' <li><button type="button" class="btn_color" style="color:#fff;background-color:#ff9702;">#ff9702<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15845
|
+
' <li><button type="button" class="btn_color" style="color:#fff;background-color:#ff0000;">#ff0000<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15846
|
+
' <li><button type="button" class="btn_color" style="color:#fff;background-color:#ff00dd;">#ff00dd<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15847
|
+
' <li><button type="button" class="btn_color" style="color:#fff;background-color:#6600ff;">#6600ff<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15848
|
+
' <li><button type="button" class="btn_color" style="color:#000;background-color:#cce9ff;">#cce9ff<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15849
|
+
' <li><button type="button" class="btn_color" style="color:#000;background-color:#fcfd4c;">#fcfd4c<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15850
|
+
' <li><button type="button" class="btn_color color_white" style="color:#000;background-color:#ffffff;">#ffffff<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15851
|
+
' <li><button type="button" class="btn_color" style="color:#000;background-color:#dfdede;">#dfdede<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15852
|
+
' <li><button type="button" class="btn_color" style="color:#fff;background-color:#8c8c8c;">#8c8c8c<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15853
|
+
' <li><button type="button" class="btn_color" style="color:#fff;background-color:#000000;">#000000<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15854
|
+
' <li class="compact_color"><button type="button" class="btn_color" style="background-color:#222222;">#222222<span class="bg_check"></span><span class="bg_btnframe"></span></button></li>'+
|
|
15855
|
+
' </ul>'+
|
|
15856
|
+
' </div>'+
|
|
15857
|
+
' </div>'+
|
|
15858
|
+
' </div>'+
|
|
15859
|
+
' </li>';
|
|
15860
|
+
}
|
|
15861
|
+
html +='</ul>'+
|
|
15862
|
+
'</div>';
|
|
15863
|
+
/** 들́—¬́“°ê¸°, ë‚´́–´́“°ê¸° */
|
|
15864
|
+
if(options.showInOutDent) {
|
|
15865
|
+
html += ''+
|
|
15866
|
+
'<div class="tool_module">'+
|
|
15867
|
+
' <ul class="editor_tool">'+
|
|
15868
|
+
' <li>'+
|
|
15869
|
+
' <button type="button" class="btn_editor" title="'+lang.toolbar.indent+'" data-command="indent">'+
|
|
15870
|
+
' <div class="img_editor ico_indnet"></div>'+
|
|
15871
|
+
' </button>'+
|
|
15872
|
+
' </li>'+
|
|
15873
|
+
' <li>'+
|
|
15874
|
+
' <button type="button" class="btn_editor" title="'+lang.toolbar.outdent+'" data-command="outdent">'+
|
|
15875
|
+
' <div class="img_editor ico_outdent"></div>'+
|
|
15876
|
+
' </button>'+
|
|
15877
|
+
' </li>'+
|
|
15878
|
+
' </ul>'+
|
|
15879
|
+
'</div>';
|
|
15880
|
+
}
|
|
15881
|
+
/** ́ •ë ¬, 구분́„ ́ƒ́ */
|
|
15882
|
+
html += '<div class="tool_module">'+
|
|
15883
|
+
' <ul class="editor_tool">';
|
|
15884
|
+
if(options.showAlign) {
|
|
15885
|
+
html += ''+
|
|
15886
|
+
' <li>'+
|
|
15887
|
+
' <strong class="screen_out">'+lang.toolbar.align+'</strong>'+
|
|
15888
|
+
' <button type="button" class="btn_editor btn_align" title="'+lang.toolbar.align+'" data-display="sub">'+
|
|
15889
|
+
' <span class="img_editor ico_align_l">'+lang.toolbar.alignLeft+'</span>'+
|
|
15890
|
+
' </button>'+
|
|
15891
|
+
' <div class="layer_editor layer_align">'+
|
|
15892
|
+
' <div class="inner_layer inner_layer_type2">'+
|
|
15893
|
+
' <ul class="list_editor">'+
|
|
15894
|
+
' <li><button type="button" class="btn_edit btn_align" data-command="justifyleft" title="'+lang.toolbar.alignLeft+'"><span class="img_editor ico_align_l"></span>'+lang.toolbar.left+'</button></li>'+
|
|
15895
|
+
' <li><button type="button" class="btn_edit btn_align" data-command="justifycenter" title="'+lang.toolbar.alignCenter+'"><span class="img_editor ico_align_c"></span>'+lang.toolbar.center+'</button></li>'+
|
|
15896
|
+
' <li><button type="button" class="btn_edit btn_align" data-command="justifyright" title="'+lang.toolbar.alignRight+'"><span class="img_editor ico_align_r"></span>'+lang.toolbar.right+'</button></li>'+
|
|
15897
|
+
' <li><button type="button" class="btn_edit btn_align" data-command="justifyfull" title="'+lang.toolbar.justifyFull+'"><span class="img_editor ico_align_f"></span>'+lang.toolbar.bothSide+'</button></li>'+
|
|
15898
|
+
' </ul>'+
|
|
15899
|
+
' </div>'+
|
|
15900
|
+
' </div>'+
|
|
15901
|
+
' </li>';
|
|
15902
|
+
}
|
|
15903
|
+
if(options.showList) {
|
|
15904
|
+
html += ''+
|
|
15905
|
+
' <li>'+
|
|
15906
|
+
' <button type="button" class="btn_editor" title="'+lang.toolbar.list+'" data-display="sub">'+
|
|
15907
|
+
' <div class="img_editor ico_list ico_list_num"></div>'+
|
|
15908
|
+
' </button>'+
|
|
15909
|
+
' <div class="layer_editor layer_list">'+
|
|
15910
|
+
' <div class="inner_layer inner_layer_type2">'+
|
|
15911
|
+
' <ul class="list_editor">'+
|
|
15912
|
+
' <li><button type="button" class="btn_edit" data-command="insertOrderedList" data-value="DECIMAL" title="'+lang.toolbar.orderList+'"><span class="img_editor ico_list ico_list_num"></span></button></li>'+
|
|
15913
|
+
' <li><button type="button" class="btn_edit" data-command="insertUnorderedList" data-value="DISC" title="'+lang.toolbar.unorderList+'"><span class="img_editor ico_list ico_list_square"></span></button></li>'+
|
|
15914
|
+
' </ul>'+
|
|
15915
|
+
' </div>'+
|
|
15916
|
+
' </div>'+
|
|
15917
|
+
' </li>';
|
|
15918
|
+
}
|
|
15919
|
+
if(options.showLine) {
|
|
15920
|
+
html += ''+
|
|
15921
|
+
' <li>'+
|
|
15922
|
+
' <strong class="screen_out">'+lang.toolbar.line+'</strong>'+
|
|
15923
|
+
' <button type="button" class="btn_editor btn_line" title="'+lang.toolbar.line+'" data-display="sub">'+
|
|
15924
|
+
' <hr style="border-width: 1px 0px 0px; border-style: solid none none; border-color: black; border-image: initial; height: 1px;">'+
|
|
15925
|
+
' <hr style="border-width: 1px 0px 0px; border-style: dotted none none; border-color: black; border-image: initial; height: 1px;">'+
|
|
15926
|
+
' <hr style="border-width: 1px 0px 0px; border-style: dashed none none; border-color: black; border-image: initial; height: 1px;">'+
|
|
15927
|
+
' </button>'+
|
|
15928
|
+
' <div class="layer_editor layer_line">'+
|
|
15929
|
+
' <div class="inner_layer inner_layer_type2">'+
|
|
15930
|
+
' <ul class="list_editor">'+
|
|
15931
|
+
' <li><button type="button" class="btn_edit btn_line" data-command="horizontalRules" data-value="hr1">'+
|
|
15932
|
+
' <hr style="border-width: 1px 0px 0px; border-style: solid none none; border-color: black; border-image: initial; height: 1px;">'+
|
|
15933
|
+
' </button>'+
|
|
15934
|
+
' </li>'+
|
|
15935
|
+
' <li>'+
|
|
15936
|
+
' <button type="button" class="btn_edit btn_line" data-command="horizontalRules" data-value="hr2">'+
|
|
15937
|
+
' <hr style="border-width: 1px 0px 0px; border-style: dotted none none; border-color: black; border-image: initial; height: 1px;">'+
|
|
15938
|
+
' </button>'+
|
|
15939
|
+
' </li>'+
|
|
15940
|
+
' <li>'+
|
|
15941
|
+
' <button type="button" class="btn_edit btn_line" data-command="horizontalRules" data-value="hr3">'+
|
|
15942
|
+
' <hr style="border-width: 1px 0px 0px; border-style: dashed none none; border-color: black; border-image: initial; height: 1px;">'+
|
|
15943
|
+
' </button>'+
|
|
15944
|
+
' </li>'+
|
|
15945
|
+
' </ul>'+
|
|
15946
|
+
' </div>'+
|
|
15947
|
+
' </div>'+
|
|
15948
|
+
' </li>';
|
|
15949
|
+
}
|
|
15950
|
+
html +='</ul>'+
|
|
15951
|
+
'</div>'+
|
|
15952
|
+
/** í…Œ́´ë¸”, ë§í¬, ́‚¬́§„ */
|
|
15953
|
+
'<div class="tool_module">'+
|
|
15954
|
+
' <ul class="editor_tool">';
|
|
15955
|
+
if(options.showTable) {
|
|
15956
|
+
html += ''+
|
|
15957
|
+
' <li>'+
|
|
15958
|
+
' <button class="btn_editor" title="'+lang.toolbar.table+'" data-display="sub" data-command="table">'+
|
|
15959
|
+
' <div class="img_editor ico_table"></div>'+
|
|
15960
|
+
' </button>'+
|
|
15961
|
+
' <div class="table-content" style="display: none;">'+
|
|
15962
|
+
' <div class="table-data-form">'+
|
|
15963
|
+
' <div class="table-picker sun-editor-id-table-picker" data-command="insertTable" data-value="1x1"></div>'+
|
|
15964
|
+
' <div class="table-highlighted sun-editor-id-table-highlighted"></div>'+
|
|
15965
|
+
' <div class="table-unhighlighted sun-editor-id-table-unhighlighted"></div>'+
|
|
15966
|
+
' </div>'+
|
|
15967
|
+
' <div class="table-display sun-editor-table-display">1 x 1</div>'+
|
|
15968
|
+
' </div>'+
|
|
15969
|
+
' </li>';
|
|
15970
|
+
}
|
|
15971
|
+
if(options.showLink) {
|
|
15972
|
+
html += ''+
|
|
15973
|
+
' <li>'+
|
|
15974
|
+
' <button class="btn_editor" title="'+lang.toolbar.link+'" data-display="modal" data-command="link">'+
|
|
15975
|
+
' <div class="img_editor ico_url"></div>'+
|
|
15976
|
+
' </button>'+
|
|
15977
|
+
' </li>';
|
|
15978
|
+
}
|
|
15979
|
+
if(options.showImage) {
|
|
15980
|
+
html += ''+
|
|
15981
|
+
' <li>'+
|
|
15982
|
+
' <button class="btn_editor" title="'+lang.toolbar.image+'" data-display="modal" data-command="image">'+
|
|
15983
|
+
' <div class="img_editor ico_picture"></div>'+
|
|
15984
|
+
' </button>'+
|
|
15985
|
+
' </li>';
|
|
15986
|
+
}
|
|
15987
|
+
html += '</ul>'+
|
|
15988
|
+
'</div>'+
|
|
15989
|
+
/** ë™́˜́ƒ, ́ „́²´í™”ë©´, ́†Œ́¤í¸́§‘ */
|
|
15990
|
+
'<div class="tool_module">'+
|
|
15991
|
+
' <ul class="editor_tool">';
|
|
15992
|
+
if(options.showVideo) {
|
|
15993
|
+
html += ''+
|
|
15994
|
+
' <li>'+
|
|
15995
|
+
' <button class="btn_editor" title="'+lang.toolbar.video+'" data-display="modal" data-command="video">'+
|
|
15996
|
+
' <div class="img_editor ico_video"></div>'+
|
|
15997
|
+
' </button>'+
|
|
15998
|
+
' </li>';
|
|
15999
|
+
}
|
|
16000
|
+
if(options.showFullScreen) {
|
|
16001
|
+
html += ''+
|
|
16002
|
+
' <li>'+
|
|
16003
|
+
' <button class="btn_editor" title="'+lang.toolbar.fullScreen+'" data-command="fullScreen">'+
|
|
16004
|
+
' <div class="img_editor ico_full_screen_e"></div>'+
|
|
16005
|
+
' </button>'+
|
|
16006
|
+
' </li>';
|
|
16007
|
+
}
|
|
16008
|
+
if(options.showCodeView) {
|
|
16009
|
+
html += ''+
|
|
16010
|
+
' <li>'+
|
|
16011
|
+
' <button class="btn_editor" title="'+lang.toolbar.htmlEditor+'" data-command="sorceFrame">'+
|
|
16012
|
+
' <div class="img_editor ico_html"></div>'+
|
|
16013
|
+
' </button>'+
|
|
16014
|
+
' </li>';
|
|
16015
|
+
}
|
|
16016
|
+
html += '</ul>'+
|
|
16017
|
+
'</div>'+
|
|
16018
|
+
'';
|
|
16019
|
+
|
|
16020
|
+
return html;
|
|
16021
|
+
};
|
|
16022
|
+
|
|
16023
|
+
var dialogBox = function() {
|
|
16024
|
+
var html = ''+
|
|
16025
|
+
/** 다́´́–¼ë¡œê·¸ 백그ë¼́´ë“œ */
|
|
16026
|
+
'<div class="modal-dialog-background sun-editor-id-dialog-back" style="display: none;"></div>'+
|
|
16027
|
+
/** 다́´́–¼ë¡œê·¸ */
|
|
16028
|
+
'<div class="modal-dialog sun-editor-id-dialog-modal" style="display: none;">';
|
|
16029
|
+
/** ë§í¬ ́‚½́… 다́´́–¼ë¡œê·¸ */
|
|
16030
|
+
html += ''+
|
|
16031
|
+
' <div class="modal-content sun-editor-id-dialog-link" style="display: none;">'+
|
|
16032
|
+
' <form class="editor_link">'+
|
|
16033
|
+
' <div class="modal-header">'+
|
|
16034
|
+
' <button type="button" data-command="close" class="close" aria-label="Close">'+
|
|
16035
|
+
' <span aria-hidden="true" data-command="close">Ă—</span>'+
|
|
16036
|
+
' </button>'+
|
|
16037
|
+
' <h5 class="modal-title">'+lang.dialogBox.linkBox.title+'</h5>'+
|
|
16038
|
+
' </div>'+
|
|
16039
|
+
' <div class="modal-body">'+
|
|
16040
|
+
' <div class="form-group">'+
|
|
16041
|
+
' <label>'+lang.dialogBox.linkBox.url+'</label>'+
|
|
16042
|
+
' <input class="form-control sun-editor-id-linkurl" type="text">'+
|
|
16043
|
+
' </div>'+
|
|
16044
|
+
' <div class="form-group">'+
|
|
16045
|
+
' <label>'+lang.dialogBox.linkBox.text+'</label><input class="form-control sun-editor-id-linktext" type="text">'+
|
|
16046
|
+
' </div>'+
|
|
16047
|
+
' </div>'+
|
|
16048
|
+
' <div class="modal-footer">'+
|
|
16049
|
+
' <button type="submit" class="btn btn-primary sun-editor-id-submit-link"><span>'+lang.dialogBox.submitButton+'</span></button>'+
|
|
16050
|
+
' </div>'+
|
|
16051
|
+
' </form>'+
|
|
16052
|
+
' </div>';
|
|
16053
|
+
/** ́´ë¯¸́§€ ́‚½́… 다́´́–¼ë¡œê·¸ */
|
|
16054
|
+
html += ''+
|
|
16055
|
+
' <div class="modal-content sun-editor-id-dialog-image" style="display: none;">'+
|
|
16056
|
+
' <form class="editor_image" method="post" enctype="multipart/form-data">'+
|
|
16057
|
+
' <div class="modal-header">'+
|
|
16058
|
+
' <button type="button" data-command="close" class="close" aria-label="Close">'+
|
|
16059
|
+
' <span aria-hidden="true" data-command="close">Ă—</span>'+
|
|
16060
|
+
' </button>'+
|
|
16061
|
+
' <h5 class="modal-title">'+lang.dialogBox.imageBox.title+'</h5>'+
|
|
16062
|
+
' </div>'+
|
|
16063
|
+
' <div class="modal-body">'+
|
|
16064
|
+
' <div class="form-group">'+
|
|
16065
|
+
' <label>'+lang.dialogBox.imageBox.file+'</label>'+
|
|
16066
|
+
' <input class="form-control sun-editor-id-image-file" type="file" accept="image/*" multiple="multiple">'+
|
|
16067
|
+
' </div>'+
|
|
16068
|
+
' <div class="form-group">'+
|
|
16069
|
+
' <label>'+lang.dialogBox.imageBox.url+'</label><input class="form-control sun-editor-id-image-url" type="text">'+
|
|
16070
|
+
' </div>'+
|
|
16071
|
+
' </div>'+
|
|
16072
|
+
' <div class="modal-footer">'+
|
|
16073
|
+
' <button type="submit" class="btn btn-primary sun-editor-id-submit-image"><span>'+lang.dialogBox.submitButton+'</span></button>'+
|
|
16074
|
+
' </div>'+
|
|
16075
|
+
' </form>'+
|
|
16076
|
+
' </div>';
|
|
16077
|
+
/** ë™́˜́ƒ ́‚½́… 다́´́–¼ë¡œê·¸ */
|
|
16078
|
+
html += ''+
|
|
16079
|
+
' <div class="modal-content sun-editor-id-dialog-video" style="display: none;">'+
|
|
16080
|
+
' <form class="editor_video">'+
|
|
16081
|
+
' <div class="modal-header">'+
|
|
16082
|
+
' <button type="button" data-command="close" class="close" aria-label="Close">'+
|
|
16083
|
+
' <span aria-hidden="true" data-command="close">Ă—</span>'+
|
|
16084
|
+
' </button>'+
|
|
16085
|
+
' <h5 class="modal-title">'+lang.dialogBox.videoBox.title+'</h5>'+
|
|
16086
|
+
' </div>'+
|
|
16087
|
+
' <div class="modal-body">'+
|
|
16088
|
+
' <div class="form-group">'+
|
|
16089
|
+
' <label>'+lang.dialogBox.videoBox.url+'</label>'+
|
|
16090
|
+
' <input class="form-control sun-editor-id-video-url" type="text">'+
|
|
16091
|
+
' </div>'+
|
|
16092
|
+
' <div class="form-group form-size">'+
|
|
16093
|
+
' <div class="size-text"><label class="size-w">'+lang.dialogBox.videoBox.width+'</label><label class="size-x"> </label><label class="size-h">'+lang.dialogBox.videoBox.height+'</label></div>'+
|
|
16094
|
+
' <input type="text" class="form-size-control sun-editor-id-video-x"><label class="size-x">x</label><input type="text" class="form-size-control sun-editor-id-video-y">'+
|
|
16095
|
+
' </div>'+
|
|
16096
|
+
' </div>'+
|
|
16097
|
+
' <div class="modal-footer">'+
|
|
16098
|
+
' <button type="submit" class="btn btn-primary sun-editor-id-submit-video"><span>'+lang.dialogBox.submitButton+'</span></button>'+
|
|
16099
|
+
' </div>'+
|
|
16100
|
+
' </form>'+
|
|
16101
|
+
' </div>';
|
|
16102
|
+
html +='</div>';
|
|
16103
|
+
|
|
16104
|
+
return html;
|
|
16105
|
+
};
|
|
16106
|
+
|
|
16107
|
+
var imgDIv = function() {
|
|
16108
|
+
return ''+
|
|
16109
|
+
'<div class="image-resize-dot tl"></div>'+
|
|
16110
|
+
'<div class="image-resize-dot tr"></div>'+
|
|
16111
|
+
'<div class="image-resize-dot bl"></div>'+
|
|
16112
|
+
'<div class="image-resize-dot br-controller sun-editor-img-controller"></div>'+
|
|
16113
|
+
'<div class="image-size-display sun-editor-id-img-display"></div>';
|
|
16114
|
+
};
|
|
16115
|
+
|
|
16116
|
+
var imgBtn = function() {
|
|
16117
|
+
return ''+
|
|
16118
|
+
'<div class="btn-group">'+
|
|
16119
|
+
' <button type="button" data-command="100" title="'+lang.dialogBox.imageBox.resize100+'"><span class="note-fontsize-10">100%</span></button>'+
|
|
16120
|
+
' <button type="button" data-command="75" title="'+lang.dialogBox.imageBox.resize75+'"><span class="note-fontsize-10">75%</span></button>'+
|
|
16121
|
+
' <button type="button" data-command="50" title="'+lang.dialogBox.imageBox.resize50+'"><span class="note-fontsize-10">50%</span></button>'+
|
|
16122
|
+
' <button type="button" data-command="25" title="'+lang.dialogBox.imageBox.resize25+'"><span class="note-fontsize-10">25%</span></button>'+
|
|
16123
|
+
'</div>'+
|
|
16124
|
+
'<div class="btn-group remove">'+
|
|
16125
|
+
' <button type="button" data-command="remove" title="'+lang.dialogBox.imageBox.remove+'"><span class="image_remove">X</span></button>'+
|
|
16126
|
+
'</div>';
|
|
16127
|
+
};
|
|
16128
|
+
|
|
16129
|
+
return {
|
|
16130
|
+
toolBar : toolBar,
|
|
16131
|
+
dialogBox : dialogBox,
|
|
16132
|
+
imgDiv : imgDIv,
|
|
16133
|
+
imgBtn : imgBtn
|
|
16134
|
+
};
|
|
16135
|
+
};
|
|
16136
|
+
|
|
16137
|
+
/**
|
|
16138
|
+
* document create
|
|
16139
|
+
* @param element
|
|
16140
|
+
* @param options
|
|
16141
|
+
* @returns {{constructed: Element, options: *}}
|
|
16142
|
+
* @constructor
|
|
16143
|
+
*/
|
|
16144
|
+
var Constructor = function(element, options) {
|
|
16145
|
+
if(!(typeof options === "object")) options = {};
|
|
16146
|
+
|
|
16147
|
+
/** ́‚¬́©́ ́˜µ́…˜ ́´ˆê¸°í™” */
|
|
16148
|
+
options.addFont = options.addFont || null;
|
|
16149
|
+
options.videoX = options.videoX || 560;
|
|
16150
|
+
options.videoY = options.videoY || 315;
|
|
16151
|
+
options.imageSize = options.imageSize || '350px';
|
|
16152
|
+
options.height = /^\d+/.test(options.height)? (/^\d+$/.test(options.height)? options.height+"px": options.height): element.clientHeight+"px";
|
|
16153
|
+
options.width = /^\d+/.test(options.width)? (/^\d+$/.test(options.width)? options.width+"px": options.width): (/%|auto/.test(element.style.width)? element.style.width: element.clientWidth+"px");
|
|
16154
|
+
/** 툴바 ë²„í¼ ë³´́´ê¸° ́„¤́ • */
|
|
16155
|
+
options.showFont = options.showFont !== undefined? options.showFont: true;
|
|
16156
|
+
options.showFormats = options.showFormats !== undefined? options.showFormats: true;
|
|
16157
|
+
options.showBold = options.showBold !== undefined? options.showBold: true;
|
|
16158
|
+
options.showUnderline = options.showUnderline !== undefined? options.showUnderline: true;
|
|
16159
|
+
options.showItalic = options.showItalic !== undefined? options.showItalic: true;
|
|
16160
|
+
options.showStrike = options.showStrike !== undefined? options.showStrike: true;
|
|
16161
|
+
options.showFontColor = options.showFontColor !== undefined? options.showFontColor: true;
|
|
16162
|
+
options.showHiliteColor = options.showHiliteColor !== undefined? options.showHiliteColor: true;
|
|
16163
|
+
options.showInOutDent = options.showInOutDent !== undefined? options.showInOutDent: true;
|
|
16164
|
+
options.showAlign = options.showAlign !== undefined? options.showAlign: true;
|
|
16165
|
+
options.showList = options.showList !== undefined? options.showList: true;
|
|
16166
|
+
options.showLine = options.showLine !== undefined? options.showLine: true;
|
|
16167
|
+
options.showTable = options.showTable !== undefined? options.showTable: true;
|
|
16168
|
+
options.showLink = options.showLink !== undefined? options.showLink: true;
|
|
16169
|
+
options.showImage = options.showImage !== undefined? options.showImage: true;
|
|
16170
|
+
options.showVideo = options.showVideo !== undefined? options.showVideo: true;
|
|
16171
|
+
options.showFullScreen = options.showFullScreen !== undefined? options.showFullScreen: true;
|
|
16172
|
+
options.showCodeView = options.showCodeView !== undefined? options.showCodeView: true;
|
|
16173
|
+
|
|
16174
|
+
/** ́µœ́ƒ́œ„ div */
|
|
16175
|
+
var top_div = document.createElement("DIV");
|
|
16176
|
+
top_div.className = "sun-editor";
|
|
16177
|
+
top_div.style.width = options.width;
|
|
16178
|
+
/** relative div */
|
|
16179
|
+
var relative = document.createElement("DIV");
|
|
16180
|
+
relative.className = "sun-editor-container";
|
|
16181
|
+
|
|
16182
|
+
/** 툴바 */
|
|
16183
|
+
var tool_bar = document.createElement("DIV");
|
|
16184
|
+
tool_bar.className = "sun-editor-id-toolbar";
|
|
16185
|
+
tool_bar.innerHTML = createEditor(options).toolBar();
|
|
16186
|
+
|
|
16187
|
+
/** ́—디터 */
|
|
16188
|
+
var editor_div = document.createElement("DIV");
|
|
16189
|
+
editor_div.className = "sun-editor-id-editorArea";
|
|
16190
|
+
editor_div.style.height = options.height;
|
|
16191
|
+
/** iframe */
|
|
16192
|
+
var iframe = document.createElement("IFRAME");
|
|
16193
|
+
iframe.allowFullscreen = true;
|
|
16194
|
+
iframe.frameBorder = 0;
|
|
16195
|
+
iframe.className = "input_editor sun-editor-id-wysiwyg";
|
|
16196
|
+
iframe.style.display = "block";
|
|
16197
|
+
/** textarea */
|
|
16198
|
+
var textarea = document.createElement("TEXTAREA");
|
|
16199
|
+
textarea.className = "input_editor html sun-editor-id-source";
|
|
16200
|
+
textarea.style.display = "none";
|
|
16201
|
+
|
|
16202
|
+
/** 리́‚¬́´́¦ˆë°” */
|
|
16203
|
+
var resize_bar = document.createElement("DIV");
|
|
16204
|
+
resize_bar.className = "sun-editor-id-resizeBar";
|
|
16205
|
+
|
|
16206
|
+
/** 다́´́–¼ë¡œê·¸ */
|
|
16207
|
+
var dialog_div = document.createElement("DIV");
|
|
16208
|
+
dialog_div.className = "sun-editor-id-dialogBox";
|
|
16209
|
+
dialog_div.innerHTML = createEditor(options).dialogBox();
|
|
16210
|
+
|
|
16211
|
+
/** ́´ë¯¸́§€ ́¡°́ ˆ div */
|
|
16212
|
+
var resize_img = document.createElement("DIV");
|
|
16213
|
+
resize_img.className = "modal-image-resize";
|
|
16214
|
+
resize_img.innerHTML = createEditor(options).imgDiv();
|
|
16215
|
+
/** ́´ë¯¸́§€ ́¡°́ ˆ ë²„í¼ */
|
|
16216
|
+
var resize_img_button = document.createElement("DIV");
|
|
16217
|
+
resize_img_button.className = "image-resize-btn";
|
|
16218
|
+
resize_img_button.innerHTML = createEditor(options).imgBtn();
|
|
16219
|
+
|
|
16220
|
+
/** 로딩 ë°•́¤ */
|
|
16221
|
+
var loding_box = document.createElement("DIV");
|
|
16222
|
+
loding_box.className = "sun-editor-id-loding";
|
|
16223
|
+
loding_box.innerHTML = "<div class=\"ico-loding\"></div>";
|
|
16224
|
+
|
|
16225
|
+
/** resize ë™́‘́‹œ background */
|
|
16226
|
+
var resize_back = document.createElement("DIV");
|
|
16227
|
+
resize_back.className = "sun-editor-id-resize-background";
|
|
16228
|
+
|
|
16229
|
+
/** ́‚¬́©́ ́˜µ́…˜ ê°’ 넣기 */
|
|
16230
|
+
dialog_div.getElementsByClassName('sun-editor-id-video-x')[0].value = options.videoX;
|
|
16231
|
+
dialog_div.getElementsByClassName('sun-editor-id-video-y')[0].value = options.videoY;
|
|
16232
|
+
|
|
16233
|
+
/** append */
|
|
16234
|
+
editor_div.appendChild(iframe);
|
|
16235
|
+
editor_div.appendChild(textarea);
|
|
16236
|
+
relative.appendChild(tool_bar);
|
|
16237
|
+
relative.appendChild(editor_div);
|
|
16238
|
+
relative.appendChild(resize_bar);
|
|
16239
|
+
relative.appendChild(dialog_div);
|
|
16240
|
+
relative.appendChild(resize_back);
|
|
16241
|
+
relative.appendChild(resize_img);
|
|
16242
|
+
relative.appendChild(resize_img_button);
|
|
16243
|
+
relative.appendChild(loding_box);
|
|
16244
|
+
top_div.appendChild(relative);
|
|
16245
|
+
|
|
16246
|
+
return {
|
|
16247
|
+
constructed : {
|
|
16248
|
+
_top : top_div,
|
|
16249
|
+
_toolBar : tool_bar,
|
|
16250
|
+
_editorArea : editor_div,
|
|
16251
|
+
_resizeBar : resize_bar,
|
|
16252
|
+
_dialog : dialog_div,
|
|
16253
|
+
_loding : loding_box,
|
|
16254
|
+
_resizeImg : resize_img,
|
|
16255
|
+
_resizeImgBtn : resize_img_button,
|
|
16256
|
+
_resizeBack : resize_back
|
|
16257
|
+
},
|
|
16258
|
+
options : options
|
|
16259
|
+
};
|
|
16260
|
+
};
|
|
16261
|
+
|
|
16262
|
+
/**
|
|
16263
|
+
* option and module define
|
|
16264
|
+
* @param cons
|
|
16265
|
+
* @param options
|
|
16266
|
+
* @returns {...}
|
|
16267
|
+
* @constructor
|
|
16268
|
+
*/
|
|
16269
|
+
var Context = function(element, cons, options) {
|
|
16270
|
+
/** ë‚´ë¶€ ́˜µ́…˜ê°’ ́´ˆê¸°í™” */
|
|
16271
|
+
options._originCssText = cons._top.style.cssText;
|
|
16272
|
+
options._innerHeight = cons._editorArea.clientHeight;
|
|
16273
|
+
|
|
16274
|
+
setTimeout(function(){
|
|
16275
|
+
cons._editorArea.getElementsByClassName('sun-editor-id-wysiwyg')[0].contentWindow.document.head.innerHTML = ''+
|
|
16276
|
+
'<meta charset=\"utf-8\">' +
|
|
16277
|
+
'<style type=\"text/css\">' +
|
|
16278
|
+
' body {margin:15px; word-break:break-all; overflow:auto; font-family:sans-serif;} p {margin:0; padding:0;} blockquote {margin-top:0; margin-bottom:0; margin-right:0;}' +
|
|
16279
|
+
' table {table-layout:fixed; border:1px solid rgb(204, 204, 204); width:100%; max-width:100%; margin-bottom:20px; background-color:transparent; border-spacing:0px; border-collapse:collapse;}'+
|
|
16280
|
+
' table tr {border:1px solid #ccc;}'+
|
|
16281
|
+
' table tr td {border:1px solid #ccc; padding:8px;}'+
|
|
16282
|
+
'</style>';
|
|
16283
|
+
cons._editorArea.getElementsByClassName('sun-editor-id-wysiwyg')[0].contentWindow.document.body.setAttribute("contenteditable", true);
|
|
16284
|
+
if(element.value.length > 0) {
|
|
16285
|
+
cons._editorArea.getElementsByClassName('sun-editor-id-wysiwyg')[0].contentWindow.document.body.innerHTML = '<p>'+element.value+'</p>';
|
|
16286
|
+
} else {
|
|
16287
|
+
cons._editorArea.getElementsByClassName('sun-editor-id-wysiwyg')[0].contentWindow.document.body.innerHTML = '<p></p>';
|
|
16288
|
+
}
|
|
16289
|
+
}, 0);
|
|
16290
|
+
|
|
16291
|
+
return {
|
|
16292
|
+
argument : {
|
|
16293
|
+
_copySelection : null,
|
|
16294
|
+
_selectionNode : null,
|
|
16295
|
+
_imageFileSrc : null,
|
|
16296
|
+
_imageElement : null,
|
|
16297
|
+
_imageElement_w : 0,
|
|
16298
|
+
_imageElement_h : 0,
|
|
16299
|
+
_imageElement_l : 0,
|
|
16300
|
+
_imageElement_t : 0,
|
|
16301
|
+
_imageResize_parent_t : 0,
|
|
16302
|
+
_imageResize_parent_l : 0,
|
|
16303
|
+
_wysiwygActive : true,
|
|
16304
|
+
_isFullScreen : false,
|
|
16305
|
+
_innerHeight_fullScreen : 0,
|
|
16306
|
+
_tableXY : [],
|
|
16307
|
+
_resizeClientY : 0,
|
|
16308
|
+
_originCssText : options._originCssText,
|
|
16309
|
+
_innerHeight : options._innerHeight,
|
|
16310
|
+
_windowHeight : window.innerHeight
|
|
16311
|
+
},
|
|
16312
|
+
element : {
|
|
16313
|
+
textElement: element,
|
|
16314
|
+
topArea: cons._top,
|
|
16315
|
+
resizebar: cons._resizeBar,
|
|
16316
|
+
editorArea: cons._editorArea,
|
|
16317
|
+
wysiwygWindow: cons._editorArea.getElementsByClassName('sun-editor-id-wysiwyg')[0].contentWindow,
|
|
16318
|
+
wysiwygElement: cons._editorArea.getElementsByClassName('sun-editor-id-wysiwyg')[0],
|
|
16319
|
+
source: cons._editorArea.getElementsByClassName('sun-editor-id-source')[0],
|
|
16320
|
+
loding : cons._loding,
|
|
16321
|
+
imageResizeDiv : cons._resizeImg,
|
|
16322
|
+
imageResizeController : cons._resizeImg.getElementsByClassName('sun-editor-img-controller')[0],
|
|
16323
|
+
imageResizeDisplay : cons._resizeImg.getElementsByClassName('sun-editor-id-img-display')[0],
|
|
16324
|
+
imageResizeBtn : cons._resizeImgBtn,
|
|
16325
|
+
resizeBackground : cons._resizeBack
|
|
16326
|
+
},
|
|
16327
|
+
tool : {
|
|
16328
|
+
bar : cons._toolBar,
|
|
16329
|
+
barHeight : cons._toolBar.offsetHeight,
|
|
16330
|
+
cover : cons._toolBar.getElementsByClassName('sun-editor-id-toolbar-cover')[0],
|
|
16331
|
+
bold : cons._toolBar.getElementsByClassName('sun-editor-id-bold')[0],
|
|
16332
|
+
underline : cons._toolBar.getElementsByClassName('sun-editor-id-underline')[0],
|
|
16333
|
+
italic : cons._toolBar.getElementsByClassName('sun-editor-id-italic')[0],
|
|
16334
|
+
strike : cons._toolBar.getElementsByClassName('sun-editor-id-strike')[0],
|
|
16335
|
+
tablePicker : cons._toolBar.getElementsByClassName('sun-editor-id-table-picker')[0],
|
|
16336
|
+
tableHighlight : cons._toolBar.getElementsByClassName('sun-editor-id-table-highlighted')[0],
|
|
16337
|
+
tableUnHighlight : cons._toolBar.getElementsByClassName('sun-editor-id-table-unhighlighted')[0],
|
|
16338
|
+
tableDisplay : cons._toolBar.getElementsByClassName('sun-editor-table-display')[0],
|
|
16339
|
+
fontFamily : cons._toolBar.getElementsByClassName('sun-editor-font-family')[0],
|
|
16340
|
+
default_fontFamily : cons._toolBar.getElementsByClassName('sun-editor-font-family')[0].textContent,
|
|
16341
|
+
list_fontFamily : cons._toolBar.getElementsByClassName('sun-editor-list-font-family')[0],
|
|
16342
|
+
list_fontFamily_add : cons._toolBar.getElementsByClassName('sun-editor-list-font-family-add')[0]
|
|
16343
|
+
},
|
|
16344
|
+
dialog : {
|
|
16345
|
+
modalArea : cons._dialog,
|
|
16346
|
+
back : cons._dialog.getElementsByClassName('sun-editor-id-dialog-back')[0],
|
|
16347
|
+
modal : cons._dialog.getElementsByClassName('sun-editor-id-dialog-modal')[0],
|
|
16348
|
+
forms : cons._dialog.getElementsByTagName('FORM'),
|
|
16349
|
+
link : cons._dialog.getElementsByClassName('sun-editor-id-dialog-link')[0],
|
|
16350
|
+
linkText : cons._dialog.getElementsByClassName('sun-editor-id-linkurl')[0],
|
|
16351
|
+
linkAnchorText : cons._dialog.getElementsByClassName('sun-editor-id-linktext')[0],
|
|
16352
|
+
image : cons._dialog.getElementsByClassName('sun-editor-id-dialog-image')[0],
|
|
16353
|
+
imgInputFile : cons._dialog.getElementsByClassName('sun-editor-id-image-file')[0],
|
|
16354
|
+
imgInputUrl : cons._dialog.getElementsByClassName('sun-editor-id-image-url')[0],
|
|
16355
|
+
video : cons._dialog.getElementsByClassName('sun-editor-id-dialog-video')[0],
|
|
16356
|
+
videoInputUrl : cons._dialog.getElementsByClassName('sun-editor-id-video-url')[0],
|
|
16357
|
+
video_x : cons._dialog.getElementsByClassName('sun-editor-id-video-x')[0],
|
|
16358
|
+
video_y : cons._dialog.getElementsByClassName('sun-editor-id-video-y')[0]
|
|
16359
|
+
},
|
|
16360
|
+
user : {
|
|
16361
|
+
videoX : options.videoX,
|
|
16362
|
+
videoY : options.videoY,
|
|
16363
|
+
imageSize : options.imageSize
|
|
16364
|
+
}
|
|
16365
|
+
}
|
|
16366
|
+
};
|
|
16367
|
+
|
|
16368
|
+
/**
|
|
16369
|
+
* create Suneditor
|
|
16370
|
+
* @param elementId
|
|
16371
|
+
* @param options
|
|
16372
|
+
* @returns {core}
|
|
16373
|
+
*/
|
|
16374
|
+
SUNEDITOR.create = function (elementId, options) {
|
|
16375
|
+
var element = document.getElementById(elementId);
|
|
16376
|
+
|
|
16377
|
+
if(element === null || element === undefined) {
|
|
16378
|
+
alert('Suneditor creation failed :\n\rThe element for that id was not found');
|
|
16379
|
+
return null;
|
|
16380
|
+
}
|
|
16381
|
+
|
|
16382
|
+
var cons = Constructor(element, options);
|
|
16383
|
+
|
|
16384
|
+
/** 형́ œ 노드로 ́ƒ́„± 후 ́ˆ¨ê¹€ */
|
|
16385
|
+
if(typeof element.nextElementSibling === 'object') {
|
|
16386
|
+
element.parentNode.insertBefore(cons.constructed._top, element.nextElementSibling);
|
|
16387
|
+
} else {
|
|
16388
|
+
element.parentNode.appendChild(cons.constructed._top);
|
|
16389
|
+
}
|
|
16390
|
+
|
|
16391
|
+
element.style.display = "none";
|
|
16392
|
+
|
|
16393
|
+
return new core(Context(element, cons.constructed, cons.options));
|
|
16394
|
+
};
|
|
16395
|
+
|
|
16396
|
+
})();
|
|
16397
|
+
`;
|
|
16398
|
+
|
|
16399
|
+
// Styles for SunEditor — extracted from suneditor.html
|
|
16400
|
+
// Do NOT edit directly. Source: design-system/temp/suneditor.html
|
|
16401
|
+
const SUNEDITOR_CSS = `
|
|
16402
|
+
@CHARSET "UTF-8";
|
|
16403
|
+
|
|
16404
|
+
/* ë©”́¸ */
|
|
16405
|
+
.sun-editor {width:auto; height:auto; border:1px solid #dadada; background-color:#FFF; z-index:10000;}
|
|
16406
|
+
.sun-editor th, .sun-editor td, .sun-editor input, .sun-editor select, .sun-editor textarea, .sun-editor button {font-size:14px; font-family:sans-serif; line-height:1.5; color:#111;}
|
|
16407
|
+
.sun-editor body, .sun-editor div, .sun-editor dl, .sun-editor dt, .sun-editor dd, .sun-editor ul, .sun-editor ol, .sun-editor li,
|
|
16408
|
+
.sun-editor h1, .sun-editor h2, .sun-editor h3, .sun-editor h4, .sun-editor h5, .sun-editor h6, .sun-editor pre, .sun-editor code, .sun-editor form, .sun-editor fieldset,
|
|
16409
|
+
.sun-editor legend, .sun-editor textarea, .sun-editor p, .sun-editor blockquote, .sun-editor th, .sun-editor td, .sun-editor input, .sun-editor select, .sun-editor textarea, .sun-editor button {margin:0; padding:0; border:0; color:#000 !important;}
|
|
16410
|
+
.sun-editor dl, .sun-editor ul, .sun-editor ol, .sun-editor menu, .sun-editor li {list-style: none !important;}
|
|
16411
|
+
.sun-editor hr {margin:6px 0 6px 0 !important;}
|
|
16412
|
+
.sun-editor textarea {resize:none !important; border:0 !important;}
|
|
16413
|
+
.sun-editor button {border:0 none; background-color:transparent; touch-action:manipulation; cursor:pointer;}
|
|
16414
|
+
.sun-editor input, .sun-editor select, .sun-editor textarea, .sun-editor button {vertical-align: middle;}
|
|
16415
|
+
.sun-editor button .txt {display: block; margin-top: 0px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
|
|
16416
|
+
|
|
16417
|
+
.sun-editor .btn_align .img_editor {display: inline-block; width:14px; height:13px; margin:-1px 10px 0 0; vertical-align:middle; text-indent:-9999px;}
|
|
16418
|
+
.sun-editor .layer_line .img_editor {display: inline-block; width:138px; height:1px; margin:-1px 10px 0 0; vertical-align:middle; text-indent:-9999px;}
|
|
16419
|
+
.sun-editor .screen_out {overflow:hidden; position:absolute; width:0; height:0; line-height:0; text-indent:-9999px;}
|
|
16420
|
+
|
|
16421
|
+
/* ́»¨í…Œ́´ë„ˆ */
|
|
16422
|
+
.sun-editor .sun-editor-container {position:relative; width:100%; height:100%;}
|
|
16423
|
+
|
|
16424
|
+
/* 툴바 */
|
|
16425
|
+
.sun-editor .sun-editor-id-toolbar-cover {position:absolute; display:none; font-size:36px; width:100%; height:100%; top:0; left:0; right:0; bottom:0; background-color:#fefefe; opacity:.5; filter:alpha(opacity=50); cursor:not-allowed; z-index:9;}
|
|
16426
|
+
.sun-editor .sun-editor-id-toolbar {overflow:visible; position:relative; height:auto; font-size:0pt; padding:3px 3px 3px 0px; background-color:#fafafa; border-bottom:1px solid #dadada; z-index:9;}
|
|
16427
|
+
|
|
16428
|
+
.sun-editor .sun-editor-id-toolbar .tool_module {display:inline-block;}
|
|
16429
|
+
.sun-editor .sun-editor-id-toolbar .editor_tool {float: left;height: 32px;margin:5px 0 5px 5px;}
|
|
16430
|
+
.sun-editor .sun-editor-id-toolbar .editor_tool li {position:relative; float:left;}
|
|
16431
|
+
|
|
16432
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor {display: none; position:absolute; top:34px; left:1px; z-index:1; border:1px solid #bababa; border-radius:2px; background-color:#fff; -webkit-box-shadow:0 3px 9px rgba(0, 0, 0, .5); box-shadow:0 3px 9px rgba(0, 0, 0, .5); outline:0 none;}
|
|
16433
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor .write_place .inp_txt {float:left; width:100%; height:23px; margin-top:0; font-size:12px; text-indent:6px; border:0 none; outline:0 none;}
|
|
16434
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor button {overflow: hidden; width:100%;}
|
|
16435
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor button:hover, .sun-editor .editor_tool .layer_editor button:focus {background-color:#f4b124; border-color:#ffebc1; outline:0 none;}
|
|
16436
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor .list_family {left:0; width:156px;}
|
|
16437
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor .list_family .default {border-bottom:1px solid #CCC;}
|
|
16438
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor .list_family_add {left:0; width:160px; border-top:1px solid #CCC;}
|
|
16439
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor .font_size_list {left:0; width:180px;}
|
|
16440
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor .font_size_list .btn_edit {height:auto; padding:2px 10px 5px; line-height:100%;}
|
|
16441
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor .font_size_list .txt_size18 {padding:1px 10px 6px}
|
|
16442
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor .font_size_list .txt_size24 {padding:3px 10px 11px; line-height:24px;}
|
|
16443
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor .font_size_list .txt_size36 {padding:4px 10px 15px; line-height:36px;}
|
|
16444
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.layer_list {left:0; width:42px;}
|
|
16445
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.layer_line {left:0; width:158px;}
|
|
16446
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.write_place {overflow:hidden; float:left; position:relative; height:25px; border:1px solid #dadada;}
|
|
16447
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.layer_color {left:0;}
|
|
16448
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.pallet_bgcolor {width:196px;}
|
|
16449
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.list_bgcolor {width:180px; height:126px; padding:10px 6px 0 10px;}
|
|
16450
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.list_bgcolor li {float:left; position:relative; width:16px; height:16px; margin:0 4px 4px 0;}
|
|
16451
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.more_palette {display:none; width:176px; margin:0 10px; padding:8px 0 6px; border-top:1px solid #f3f3f3;}
|
|
16452
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.list_bgcolor button {display:block; overflow:hidden; width:16px; height:16px; border-radius:2px; vertical-align:top; text-indent:-9999px;}
|
|
16453
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor .list_color .bg_check {display:none; position:absolute; top:1px; left:1px; width:12px; height:12px; border:1px solid #fff; border-radius:1px;}
|
|
16454
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.list_bgcolor .bg_btnframe {display:none; position:absolute; top:0; left:0; width:14px; height:14px; border:1px solid #000; border-radius:2px; opacity:.2; filter:alpha(opacity=20);}
|
|
16455
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.box_codeinp {float:left; height:28px;}
|
|
16456
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.more_palette .box_bgcolor {width:24px; margin-right:2px;}
|
|
16457
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.view_bgcolor {float:left; width:16px; height:16px; padding:3px; border:1px solid #d7d7d7;}
|
|
16458
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.view_bgcolor .inner_bgcolor {width:16px; height:16px;}
|
|
16459
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor.inner_bgcolor {display:block; overflow:hidden; width:15px; height:15px; margin:0 auto; text-indent:-9999px;}
|
|
16460
|
+
|
|
16461
|
+
.sun-editor .sun-editor-id-toolbar .layer_color {display: none;}
|
|
16462
|
+
.sun-editor .sun-editor-id-toolbar .layer_align {left:9px; width:98px;}
|
|
16463
|
+
|
|
16464
|
+
.sun-editor .sun-editor-id-toolbar .list_editor {overflow:hidden; width:100%; padding:6px 0;}
|
|
16465
|
+
.sun-editor .sun-editor-id-toolbar .list_editor li:first-child {padding-top:0;}
|
|
16466
|
+
.sun-editor .sun-editor-id-toolbar .list_editor li {padding-top:5px; width:100%;}
|
|
16467
|
+
.sun-editor .sun-editor-id-toolbar .font_size_list li {padding:0px; width:100%;}
|
|
16468
|
+
|
|
16469
|
+
.sun-editor .sun-editor-id-toolbar .btn_editor {overflow:hidden; float:left; width:32px; height:32px; border:1px solid #ccc; margin-left:2px; border-radius:2px; font-size:12px; line-height:27px; background-color:#FFF;}
|
|
16470
|
+
.sun-editor .sun-editor-id-toolbar .btn_editor.on {border-color:#f4b124; background-color:#ffebc1; -webkit-box-shadow: inset 0 3px 5px #f4b124; box-shadow: inset 0 3px 5px #f4b124;}
|
|
16471
|
+
.sun-editor .sun-editor-id-toolbar .btn_editor:hover, .sun-editor .sun-editor-id-toolbar .btn_editor:focus {background-color: #ffebc1; border-color: #f4b124; outline: 0 none;}
|
|
16472
|
+
|
|
16473
|
+
.sun-editor .sun-editor-id-toolbar .btn_edit {width:100%; height:28px; padding:0 14px; margin-left:0; font-size:12px; line-height:22px; text-indent:0; text-decoration:none; text-align:left;}
|
|
16474
|
+
.sun-editor .sun-editor-id-toolbar .btn_font {width:80px; text-align:left; text-indent:10px;}
|
|
16475
|
+
.sun-editor .sun-editor-id-toolbar .btn_size {width:75px; text-align:left; text-indent:7px;}
|
|
16476
|
+
.sun-editor .sun-editor-id-toolbar .btn_line {padding:0 5px 0 5px;}
|
|
16477
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor .list_color .btn_color.checked_color .bg_check {display:block;}
|
|
16478
|
+
.sun-editor .sun-editor-id-toolbar .layer_editor .list_color .btn_color.checked_color {border:1px solid #000;}
|
|
16479
|
+
|
|
16480
|
+
.sun-editor .sun-editor-id-toolbar .ico_more {position:absolute; top:14px; right:10px; width:7px; height:7px; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/br_down_icon&48.png') no-repeat; background-size:100%;}
|
|
16481
|
+
.sun-editor .sun-editor-id-toolbar .ico_bold {width:16px; height:16px; margin:0 auto; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/font_bold_icon&48.png') no-repeat; background-size:100%;}
|
|
16482
|
+
.sun-editor .sun-editor-id-toolbar .ico_underline {width:16px; height:16px; margin:0 auto; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/font_underline_icon&48.png') no-repeat; background-size:100%;}
|
|
16483
|
+
.sun-editor .sun-editor-id-toolbar .ico_italic {width:16px; height:16px; margin:0 auto; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/font_italic_icon&48.png') no-repeat; background-size:100%;}
|
|
16484
|
+
.sun-editor .sun-editor-id-toolbar .ico_strike {width:16px; height:16px; margin:0 auto; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/font_strokethrough_icon&48.png') no-repeat; background-size:100%;}
|
|
16485
|
+
.sun-editor .sun-editor-id-toolbar .ico_fcolor {width:16px; height:16px; margin:0 auto; margin-bottom: 5px; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/pencil_icon&48.png') no-repeat; background-size:100%;}
|
|
16486
|
+
.sun-editor .sun-editor-id-toolbar .color_font {overflow: hidden; position:absolute; top:24px; left:9px; width:19px; height:3px; text-indent:-9999px;}
|
|
16487
|
+
.sun-editor .sun-editor-id-toolbar .ico_fcolor_w {width:16px; height:16px; margin:0 auto; margin-bottom: 5px; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/fill_icon&48.png') no-repeat; background-size:100%;}
|
|
16488
|
+
.sun-editor .sun-editor-id-toolbar .ico_align_l {width:17px; height:17px; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/align_left_icon&48.png') no-repeat; background-size:100%;}
|
|
16489
|
+
.sun-editor .sun-editor-id-toolbar .ico_align_r {width:17px; height:17px; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/align_right_icon&48.png') no-repeat; background-size:100%;}
|
|
16490
|
+
.sun-editor .sun-editor-id-toolbar .ico_align_c {width:17px; height:17px; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/align_center_icon&48.png') no-repeat; background-size:100%;}
|
|
16491
|
+
.sun-editor .sun-editor-id-toolbar .ico_align_f {width:17px; height:17px; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/align_just_icon&48.png') no-repeat; background-size:100%;}
|
|
16492
|
+
.sun-editor .sun-editor-id-toolbar .ico_list {display: inline-block; width:17px; height:17px;}
|
|
16493
|
+
.sun-editor .sun-editor-id-toolbar .ico_list_num {display:block; margin:0 auto;background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/list_num_icon&48.png') no-repeat; background-size:100%;}
|
|
16494
|
+
.sun-editor .sun-editor-id-toolbar .ico_list_square {background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/list_bullets_icon&48.png') no-repeat; background-size:100%;}
|
|
16495
|
+
.sun-editor .sun-editor-id-toolbar .ico_indnet {width:17px; height:17px; margin: 0 auto; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/indent_increase_icon&48.png') no-repeat; background-size:100%;}
|
|
16496
|
+
.sun-editor .sun-editor-id-toolbar .ico_outdent {width:17px; height:17px; margin: 0 auto; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/indent_decrease_icon&48.png') no-repeat; background-size:100%;}
|
|
16497
|
+
.sun-editor .sun-editor-id-toolbar .ico_indent {background-position:-220px -160px;}
|
|
16498
|
+
.sun-editor .sun-editor-id-toolbar .ico_line {position:absolute; top:10px; left:9px; width:14px; height:13px; background-position:-190px 0;}
|
|
16499
|
+
.sun-editor .sun-editor-id-toolbar .ico_table {width:17px; height:17px; margin: 0 auto; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/3x3_grid_icon&48.png') no-repeat; background-size:100%;}
|
|
16500
|
+
.sun-editor .sun-editor-id-toolbar .ico_url {width:17px; height:17px; margin: 0 auto; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/link_icon&48.png') no-repeat; background-size:100%;}
|
|
16501
|
+
.sun-editor .sun-editor-id-toolbar .ico_picture {width:17px; height:17px; margin: 0 auto; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/picture_icon&48.png') no-repeat; background-size:100%;}
|
|
16502
|
+
.sun-editor .sun-editor-id-toolbar .ico_video {width:17px; height:17px; margin: 0 auto; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/movie_icon&48.png') no-repeat; background-size:100%;}
|
|
16503
|
+
.sun-editor .sun-editor-id-toolbar .ico_full_screen_e {width:17px; height:17px; margin: 0 auto; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/expand_icon&48.png') no-repeat; background-size:100%;}
|
|
16504
|
+
.sun-editor .sun-editor-id-toolbar .ico_full_screen_i {width:17px; height:17px; margin: 0 auto; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/import_icon&48.png') no-repeat; background-size:100%;}
|
|
16505
|
+
.sun-editor .sun-editor-id-toolbar .ico_html {width:17px; height:17px; margin: 0 auto; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/brackets_icon&48.png') no-repeat; background-size:100%;}
|
|
16506
|
+
|
|
16507
|
+
.sun-editor .sun-editor-id-toolbar .img_line1 {height:2px; background-position:0 -30px;}
|
|
16508
|
+
.sun-editor .sun-editor-id-toolbar .img_line2 {height:3px; background-position:0 -35px;}
|
|
16509
|
+
.sun-editor .sun-editor-id-toolbar .img_line3 {height:6px; background-position:0 -40px;}
|
|
16510
|
+
|
|
16511
|
+
.sun-editor .sun-editor-id-toolbar .editor_link {padding:8px 5px 12px 15px;}
|
|
16512
|
+
.sun-editor .sun-editor-id-toolbar .editor_link .write_place {height:79px; border:0; overflow:hidden; float:left; position:relative;}
|
|
16513
|
+
.sun-editor .sun-editor-id-toolbar .editor_link .write_place .lab_url {position:absolute;top:0;left:0;width:228px;height:23px;font-size:12px;line-height:24px;color:#999; cursor:text;}
|
|
16514
|
+
.sun-editor .sun-editor-id-toolbar .editor_link .write_place .inp_txt {height:23px; font-size:12px; font-family:Verdana; line-height:24px; text-indent:0px; margin-top:8px; border:1px solid #CCC}
|
|
16515
|
+
.sun-editor .sun-editor-id-toolbar .editor_link .btn_apply_url {float:right; width:35px; height:69px;}
|
|
16516
|
+
|
|
16517
|
+
.sun-editor .sun-editor-id-toolbar .layer_color .pallet_bgcolor {width:196px;}
|
|
16518
|
+
.sun-editor .sun-editor-id-toolbar .layer_color .list_bgcolor {width:100%; height:126px; padding:10px 6px 0 10px;}
|
|
16519
|
+
.sun-editor .sun-editor-id-toolbar .layer_color .list_bgcolor li {float:left; position:relative; width:16px; height:16px; margin:0 4px 4px 0;}
|
|
16520
|
+
.sun-editor .sun-editor-id-toolbar .layer_color .list_bgcolor button {display:block; overflow:hidden; width:16px; height:16px; border-radius:2px; vertical-align:top; text-indent:-9999px;}
|
|
16521
|
+
.sun-editor .sun-editor-id-toolbar .layer_color .list_bgcolor button.color_white {display:block; overflow:hidden; width:16px; height:16px; border:1px solid #d3d3d3; vertical-align:top; text-indent:-9999px;}
|
|
16522
|
+
.sun-editor .sun-editor-id-toolbar .layer_color .list_bgcolor .bg_btnframe {display:none; position:absolute; top:0; left:0; width:14px; height:14px; border:1px solid #000; border-radius:2px; opacity:.2; filter:alpha(opacity=20);}
|
|
16523
|
+
|
|
16524
|
+
.sun-editor .sun-editor-id-toolbar .layer_color .pallet_text {width:156px;}
|
|
16525
|
+
.sun-editor .sun-editor-id-toolbar .layer_color .pallet_text .ex_txtbgcolor {position:relative; z-index:1; width:158px; height:25px; border-radius:2px; border-bottom:0 none; margin: -1px 0 0 -1px;}
|
|
16526
|
+
.sun-editor .sun-editor-id-toolbar .layer_color .pallet_text .ex_txtbgcolor .emph_txtbgcolor {display:block; width:147px; height:25px; padding-left:11px; font-size:12px; line-height:24px; color:#fff; -webkit-transition-property:background-color,color; -webkit-transition-duration:.2s; transition-property:background-color,color; transition-duration:.2s;}
|
|
16527
|
+
.sun-editor .sun-editor-id-toolbar .layer_color .pallet_text .ex_txtbgcolor .bg_frame {position:absolute; top:0; left:0; width:156px; height:24px; border:1px solid #000; border-bottom:0 none; opacity:.1; filter:alpha(opacity=10); -webkit-transition:opacity .2s; -webkit-transition:opacity .2s;}
|
|
16528
|
+
.sun-editor .sun-editor-id-toolbar .layer_color .pallet_text .list_color {width:140px; height:44px; margin:8px 6px 0 10px; padding:0; border-top:0;}
|
|
16529
|
+
|
|
16530
|
+
/* ́—디터 ́˜́— */
|
|
16531
|
+
.sun-editor .sun-editor-id-editorArea {width:100%;}
|
|
16532
|
+
.sun-editor .sun-editor-id-editorArea .input_editor {width:100%; height:100%; background-color:#FFF;}
|
|
16533
|
+
.sun-editor .sun-editor-id-editorArea .input_editor.html {/*padding:8px;*/ outline-style:none;}
|
|
16534
|
+
|
|
16535
|
+
/* 리́‚¬́´́¦ˆ ë°” */
|
|
16536
|
+
.sun-editor .sun-editor-id-resizeBar {width:100%; height:10px; border-top:1px solid #dadada; background-color:#fafafa; cursor:ns-resize;}
|
|
16537
|
+
.sun-editor .sun-editor-id-resize-background {position:absolute; display:none; top:0; left:0; width:100%; height:100%; z-index:10000;}
|
|
16538
|
+
|
|
16539
|
+
/* 다́´́–¼ë¡œê·¸ */
|
|
16540
|
+
.sun-editor .sun-editor-id-dialogBox {position:absolute; display:none; top:0; left:0; width:100%; height:100%; z-index:9999;}
|
|
16541
|
+
.sun-editor .sun-editor-id-dialogBox label, .sun-editor .sun-editor-id-dialogBox input, .sun-editor .sun-editor-id-dialogBox button {font-size:14px; line-height:1.5; color:#111; margin:0;}
|
|
16542
|
+
.sun-editor .sun-editor-id-dialogBox .modal-dialog-background {position:absolute; width:100%; height:100%; top:0px; left:0px; background-color:#222; opacity:0.5; z-index:10;}
|
|
16543
|
+
|
|
16544
|
+
/* 다́´́–¼ë¡œê·¸ - modal */
|
|
16545
|
+
.sun-editor .modal-dialog {position:absolute; width:100%; height:100%; top:0px; left:0px; z-index:11;}
|
|
16546
|
+
.sun-editor .modal-dialog .modal-content {position:relative; width:500px; margin:8px auto; background-color:#fff; -webkit-background-clip:padding-box; background-clip:padding-box; border:1px solid #999; border:1px solid rgba(0, 0, 0, .2); border-radius:6px; outline:0; -webkit-box-shadow:0 3px 9px rgba(0, 0, 0, .5); box-shadow:0 3px 9px rgba(0, 0, 0, .5); z-index:11;}
|
|
16547
|
+
@media screen and (max-width: 509px) {.sun-editor .modal-dialog .modal-content {width:100%;} }
|
|
16548
|
+
.sun-editor .modal-dialog .modal-header {padding:15px 15px 5px 15px; border-bottom:1px solid #e5e5e5;}
|
|
16549
|
+
.sun-editor .modal-dialog button.close {-webkit-appearance:none; padding:0; cursor:pointer; background:transparent; border:0;}
|
|
16550
|
+
.sun-editor .modal-dialog .close {float:right; font-size:21px; font-weight:bold; line-height:1; color:#000; text-shadow:0 1px 0 #fff; filter:alpha(opacity=100); opacity: 1;}
|
|
16551
|
+
.sun-editor .modal-dialog .close:hover, .sun-editor .modal-dialog .close:focus {color:#f4b124 !important;}
|
|
16552
|
+
.sun-editor .modal-dialog .modal-body {position:relative; padding:15px;}
|
|
16553
|
+
.sun-editor .modal-dialog .form-group {margin-bottom:15px;}
|
|
16554
|
+
.sun-editor .modal-dialog .form-size .size-text {width:100%;}
|
|
16555
|
+
.sun-editor .modal-dialog .form-size .size-text .size-w {width:70px; text-align:center;}
|
|
16556
|
+
.sun-editor .modal-dialog .form-size .size-text .size-h {width:70px; text-align:center;}
|
|
16557
|
+
.sun-editor .modal-dialog .form-size .size-x {margin:0 8px 0 8px;}
|
|
16558
|
+
.sun-editor .modal-dialog .form-size-control {display:inline-block; width:70px; height:34px; /*padding:6px 12px;*/ font-size:14px; line-height:1.42857143; color:#555; background-color:#fff; background-image:none; border:1px solid #ccc; border-radius:4px; -webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075); -webkit-transition:border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; -o-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s; transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;}
|
|
16559
|
+
.sun-editor .modal-dialog .modal-content label {display:inline-block; max-width:100%; margin-bottom:5px; font-weight:bold;}
|
|
16560
|
+
.sun-editor .modal-dialog .form-control {display:block; width:100%; height:34px; /*padding:6px 12px;*/ font-size:14px; line-height:1.42857143; color:#555; background-color:#fff; background-image:none; border:1px solid #ccc; border-radius:4px; -webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075); -webkit-transition:border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; -o-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s; transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;}
|
|
16561
|
+
.sun-editor .modal-dialog .modal-footer {padding:10px 15px 0px 15px; text-align:right; border-top:1px solid #e5e5e5;}
|
|
16562
|
+
.sun-editor .modal-dialog .btn-primary {color:#fff; background-color:#f4b124; border-color:#f4b124;}
|
|
16563
|
+
.sun-editor .modal-dialog .modal-content .btn {display:inline-block; padding:6px 12px; margin-bottom:0; font-size:14px; font-weight:normal; line-height:1.42857143; text-align:center; white-space:nowrap; vertical-align:middle; -ms-touch-action:manipulation; touch-action:manipulation; cursor:pointer; -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none; background-image:none; border:1px solid transparent; border-radius:4px;}
|
|
16564
|
+
.sun-editor .modal-dialog .modal-content .btn:hover, .sun-editor .modal-dialog .modal-content .btn:focus {background-color: #f4a500;}
|
|
16565
|
+
.sun-editor .modal-dialog .modal-content input:focus {border-color:#f4b124; outline:0; -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(244, 177, 36, .6); box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(244, 177, 36, .6);}
|
|
16566
|
+
|
|
16567
|
+
/* 로딩 ë°•́¤ */
|
|
16568
|
+
.sun-editor .sun-editor-id-loding {position:absolute; display:none; width:100%; height:100%; top:0px; left:0px; background-color:#191f26; background-image:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/loding.jpg'); background-repeat:no-repeat; background-position:center; background-size:auto auto; opacity:.7; filter:alpha(opacity=70); z-index:9999;}
|
|
16569
|
+
.sun-editor .sun-editor-id-loding .ico-loding {display:none;}
|
|
16570
|
+
|
|
16571
|
+
/* í…Œ́´ë¸” ́„ íƒ */
|
|
16572
|
+
.sun-editor .table-content {position:absolute; top:34px; left:1px; z-index:11; padding:5px; float:left; padding:5px 0; margin:2px 0 0; font-size:14px; text-align:left; list-style:none; background-color:#fff; -webkit-background-clip:padding-box; background-clip:padding-box; border:1px solid #ccc; border:1px solid rgba(0, 0, 0, .15); border-radius:4px; -webkit-box-shadow:0 6px 12px rgba(0, 0, 0, .175); box-shadow:0 6px 12px rgba(0, 0, 0, .175);}
|
|
16573
|
+
.sun-editor .table-data-form {font-size:18px; padding:0 5px;}
|
|
16574
|
+
.sun-editor .table-picker {position:absolute!important; z-index:3; font-size:18px; width:10em; height:10em; cursor:pointer;}
|
|
16575
|
+
.sun-editor .table-highlighted {position:absolute!important; z-index:2; font-size:18px; width:1em; height:1em; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/pixel_sun.png') repeat;}
|
|
16576
|
+
.sun-editor .table-unhighlighted {position:relative!important; z-index:1; font-size:18px; width:5em; height:5em; background:url('https://www.cssscript.com/demo/minimal-wysiwyg-editor-pure-javascript-suneditor/suneditor/img/pixel_white.png') repeat;}
|
|
16577
|
+
.sun-editor .table-display {padding-left:5px;}
|
|
16578
|
+
|
|
16579
|
+
/* ́´ë¯¸́§€ í¬ê¸° ́¡°́ ˆ */
|
|
16580
|
+
.sun-editor .modal-image-resize {position:absolute; display:none; background-color:black; opacity:0.3; z-index:8;}
|
|
16581
|
+
.sun-editor .modal-image-resize .image-resize-dot {position:absolute; width:7px; height:7px; border:1px solid black;}
|
|
16582
|
+
.sun-editor .modal-image-resize .tl {top:-5px; left:-5px; border-right:0; border-bottom:0;}
|
|
16583
|
+
.sun-editor .modal-image-resize .tr {top:-5px; right:-5px; border-bottom:0; border-left:none;}
|
|
16584
|
+
.sun-editor .modal-image-resize .bl {bottom:-5px; left:-5px; border-top:0; border-right:0;}
|
|
16585
|
+
.sun-editor .modal-image-resize .br-controller {right:-5px; bottom:-5px; background-color:#F00; cursor:se-resize;}
|
|
16586
|
+
.sun-editor .modal-image-resize .image-size-display {position:absolute; right:0; bottom:0; padding:5px; margin:5px; font-size:12px; color:white; background-color:black; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; -webkit-opacity:.7; -khtml-opacity:.7; -moz-opacity:.7; opacity:.7;}
|
|
16587
|
+
|
|
16588
|
+
/* ́´ë¯¸́§€ í¬ê¸° ́¡°́ ˆ ë²„í¼ */
|
|
16589
|
+
.sun-editor .image-resize-btn {position:absolute; display:none; top:0; left:0; margin-top:-50px !important; z-index:12; display:none; max-width:310px; padding:1px; font-family:"Helvetica Neue", Helvetica, Arial, sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:1.42857143; text-align:left; text-align:start; text-decoration:none; text-shadow:none; text-transform:none; letter-spacing:normal; word-break:normal; word-spacing:normal; word-wrap:normal; white-space:normal; background-color:#fff; -webkit-background-clip:padding-box; background-clip:padding-box; border:1px solid #ccc; border:1px solid rgba(0, 0, 0, .2); border-radius:6px; -webkit-box-shadow:0 5px 10px rgba(0, 0, 0, .2); box-shadow:0 5px 10px rgba(0, 0, 0, .2); line-break:auto;}
|
|
16590
|
+
.sun-editor .image-resize-btn .btn-group {position:relative; display:inline-block; vertical-align:middle; padding:5px 5px 5px 0;}
|
|
16591
|
+
.sun-editor .image-resize-btn .btn-group button {position:relative; float:left; border-top-right-radius:0; border-bottom-right-radius:0; margin:0 0 0 2px !important; padding:5px 10px !important; font-size:12px !important; line-height:1.5 !important; border:1px solid #222 !important; border-radius:3px !important; color:#333; background-color:#fff !important; border-color:#ccc !important; display:inline-block; font-size:14px !important; font-weight:normal; text-align:center; white-space:nowrap; vertical-align:middle; -ms-touch-action:manipulation; touch-action:manipulation; -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none;}
|
|
16592
|
+
/*.sun-editor .image-resize-btn .btn-group.remove {width:40px; height:33px; padding:0 10px 0 0 !important;}*/
|
|
16593
|
+
.sun-editor .image-resize-btn .btn-group.remove button {width:100%; height:100%;}
|
|
16594
|
+
.sun-editor .image-resize-btn .btn-group.remove button .image_remove {font-weight:bold;}
|
|
16595
|
+
.sun-editor .image-resize-btn button:hover, .sun-editor .image-resize-btn button:focus {background-color:#ffebc1 !important; border-color:#f4b124 !important; outline:0 none !important;}
|
|
16596
|
+
`;
|
|
16597
|
+
|
|
16598
|
+
const DEFAULT_CONFIG = {
|
|
16599
|
+
height: '400px',
|
|
16600
|
+
showFont: true,
|
|
16601
|
+
showFormats: true,
|
|
16602
|
+
showBold: true,
|
|
16603
|
+
showUnderline: true,
|
|
16604
|
+
showItalic: true,
|
|
16605
|
+
showStrike: true,
|
|
16606
|
+
showFontColor: true,
|
|
16607
|
+
showHiliteColor: true,
|
|
16608
|
+
showInOutDent: true,
|
|
16609
|
+
showAlign: true,
|
|
16610
|
+
showList: true,
|
|
16611
|
+
showLine: true,
|
|
16612
|
+
showTable: true,
|
|
16613
|
+
showLink: true,
|
|
16614
|
+
showImage: true,
|
|
16615
|
+
showVideo: true,
|
|
16616
|
+
showFullScreen: true,
|
|
16617
|
+
showCodeView: true,
|
|
16618
|
+
videoX: 560,
|
|
16619
|
+
videoY: 315,
|
|
16620
|
+
imageSize: '350px',
|
|
16621
|
+
};
|
|
16622
|
+
|
|
16623
|
+
class MatchaTextEditorComponent {
|
|
16624
|
+
set value(v) { this.writeValue(v); }
|
|
16625
|
+
get disabledAttr() {
|
|
16626
|
+
return this._disabled ? '' : null;
|
|
16627
|
+
}
|
|
16628
|
+
constructor(_ngZone) {
|
|
16629
|
+
this._ngZone = _ngZone;
|
|
16630
|
+
this.editorId = `matcha-text-editor-${Math.random().toString(36).substr(2, 9)}`;
|
|
16631
|
+
this.config = { ...DEFAULT_CONFIG };
|
|
16632
|
+
this.contentChange = new EventEmitter();
|
|
16633
|
+
this._editor = null;
|
|
16634
|
+
this._pendingValue = '';
|
|
16635
|
+
this._isSettingValue = false;
|
|
16636
|
+
this._disabled = false;
|
|
16637
|
+
this._observer = null;
|
|
16638
|
+
this._onChange = () => { };
|
|
16639
|
+
this._onTouched = () => { };
|
|
16640
|
+
}
|
|
16641
|
+
ngAfterViewInit() {
|
|
16642
|
+
this._ngZone.runOutsideAngular(() => {
|
|
16643
|
+
this._injectSunEditor();
|
|
16644
|
+
this._initEditor();
|
|
16645
|
+
});
|
|
16646
|
+
}
|
|
16647
|
+
ngOnDestroy() {
|
|
16648
|
+
this._observer?.disconnect();
|
|
16649
|
+
}
|
|
16650
|
+
// ControlValueAccessor
|
|
16651
|
+
writeValue(value) {
|
|
16652
|
+
const v = value || '';
|
|
16653
|
+
this._isSettingValue = true;
|
|
16654
|
+
if (this._editor) {
|
|
16655
|
+
this._editor.setContent(v);
|
|
16656
|
+
}
|
|
16657
|
+
else {
|
|
16658
|
+
this._pendingValue = v;
|
|
16659
|
+
}
|
|
16660
|
+
setTimeout(() => { this._isSettingValue = false; }, 0);
|
|
16661
|
+
}
|
|
16662
|
+
registerOnChange(fn) {
|
|
16663
|
+
this._onChange = fn;
|
|
16664
|
+
}
|
|
16665
|
+
registerOnTouched(fn) {
|
|
16666
|
+
this._onTouched = fn;
|
|
16667
|
+
}
|
|
16668
|
+
setDisabledState(isDisabled) {
|
|
16669
|
+
this._disabled = isDisabled;
|
|
16670
|
+
if (this._editor) {
|
|
16671
|
+
isDisabled ? this._editor.disabled() : this._editor.enabled();
|
|
16672
|
+
}
|
|
16673
|
+
}
|
|
16674
|
+
// Private
|
|
16675
|
+
_injectSunEditor() {
|
|
16676
|
+
if (!document.getElementById('suneditor-style')) {
|
|
16677
|
+
const style = document.createElement('style');
|
|
16678
|
+
style.id = 'suneditor-style';
|
|
16679
|
+
style.textContent = SUNEDITOR_CSS;
|
|
16680
|
+
document.head.appendChild(style);
|
|
16681
|
+
}
|
|
16682
|
+
if (!document.getElementById('suneditor-script')) {
|
|
16683
|
+
const script = document.createElement('script');
|
|
16684
|
+
script.id = 'suneditor-script';
|
|
16685
|
+
script.textContent = SUNEDITOR_JS;
|
|
16686
|
+
document.head.appendChild(script);
|
|
16687
|
+
}
|
|
16688
|
+
}
|
|
16689
|
+
_initEditor() {
|
|
16690
|
+
const SUNEDITOR = window.SUNEDITOR;
|
|
16691
|
+
if (!SUNEDITOR)
|
|
16692
|
+
return;
|
|
16693
|
+
const mergedConfig = { ...DEFAULT_CONFIG, ...this.config };
|
|
16694
|
+
this._editor = SUNEDITOR.create(this.editorId, mergedConfig);
|
|
16695
|
+
if (this._pendingValue) {
|
|
16696
|
+
this._editor.setContent(this._pendingValue);
|
|
16697
|
+
this._pendingValue = '';
|
|
16698
|
+
}
|
|
16699
|
+
if (this._disabled) {
|
|
16700
|
+
this._editor.disabled();
|
|
16701
|
+
}
|
|
16702
|
+
setTimeout(() => this._attachObserver(), 100);
|
|
16703
|
+
}
|
|
16704
|
+
_attachObserver() {
|
|
16705
|
+
const container = document.getElementById(this.editorId)?.parentElement;
|
|
16706
|
+
const iframe = container?.querySelector('iframe.input_editor');
|
|
16707
|
+
const iframeBody = iframe?.contentWindow?.document?.body;
|
|
16708
|
+
if (!iframeBody)
|
|
16709
|
+
return;
|
|
16710
|
+
this._observer = new MutationObserver(() => {
|
|
16711
|
+
if (this._isSettingValue)
|
|
16712
|
+
return;
|
|
16713
|
+
this._ngZone.run(() => {
|
|
16714
|
+
const content = this._editor.getContent();
|
|
16715
|
+
this._onChange(content);
|
|
16716
|
+
this.contentChange.emit(content);
|
|
16717
|
+
});
|
|
16718
|
+
});
|
|
16719
|
+
this._observer.observe(iframeBody, {
|
|
16720
|
+
childList: true,
|
|
16721
|
+
subtree: true,
|
|
16722
|
+
characterData: true,
|
|
16723
|
+
});
|
|
16724
|
+
iframeBody.addEventListener('blur', () => {
|
|
16725
|
+
this._ngZone.run(() => this._onTouched());
|
|
16726
|
+
});
|
|
16727
|
+
}
|
|
16728
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTextEditorComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16729
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaTextEditorComponent, isStandalone: false, selector: "matcha-text-editor", inputs: { value: "value", config: "config" }, outputs: { contentChange: "contentChange" }, host: { properties: { "attr.disabled": "this.disabledAttr" } }, providers: [
|
|
16730
|
+
{
|
|
16731
|
+
provide: NG_VALUE_ACCESSOR,
|
|
16732
|
+
useExisting: forwardRef(() => MatchaTextEditorComponent),
|
|
16733
|
+
multi: true,
|
|
16734
|
+
},
|
|
16735
|
+
], ngImport: i0, template: "<textarea [id]=\"editorId\" style=\"width:100%;\"></textarea>\n", styles: [""] }); }
|
|
16736
|
+
}
|
|
16737
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTextEditorComponent, decorators: [{
|
|
16738
|
+
type: Component,
|
|
16739
|
+
args: [{ selector: 'matcha-text-editor', standalone: false, providers: [
|
|
16740
|
+
{
|
|
16741
|
+
provide: NG_VALUE_ACCESSOR,
|
|
16742
|
+
useExisting: forwardRef(() => MatchaTextEditorComponent),
|
|
16743
|
+
multi: true,
|
|
16744
|
+
},
|
|
16745
|
+
], template: "<textarea [id]=\"editorId\" style=\"width:100%;\"></textarea>\n" }]
|
|
16746
|
+
}], ctorParameters: () => [{ type: i0.NgZone }], propDecorators: { value: [{
|
|
16747
|
+
type: Input
|
|
16748
|
+
}], config: [{
|
|
16749
|
+
type: Input
|
|
16750
|
+
}], contentChange: [{
|
|
16751
|
+
type: Output
|
|
16752
|
+
}], disabledAttr: [{
|
|
16753
|
+
type: HostBinding,
|
|
16754
|
+
args: ['attr.disabled']
|
|
16755
|
+
}] } });
|
|
16756
|
+
|
|
16757
|
+
class MatchaTextEditorModule {
|
|
16758
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTextEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
16759
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: MatchaTextEditorModule, declarations: [MatchaTextEditorComponent], imports: [CommonModule, ReactiveFormsModule], exports: [MatchaTextEditorComponent] }); }
|
|
16760
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTextEditorModule, imports: [CommonModule, ReactiveFormsModule] }); }
|
|
16761
|
+
}
|
|
16762
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTextEditorModule, decorators: [{
|
|
16763
|
+
type: NgModule,
|
|
16764
|
+
args: [{
|
|
16765
|
+
declarations: [MatchaTextEditorComponent],
|
|
16766
|
+
imports: [CommonModule, ReactiveFormsModule],
|
|
16767
|
+
exports: [MatchaTextEditorComponent],
|
|
16768
|
+
}]
|
|
16769
|
+
}] });
|
|
16770
|
+
|
|
14546
16771
|
class MatchaComponentsModule {
|
|
14547
16772
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
14548
16773
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: MatchaComponentsModule, declarations: [MatchaOverflowDraggableComponent], imports: [CommonModule,
|
|
@@ -14591,7 +16816,8 @@ class MatchaComponentsModule {
|
|
|
14591
16816
|
MatchaChipModule,
|
|
14592
16817
|
MatchaMenuModule,
|
|
14593
16818
|
MatchaListModule,
|
|
14594
|
-
MatchaSnackBarModule
|
|
16819
|
+
MatchaSnackBarModule,
|
|
16820
|
+
MatchaTextEditorModule], exports: [MatchaAccordionModule,
|
|
14595
16821
|
MatchaAutocompleteModule,
|
|
14596
16822
|
MatchaOptionModule,
|
|
14597
16823
|
MatchaPanelModule,
|
|
@@ -14635,7 +16861,8 @@ class MatchaComponentsModule {
|
|
|
14635
16861
|
MatchaChipModule,
|
|
14636
16862
|
MatchaMenuModule,
|
|
14637
16863
|
MatchaListModule,
|
|
14638
|
-
MatchaSnackBarModule
|
|
16864
|
+
MatchaSnackBarModule,
|
|
16865
|
+
MatchaTextEditorModule] }); }
|
|
14639
16866
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaComponentsModule, imports: [CommonModule,
|
|
14640
16867
|
FormsModule,
|
|
14641
16868
|
ReactiveFormsModule,
|
|
@@ -14682,7 +16909,8 @@ class MatchaComponentsModule {
|
|
|
14682
16909
|
MatchaChipModule,
|
|
14683
16910
|
MatchaMenuModule,
|
|
14684
16911
|
MatchaListModule,
|
|
14685
|
-
MatchaSnackBarModule,
|
|
16912
|
+
MatchaSnackBarModule,
|
|
16913
|
+
MatchaTextEditorModule, MatchaAccordionModule,
|
|
14686
16914
|
MatchaAutocompleteModule,
|
|
14687
16915
|
MatchaOptionModule,
|
|
14688
16916
|
MatchaPanelModule,
|
|
@@ -14726,7 +16954,8 @@ class MatchaComponentsModule {
|
|
|
14726
16954
|
MatchaChipModule,
|
|
14727
16955
|
MatchaMenuModule,
|
|
14728
16956
|
MatchaListModule,
|
|
14729
|
-
MatchaSnackBarModule
|
|
16957
|
+
MatchaSnackBarModule,
|
|
16958
|
+
MatchaTextEditorModule] }); }
|
|
14730
16959
|
}
|
|
14731
16960
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaComponentsModule, decorators: [{
|
|
14732
16961
|
type: NgModule,
|
|
@@ -14779,7 +17008,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
14779
17008
|
MatchaChipModule,
|
|
14780
17009
|
MatchaMenuModule,
|
|
14781
17010
|
MatchaListModule,
|
|
14782
|
-
MatchaSnackBarModule
|
|
17011
|
+
MatchaSnackBarModule,
|
|
17012
|
+
MatchaTextEditorModule
|
|
14783
17013
|
],
|
|
14784
17014
|
exports: [MatchaAccordionModule,
|
|
14785
17015
|
MatchaAutocompleteModule,
|
|
@@ -14825,7 +17055,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
14825
17055
|
MatchaChipModule,
|
|
14826
17056
|
MatchaMenuModule,
|
|
14827
17057
|
MatchaListModule,
|
|
14828
|
-
MatchaSnackBarModule
|
|
17058
|
+
MatchaSnackBarModule,
|
|
17059
|
+
MatchaTextEditorModule
|
|
14829
17060
|
],
|
|
14830
17061
|
}]
|
|
14831
17062
|
}] });
|
|
@@ -15439,5 +17670,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
15439
17670
|
* Generated bundle index. Do not edit.
|
|
15440
17671
|
*/
|
|
15441
17672
|
|
|
15442
|
-
export { CopyButtonComponent, INITIAL_CONFIG, MATCHA_MASK_CONFIG, MATCHA_OPTION_PARENT, MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteModule, MatchaAutocompleteTriggerDirective, MatchaAvatarComponent, MatchaAvatarModule, MatchaBreakpointObservableModule, MatchaBreakpointObserver, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipComponent, MatchaChipListComponent, MatchaChipModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDateRangeComponent, MatchaDateRangeModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDrawerComponent, MatchaDrawerContainerComponent, MatchaDrawerContentComponent, MatchaDrawerModule, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHighlightComponent, MatchaHighlightModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputPhoneComponent, MatchaInputPhoneModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaListComponent, MatchaListItemComponent, MatchaListModule, MatchaMaskApplierService, MatchaMaskCompatibleDirective, MatchaMaskModule, MatchaMaskPipe, MatchaMaskService, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuItemDirective, MatchaMenuModule, MatchaMenuTriggerDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaMsgBoxActionsComponent, MatchaMsgBoxComponent, MatchaMsgBoxModule, MatchaOptionComponent, MatchaOptionModule, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorComponent, MatchaPaginatorIntl, MatchaPaginatorModule, MatchaPanelComponent, MatchaPanelModule, MatchaProgressBarComponent, MatchaProgressBarModule, MatchaRadioComponent, MatchaRadioGroupComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectComponent, MatchaSelectModule, MatchaSelectTriggerDirective, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderComponent, MatchaSliderModule, MatchaSnackBarComponent, MatchaSnackBarModule, MatchaSnackBarService, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaSubmenuTriggerDirective, MatchaTabItemComponent, MatchaTableComponent, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTimeComponent, MatchaTimeModule, MatchaTimeRangeComponent, MatchaTimeRangeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NEW_CONFIG, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective, compatibleOptions, initialConfig, timeMasks, withoutValidation };
|
|
17673
|
+
export { CopyButtonComponent, DEFAULT_CONFIG, INITIAL_CONFIG, MATCHA_MASK_CONFIG, MATCHA_OPTION_PARENT, MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteModule, MatchaAutocompleteTriggerDirective, MatchaAvatarComponent, MatchaAvatarModule, MatchaBreakpointObservableModule, MatchaBreakpointObserver, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipComponent, MatchaChipListComponent, MatchaChipModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDateRangeComponent, MatchaDateRangeModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDrawerComponent, MatchaDrawerContainerComponent, MatchaDrawerContentComponent, MatchaDrawerModule, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHighlightComponent, MatchaHighlightModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputPhoneComponent, MatchaInputPhoneModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaListComponent, MatchaListItemComponent, MatchaListModule, MatchaMaskApplierService, MatchaMaskCompatibleDirective, MatchaMaskModule, MatchaMaskPipe, MatchaMaskService, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuItemDirective, MatchaMenuModule, MatchaMenuTriggerDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaMsgBoxActionsComponent, MatchaMsgBoxComponent, MatchaMsgBoxModule, MatchaOptionComponent, MatchaOptionModule, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorComponent, MatchaPaginatorIntl, MatchaPaginatorModule, MatchaPanelComponent, MatchaPanelModule, MatchaProgressBarComponent, MatchaProgressBarModule, MatchaRadioComponent, MatchaRadioGroupComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectComponent, MatchaSelectModule, MatchaSelectTriggerDirective, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderComponent, MatchaSliderModule, MatchaSnackBarComponent, MatchaSnackBarModule, MatchaSnackBarService, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaSubmenuTriggerDirective, MatchaTabItemComponent, MatchaTableComponent, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTextEditorComponent, MatchaTextEditorModule, MatchaTimeComponent, MatchaTimeModule, MatchaTimeRangeComponent, MatchaTimeRangeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NEW_CONFIG, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective, compatibleOptions, initialConfig, timeMasks, withoutValidation };
|
|
15443
17674
|
//# sourceMappingURL=matcha-components.mjs.map
|