@lingxiteam/lcdp-ueditor-react 1.0.0-alpha.1
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/es/LcdpUeditor.d.ts +74 -0
- package/es/LcdpUeditor.js +335 -0
- package/es/const.d.ts +12 -0
- package/es/const.js +19 -0
- package/es/defaultConfig.json +77 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +3 -0
- package/es/tools/UeditorResourceLoader.d.ts +21 -0
- package/es/tools/UeditorResourceLoader.js +114 -0
- package/es/tools/loadScript.d.ts +5 -0
- package/es/tools/loadScript.js +54 -0
- package/es/type.d.ts +142 -0
- package/es/type.js +1 -0
- package/package.json +32 -0
- package/ueditor-resource/dialogs/anchor/anchor.html +62 -0
- package/ueditor-resource/dialogs/attachment/attachment.css +716 -0
- package/ueditor-resource/dialogs/attachment/attachment.html +61 -0
- package/ueditor-resource/dialogs/attachment/attachment.js +803 -0
- package/ueditor-resource/dialogs/attachment/images/alignicon.gif +0 -0
- package/ueditor-resource/dialogs/attachment/images/alignicon.png +0 -0
- package/ueditor-resource/dialogs/attachment/images/bg.png +0 -0
- package/ueditor-resource/dialogs/attachment/images/file-icons.gif +0 -0
- package/ueditor-resource/dialogs/attachment/images/file-icons.png +0 -0
- package/ueditor-resource/dialogs/attachment/images/icons.gif +0 -0
- package/ueditor-resource/dialogs/attachment/images/icons.png +0 -0
- package/ueditor-resource/dialogs/attachment/images/image.png +0 -0
- package/ueditor-resource/dialogs/attachment/images/progress.png +0 -0
- package/ueditor-resource/dialogs/attachment/images/success.gif +0 -0
- package/ueditor-resource/dialogs/attachment/images/success.png +0 -0
- package/ueditor-resource/dialogs/audio/audio.css +879 -0
- package/ueditor-resource/dialogs/audio/audio.html +94 -0
- package/ueditor-resource/dialogs/audio/audio.js +815 -0
- package/ueditor-resource/dialogs/audio/icon/center-active.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/center.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/img.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/left-active.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/left.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/none-active.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/none.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/right-active.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/right.png +0 -0
- package/ueditor-resource/dialogs/audio/images/bg.png +0 -0
- package/ueditor-resource/dialogs/audio/images/center_focus.jpg +0 -0
- package/ueditor-resource/dialogs/audio/images/file-icons.gif +0 -0
- package/ueditor-resource/dialogs/audio/images/file-icons.png +0 -0
- package/ueditor-resource/dialogs/audio/images/icons.gif +0 -0
- package/ueditor-resource/dialogs/audio/images/icons.png +0 -0
- package/ueditor-resource/dialogs/audio/images/image.png +0 -0
- package/ueditor-resource/dialogs/audio/images/left_focus.jpg +0 -0
- package/ueditor-resource/dialogs/audio/images/none_focus.jpg +0 -0
- package/ueditor-resource/dialogs/audio/images/progress.png +0 -0
- package/ueditor-resource/dialogs/audio/images/right_focus.jpg +0 -0
- package/ueditor-resource/dialogs/audio/images/success.gif +0 -0
- package/ueditor-resource/dialogs/audio/images/success.png +0 -0
- package/ueditor-resource/dialogs/background/background.css +193 -0
- package/ueditor-resource/dialogs/background/background.html +59 -0
- package/ueditor-resource/dialogs/background/background.js +370 -0
- package/ueditor-resource/dialogs/background/images/bg.png +0 -0
- package/ueditor-resource/dialogs/background/images/success.png +0 -0
- package/ueditor-resource/dialogs/contentimport/contentimport.html +176 -0
- package/ueditor-resource/dialogs/contentimport/contentimport.js +91 -0
- package/ueditor-resource/dialogs/emotion/emotion.css +129 -0
- package/ueditor-resource/dialogs/emotion/emotion.html +70 -0
- package/ueditor-resource/dialogs/emotion/emotion.js +186 -0
- package/ueditor-resource/dialogs/emotion/images/0.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/bface.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/cface.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/fface.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/jxface2.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/neweditor-tab-bg.png +0 -0
- package/ueditor-resource/dialogs/emotion/images/tface.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/wface.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/yface.gif +0 -0
- package/ueditor-resource/dialogs/formula/formula.html +98 -0
- package/ueditor-resource/dialogs/formula/formula.js +147 -0
- package/ueditor-resource/dialogs/help/help.css +37 -0
- package/ueditor-resource/dialogs/help/help.html +82 -0
- package/ueditor-resource/dialogs/help/help.js +57 -0
- package/ueditor-resource/dialogs/image/icon/center-active.png +0 -0
- package/ueditor-resource/dialogs/image/icon/center.png +0 -0
- package/ueditor-resource/dialogs/image/icon/img.png +0 -0
- package/ueditor-resource/dialogs/image/icon/left-active.png +0 -0
- package/ueditor-resource/dialogs/image/icon/left.png +0 -0
- package/ueditor-resource/dialogs/image/icon/none-active.png +0 -0
- package/ueditor-resource/dialogs/image/icon/none.png +0 -0
- package/ueditor-resource/dialogs/image/icon/right-active.png +0 -0
- package/ueditor-resource/dialogs/image/icon/right.png +0 -0
- package/ueditor-resource/dialogs/image/image.css +768 -0
- package/ueditor-resource/dialogs/image/image.html +145 -0
- package/ueditor-resource/dialogs/image/image.js +1060 -0
- package/ueditor-resource/dialogs/image/images/alignicon.jpg +0 -0
- package/ueditor-resource/dialogs/image/images/bg.png +0 -0
- package/ueditor-resource/dialogs/image/images/icons.gif +0 -0
- package/ueditor-resource/dialogs/image/images/icons.png +0 -0
- package/ueditor-resource/dialogs/image/images/image.png +0 -0
- package/ueditor-resource/dialogs/image/images/progress.png +0 -0
- package/ueditor-resource/dialogs/image/images/success.gif +0 -0
- package/ueditor-resource/dialogs/image/images/success.png +0 -0
- package/ueditor-resource/dialogs/insertframe/insertframe.html +135 -0
- package/ueditor-resource/dialogs/internal.js +81 -0
- package/ueditor-resource/dialogs/link/link.html +148 -0
- package/ueditor-resource/dialogs/preview/preview.html +45 -0
- package/ueditor-resource/dialogs/scrawl/images/addimg.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/brush.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/delimg.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/delimgH.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/empty.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/emptyH.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/eraser.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/redo.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/redoH.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/scale.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/scaleH.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/size.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/undo.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/undoH.png +0 -0
- package/ueditor-resource/dialogs/scrawl/scrawl.css +324 -0
- package/ueditor-resource/dialogs/scrawl/scrawl.html +95 -0
- package/ueditor-resource/dialogs/scrawl/scrawl.js +682 -0
- package/ueditor-resource/dialogs/searchreplace/searchreplace.html +144 -0
- package/ueditor-resource/dialogs/searchreplace/searchreplace.js +174 -0
- package/ueditor-resource/dialogs/spechars/spechars.html +42 -0
- package/ueditor-resource/dialogs/spechars/spechars.js +86 -0
- package/ueditor-resource/dialogs/table/dragicon.png +0 -0
- package/ueditor-resource/dialogs/table/edittable.css +85 -0
- package/ueditor-resource/dialogs/table/edittable.html +69 -0
- package/ueditor-resource/dialogs/table/edittable.js +241 -0
- package/ueditor-resource/dialogs/table/edittd.html +62 -0
- package/ueditor-resource/dialogs/table/edittip.html +33 -0
- package/ueditor-resource/dialogs/template/config.js +42 -0
- package/ueditor-resource/dialogs/template/images/bg.gif +0 -0
- package/ueditor-resource/dialogs/template/images/pre0.png +0 -0
- package/ueditor-resource/dialogs/template/images/pre1.png +0 -0
- package/ueditor-resource/dialogs/template/images/pre2.png +0 -0
- package/ueditor-resource/dialogs/template/images/pre3.png +0 -0
- package/ueditor-resource/dialogs/template/images/pre4.png +0 -0
- package/ueditor-resource/dialogs/template/template.css +99 -0
- package/ueditor-resource/dialogs/template/template.html +26 -0
- package/ueditor-resource/dialogs/template/template.js +53 -0
- package/ueditor-resource/dialogs/video/icon/center-active.png +0 -0
- package/ueditor-resource/dialogs/video/icon/center.png +0 -0
- package/ueditor-resource/dialogs/video/icon/img.png +0 -0
- package/ueditor-resource/dialogs/video/icon/left-active.png +0 -0
- package/ueditor-resource/dialogs/video/icon/left.png +0 -0
- package/ueditor-resource/dialogs/video/icon/none-active.png +0 -0
- package/ueditor-resource/dialogs/video/icon/none.png +0 -0
- package/ueditor-resource/dialogs/video/icon/right-active.png +0 -0
- package/ueditor-resource/dialogs/video/icon/right.png +0 -0
- package/ueditor-resource/dialogs/video/images/bg.png +0 -0
- package/ueditor-resource/dialogs/video/images/center_focus.jpg +0 -0
- package/ueditor-resource/dialogs/video/images/file-icons.gif +0 -0
- package/ueditor-resource/dialogs/video/images/file-icons.png +0 -0
- package/ueditor-resource/dialogs/video/images/icons.gif +0 -0
- package/ueditor-resource/dialogs/video/images/icons.png +0 -0
- package/ueditor-resource/dialogs/video/images/image.png +0 -0
- package/ueditor-resource/dialogs/video/images/left_focus.jpg +0 -0
- package/ueditor-resource/dialogs/video/images/none_focus.jpg +0 -0
- package/ueditor-resource/dialogs/video/images/progress.png +0 -0
- package/ueditor-resource/dialogs/video/images/right_focus.jpg +0 -0
- package/ueditor-resource/dialogs/video/images/success.gif +0 -0
- package/ueditor-resource/dialogs/video/images/success.png +0 -0
- package/ueditor-resource/dialogs/video/video.css +909 -0
- package/ueditor-resource/dialogs/video/video.html +115 -0
- package/ueditor-resource/dialogs/video/video.js +867 -0
- package/ueditor-resource/dialogs/wordimage/wordimage.html +221 -0
- package/ueditor-resource/dialogs/wordimage/wordimage.js +93 -0
- package/ueditor-resource/index.html +146 -0
- package/ueditor-resource/lang/en/en.js +686 -0
- package/ueditor-resource/lang/en/images/addimage.png +0 -0
- package/ueditor-resource/lang/en/images/alldeletebtnhoverskin.png +0 -0
- package/ueditor-resource/lang/en/images/alldeletebtnupskin.png +0 -0
- package/ueditor-resource/lang/en/images/background.png +0 -0
- package/ueditor-resource/lang/en/images/button.png +0 -0
- package/ueditor-resource/lang/en/images/copy.png +0 -0
- package/ueditor-resource/lang/en/images/deletedisable.png +0 -0
- package/ueditor-resource/lang/en/images/deleteenable.png +0 -0
- package/ueditor-resource/lang/en/images/listbackground.png +0 -0
- package/ueditor-resource/lang/en/images/localimage.png +0 -0
- package/ueditor-resource/lang/en/images/music.png +0 -0
- package/ueditor-resource/lang/en/images/rotateleftdisable.png +0 -0
- package/ueditor-resource/lang/en/images/rotateleftenable.png +0 -0
- package/ueditor-resource/lang/en/images/rotaterightdisable.png +0 -0
- package/ueditor-resource/lang/en/images/rotaterightenable.png +0 -0
- package/ueditor-resource/lang/en/images/upload.png +0 -0
- package/ueditor-resource/lang/zh-cn/images/copy.png +0 -0
- package/ueditor-resource/lang/zh-cn/images/localimage.png +0 -0
- package/ueditor-resource/lang/zh-cn/images/music.png +0 -0
- package/ueditor-resource/lang/zh-cn/images/upload.png +0 -0
- package/ueditor-resource/lang/zh-cn/zh-cn.js +748 -0
- package/ueditor-resource/plugins/demo/demo.js +3 -0
- package/ueditor-resource/themes/default/css/ueditor.css +2148 -0
- package/ueditor-resource/themes/default/dialog.css +17 -0
- package/ueditor-resource/themes/default/dialogbase.css +132 -0
- package/ueditor-resource/themes/default/exts/ai.svg +12 -0
- package/ueditor-resource/themes/default/exts/apk.svg +12 -0
- package/ueditor-resource/themes/default/exts/chm.svg +12 -0
- package/ueditor-resource/themes/default/exts/css.svg +12 -0
- package/ueditor-resource/themes/default/exts/doc.svg +22 -0
- package/ueditor-resource/themes/default/exts/docx.svg +22 -0
- package/ueditor-resource/themes/default/exts/dwg.svg +16 -0
- package/ueditor-resource/themes/default/exts/folder.svg +3 -0
- package/ueditor-resource/themes/default/exts/gif.svg +14 -0
- package/ueditor-resource/themes/default/exts/html.svg +12 -0
- package/ueditor-resource/themes/default/exts/jpeg.svg +14 -0
- package/ueditor-resource/themes/default/exts/jpg.svg +14 -0
- package/ueditor-resource/themes/default/exts/log.svg +12 -0
- package/ueditor-resource/themes/default/exts/mp3.svg +14 -0
- package/ueditor-resource/themes/default/exts/mp4.svg +12 -0
- package/ueditor-resource/themes/default/exts/pdf.svg +14 -0
- package/ueditor-resource/themes/default/exts/png.svg +14 -0
- package/ueditor-resource/themes/default/exts/ppt.svg +24 -0
- package/ueditor-resource/themes/default/exts/pptx.svg +24 -0
- package/ueditor-resource/themes/default/exts/psd.svg +12 -0
- package/ueditor-resource/themes/default/exts/rar.svg +12 -0
- package/ueditor-resource/themes/default/exts/svg.svg +12 -0
- package/ueditor-resource/themes/default/exts/torrent.svg +14 -0
- package/ueditor-resource/themes/default/exts/txt.svg +14 -0
- package/ueditor-resource/themes/default/exts/unknown.svg +12 -0
- package/ueditor-resource/themes/default/exts/xls.svg +25 -0
- package/ueditor-resource/themes/default/exts/xlsx.svg +25 -0
- package/ueditor-resource/themes/default/exts/zip.svg +12 -0
- package/ueditor-resource/themes/default/images/anchor.gif +0 -0
- package/ueditor-resource/themes/default/images/arrow.png +0 -0
- package/ueditor-resource/themes/default/images/arrow_down.png +0 -0
- package/ueditor-resource/themes/default/images/arrow_up.png +0 -0
- package/ueditor-resource/themes/default/images/button-bg.gif +0 -0
- package/ueditor-resource/themes/default/images/cancelbutton.gif +0 -0
- package/ueditor-resource/themes/default/images/charts.png +0 -0
- package/ueditor-resource/themes/default/images/cursor_h.gif +0 -0
- package/ueditor-resource/themes/default/images/cursor_h.png +0 -0
- package/ueditor-resource/themes/default/images/cursor_v.gif +0 -0
- package/ueditor-resource/themes/default/images/cursor_v.png +0 -0
- package/ueditor-resource/themes/default/images/dialog-title-bg.png +0 -0
- package/ueditor-resource/themes/default/images/filescan.png +0 -0
- package/ueditor-resource/themes/default/images/highlighted.gif +0 -0
- package/ueditor-resource/themes/default/images/icons-all.gif +0 -0
- package/ueditor-resource/themes/default/images/icons.gif +0 -0
- package/ueditor-resource/themes/default/images/icons.png +0 -0
- package/ueditor-resource/themes/default/images/img-cracked.png +0 -0
- package/ueditor-resource/themes/default/images/loaderror.png +0 -0
- package/ueditor-resource/themes/default/images/loading.gif +0 -0
- package/ueditor-resource/themes/default/images/lock.gif +0 -0
- package/ueditor-resource/themes/default/images/neweditor-tab-bg.png +0 -0
- package/ueditor-resource/themes/default/images/pagebreak.gif +0 -0
- package/ueditor-resource/themes/default/images/scale.png +0 -0
- package/ueditor-resource/themes/default/images/sortable.png +0 -0
- package/ueditor-resource/themes/default/images/spacer.gif +0 -0
- package/ueditor-resource/themes/default/images/sparator_v.png +0 -0
- package/ueditor-resource/themes/default/images/table-cell-align.png +0 -0
- package/ueditor-resource/themes/default/images/tangram-colorpicker.png +0 -0
- package/ueditor-resource/themes/default/images/toolbar_bg.png +0 -0
- package/ueditor-resource/themes/default/images/unhighlighted.gif +0 -0
- package/ueditor-resource/themes/default/images/upload.png +0 -0
- package/ueditor-resource/themes/default/images/videologo.gif +0 -0
- package/ueditor-resource/themes/default/images/word.gif +0 -0
- package/ueditor-resource/themes/default/images/wordpaste.png +0 -0
- package/ueditor-resource/themes/iframe.css +63 -0
- package/ueditor-resource/third-party/SyntaxHighlighter/shCore.js +3655 -0
- package/ueditor-resource/third-party/SyntaxHighlighter/shCoreDefault.css +1 -0
- package/ueditor-resource/third-party/clipboard/clipboard.js +753 -0
- package/ueditor-resource/third-party/clipboard/clipboard.swf +0 -0
- package/ueditor-resource/third-party/codemirror/codemirror.css +106 -0
- package/ueditor-resource/third-party/codemirror/codemirror.js +3581 -0
- package/ueditor-resource/third-party/jquery-3.5.1.js +2 -0
- package/ueditor-resource/third-party/jquery-3.5.1_1.js +4314 -0
- package/ueditor-resource/third-party/webuploader/webuploader.css +88 -0
- package/ueditor-resource/third-party/webuploader/webuploader.js +4 -0
- package/ueditor-resource/third-party/zeroclipboard/ZeroClipboard.js +1256 -0
- package/ueditor-resource/third-party/zeroclipboard/ZeroClipboard.swf +0 -0
- package/ueditor-resource/ueditor.all.js +32643 -0
- package/ueditor-resource/ueditor.config.js +656 -0
- package/ueditor-resource/ueditor.parse.js +639 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
5
|
+
<title></title>
|
|
6
|
+
<script type="text/javascript" src="../internal.js?32939b8e"></script>
|
|
7
|
+
<link rel="stylesheet" href="../../themes/default/dialog.css?5c5387b6">
|
|
8
|
+
<style type="text/css">
|
|
9
|
+
.warp {
|
|
10
|
+
width: 320px;
|
|
11
|
+
height: 200px;
|
|
12
|
+
margin-left: 5px;
|
|
13
|
+
padding: 20px 0 0 15px;
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
#url {
|
|
18
|
+
width: 290px;
|
|
19
|
+
margin-bottom: 2px;
|
|
20
|
+
margin-left: -6px;
|
|
21
|
+
margin-left: -2px \9;
|
|
22
|
+
*margin-left: 0;
|
|
23
|
+
_margin-left: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.format span {
|
|
27
|
+
display: inline-block;
|
|
28
|
+
width: 58px;
|
|
29
|
+
text-align: left;
|
|
30
|
+
zoom: 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
table td {
|
|
34
|
+
padding: 5px 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
#align {
|
|
38
|
+
width: 65px;
|
|
39
|
+
height: 23px;
|
|
40
|
+
line-height: 22px;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
43
|
+
</head>
|
|
44
|
+
<body>
|
|
45
|
+
<div class="warp">
|
|
46
|
+
<table width="300" cellpadding="0" cellspacing="0">
|
|
47
|
+
<tr>
|
|
48
|
+
<td colspan="2" class="format">
|
|
49
|
+
<span><var id="lang_input_address"></var></span>
|
|
50
|
+
<input style="width:200px" id="url" type="text" value=""/>
|
|
51
|
+
</td>
|
|
52
|
+
</tr>
|
|
53
|
+
<tr>
|
|
54
|
+
<td colspan="2" class="format"><span><var id="lang_input_width"></var></span><input style="width:200px"
|
|
55
|
+
type="text" id="width"/>
|
|
56
|
+
px
|
|
57
|
+
</td>
|
|
58
|
+
|
|
59
|
+
</tr>
|
|
60
|
+
<tr>
|
|
61
|
+
<td colspan="2" class="format"><span><var id="lang_input_height"></var></span><input style="width:200px"
|
|
62
|
+
type="text"
|
|
63
|
+
id="height"/> px
|
|
64
|
+
</td>
|
|
65
|
+
</tr>
|
|
66
|
+
<tr>
|
|
67
|
+
<td><span><var id="lang_input_isScroll"></var></span><input type="checkbox" id="scroll"/></td>
|
|
68
|
+
<td><span><var id="lang_input_frameborder"></var></span><input type="checkbox" id="frameborder"/></td>
|
|
69
|
+
</tr>
|
|
70
|
+
|
|
71
|
+
<tr>
|
|
72
|
+
<td colspan="2"><span><var id="lang_input_alignMode"></var></span>
|
|
73
|
+
<select id="align">
|
|
74
|
+
<option value=""></option>
|
|
75
|
+
<option value="left"></option>
|
|
76
|
+
<option value="right"></option>
|
|
77
|
+
</select>
|
|
78
|
+
</td>
|
|
79
|
+
</tr>
|
|
80
|
+
</table>
|
|
81
|
+
</div>
|
|
82
|
+
<script type="text/javascript">
|
|
83
|
+
var iframe = editor._iframe;
|
|
84
|
+
if (iframe) {
|
|
85
|
+
$G("url").value = iframe.getAttribute("src") || "";
|
|
86
|
+
$G("width").value = iframe.getAttribute("width") || iframe.style.width.replace("px", "") || "";
|
|
87
|
+
$G("height").value = iframe.getAttribute("height") || iframe.style.height.replace("px", "") || "";
|
|
88
|
+
$G("scroll").checked = (iframe.getAttribute("scrolling") == "yes") ? true : false;
|
|
89
|
+
$G("frameborder").checked = (iframe.getAttribute("frameborder") == "1") ? true : false;
|
|
90
|
+
$G("align").value = iframe.align ? iframe.align : "";
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function queding() {
|
|
94
|
+
var url = $G("url").value.replace(/^\s*|\s*$/ig, ""),
|
|
95
|
+
width = $G("width").value,
|
|
96
|
+
height = $G("height").value,
|
|
97
|
+
scroll = $G("scroll"),
|
|
98
|
+
frameborder = $G("frameborder"),
|
|
99
|
+
float = $G("align").value,
|
|
100
|
+
newIframe = editor.document.createElement("iframe"),
|
|
101
|
+
div;
|
|
102
|
+
if (!url) {
|
|
103
|
+
alert(lang.enterAddress);
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
newIframe.setAttribute("src", /http:\/\/|https:\/\//ig.test(url) ? url : "http://" + url);
|
|
107
|
+
/^[1-9]+[.]?\d*$/g.test(width) ? newIframe.setAttribute("width", width) : "";
|
|
108
|
+
/^[1-9]+[.]?\d*$/g.test(height) ? newIframe.setAttribute("height", height) : "";
|
|
109
|
+
scroll.checked ? newIframe.setAttribute("scrolling", "yes") : newIframe.setAttribute("scrolling", "no");
|
|
110
|
+
frameborder.checked ? newIframe.setAttribute("frameborder", "1", 0) : newIframe.setAttribute("frameborder", "0", 0);
|
|
111
|
+
float ? newIframe.setAttribute("align", float) : newIframe.setAttribute("align", "");
|
|
112
|
+
if (iframe) {
|
|
113
|
+
iframe.parentNode.insertBefore(newIframe, iframe);
|
|
114
|
+
domUtils.remove(iframe);
|
|
115
|
+
} else {
|
|
116
|
+
div = editor.document.createElement("div");
|
|
117
|
+
div.appendChild(newIframe);
|
|
118
|
+
editor.execCommand("inserthtml", div.innerHTML);
|
|
119
|
+
}
|
|
120
|
+
editor._iframe = null;
|
|
121
|
+
dialog.close();
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
dialog.onok = queding;
|
|
125
|
+
$G("url").onkeydown = function (evt) {
|
|
126
|
+
evt = evt || event;
|
|
127
|
+
if (evt.keyCode == 13) {
|
|
128
|
+
queding();
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
$focus($G("url"));
|
|
132
|
+
|
|
133
|
+
</script>
|
|
134
|
+
</body>
|
|
135
|
+
</html>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
var parent = window.parent;
|
|
3
|
+
//dialog对象
|
|
4
|
+
dialog = parent.$EDITORUI[window.frameElement.id.replace(/_iframe$/, '')];
|
|
5
|
+
//当前打开dialog的编辑器实例
|
|
6
|
+
editor = dialog.editor;
|
|
7
|
+
|
|
8
|
+
UE = parent.UE;
|
|
9
|
+
|
|
10
|
+
domUtils = UE.dom.domUtils;
|
|
11
|
+
|
|
12
|
+
utils = UE.utils;
|
|
13
|
+
|
|
14
|
+
browser = UE.browser;
|
|
15
|
+
|
|
16
|
+
ajax = UE.ajax;
|
|
17
|
+
|
|
18
|
+
$G = function (id) {
|
|
19
|
+
return document.getElementById(id)
|
|
20
|
+
};
|
|
21
|
+
//focus元素
|
|
22
|
+
$focus = function (node) {
|
|
23
|
+
setTimeout(function () {
|
|
24
|
+
if (browser.ie) {
|
|
25
|
+
var r = node.createTextRange();
|
|
26
|
+
r.collapse(false);
|
|
27
|
+
r.select();
|
|
28
|
+
} else {
|
|
29
|
+
node.focus()
|
|
30
|
+
}
|
|
31
|
+
}, 0)
|
|
32
|
+
};
|
|
33
|
+
utils.loadFile(document, {
|
|
34
|
+
href: editor.options.themePath + editor.options.theme + "/dialogbase.css?cache=" + Math.random(),
|
|
35
|
+
tag: "link",
|
|
36
|
+
type: "text/css",
|
|
37
|
+
rel: "stylesheet"
|
|
38
|
+
});
|
|
39
|
+
lang = editor.getLang(dialog.className.split("-")[2]);
|
|
40
|
+
if (lang) {
|
|
41
|
+
domUtils.on(window, 'load', function () {
|
|
42
|
+
|
|
43
|
+
var langImgPath = editor.options.langPath + editor.options.lang + "/images/";
|
|
44
|
+
//针对静态资源
|
|
45
|
+
for (var i in lang["static"]) {
|
|
46
|
+
var dom = $G(i);
|
|
47
|
+
if (!dom) continue;
|
|
48
|
+
var tagName = dom.tagName,
|
|
49
|
+
content = lang["static"][i];
|
|
50
|
+
if (content.src) {
|
|
51
|
+
//clone
|
|
52
|
+
content = utils.extend({}, content, false);
|
|
53
|
+
content.src = langImgPath + content.src;
|
|
54
|
+
}
|
|
55
|
+
if (content.style) {
|
|
56
|
+
content = utils.extend({}, content, false);
|
|
57
|
+
content.style = content.style.replace(/url\s*\(/g, "url(" + langImgPath)
|
|
58
|
+
}
|
|
59
|
+
switch (tagName.toLowerCase()) {
|
|
60
|
+
case "var":
|
|
61
|
+
dom.parentNode.replaceChild(document.createTextNode(content), dom);
|
|
62
|
+
break;
|
|
63
|
+
case "select":
|
|
64
|
+
var ops = dom.options;
|
|
65
|
+
for (var j = 0, oj; oj = ops[j];) {
|
|
66
|
+
oj.innerHTML = content.options[j++];
|
|
67
|
+
}
|
|
68
|
+
for (var p in content) {
|
|
69
|
+
p != "options" && dom.setAttribute(p, content[p]);
|
|
70
|
+
}
|
|
71
|
+
break;
|
|
72
|
+
default :
|
|
73
|
+
domUtils.setAttributes(dom, content);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
})();
|
|
81
|
+
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/html4/loose.dtd">
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<title></title>
|
|
6
|
+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
|
7
|
+
<script type="text/javascript" src="../internal.js?32939b8e"></script>
|
|
8
|
+
<style type="text/css">
|
|
9
|
+
* {
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
color: #838383;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
table {
|
|
16
|
+
font-size: 12px;
|
|
17
|
+
margin: 10px;
|
|
18
|
+
line-height: 36px;
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.txt {
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
width: 90%;
|
|
25
|
+
height: 30px;
|
|
26
|
+
line-height: 30px;
|
|
27
|
+
border: 1px solid #d7d7d7;
|
|
28
|
+
border-radius: 3px;
|
|
29
|
+
padding: 0 5px;
|
|
30
|
+
outline: none;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
33
|
+
</head>
|
|
34
|
+
<body>
|
|
35
|
+
<div style="padding:10px;">
|
|
36
|
+
<table>
|
|
37
|
+
<tr>
|
|
38
|
+
<td><label for="text"> <var id="lang_input_text"></var></label></td>
|
|
39
|
+
<td><input class="txt" id="text" type="text" disabled="true"/></td>
|
|
40
|
+
</tr>
|
|
41
|
+
<tr>
|
|
42
|
+
<td><label for="href"> <var id="lang_input_url"></var></label></td>
|
|
43
|
+
<td><input class="txt" id="href" type="text"/></td>
|
|
44
|
+
</tr>
|
|
45
|
+
<tr>
|
|
46
|
+
<td><label for="title"> <var id="lang_input_title"></var></label></td>
|
|
47
|
+
<td><input class="txt" id="title" type="text"/></td>
|
|
48
|
+
</tr>
|
|
49
|
+
<tr>
|
|
50
|
+
<td colspan="2">
|
|
51
|
+
<label for="target"><var id="lang_input_target"></var></label>
|
|
52
|
+
<input id="target" type="checkbox"/>
|
|
53
|
+
</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr>
|
|
56
|
+
<td colspan="2" id="msg"></td>
|
|
57
|
+
</tr>
|
|
58
|
+
</table>
|
|
59
|
+
</div>
|
|
60
|
+
<script type="text/javascript">
|
|
61
|
+
|
|
62
|
+
editor.setOpt('allowLinkProtocols', ['http:', 'https:', '#', '/', 'ftp:', 'mailto:', 'tel:']);
|
|
63
|
+
var allowLinkProtocols = editor.getOpt('allowLinkProtocols');
|
|
64
|
+
|
|
65
|
+
var range = editor.selection.getRange(),
|
|
66
|
+
link = range.collapsed ? editor.queryCommandValue("link") : editor.selection.getStart(),
|
|
67
|
+
url,
|
|
68
|
+
text = $G('text'),
|
|
69
|
+
rangeLink = domUtils.findParentByTagName(range.getCommonAncestor(), 'a', true),
|
|
70
|
+
orgText;
|
|
71
|
+
|
|
72
|
+
link = domUtils.findParentByTagName(link, "a", true);
|
|
73
|
+
|
|
74
|
+
if (link) {
|
|
75
|
+
url = utils.html(link.getAttribute('_href') || link.getAttribute('href', 2));
|
|
76
|
+
|
|
77
|
+
if (rangeLink === link && !link.getElementsByTagName('img').length) {
|
|
78
|
+
text.removeAttribute('disabled');
|
|
79
|
+
orgText = text.value = link[browser.ie ? 'innerText' : 'textContent'];
|
|
80
|
+
} else {
|
|
81
|
+
text.setAttribute('disabled', 'true');
|
|
82
|
+
text.value = lang.validLink;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
} else {
|
|
86
|
+
if (range.collapsed) {
|
|
87
|
+
text.removeAttribute('disabled');
|
|
88
|
+
text.value = '';
|
|
89
|
+
} else {
|
|
90
|
+
text.setAttribute('disabled', 'true');
|
|
91
|
+
text.value = lang.validLink;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
}
|
|
95
|
+
$G("title").value = url ? link.title : "";
|
|
96
|
+
$G("href").value = url ? url : '';
|
|
97
|
+
$G("target").checked = url && link.target == "_blank" ? true : false;
|
|
98
|
+
$focus($G("href"));
|
|
99
|
+
|
|
100
|
+
function handleDialogOk() {
|
|
101
|
+
var href = $G('href').value.replace(/^\s+|\s+$/g, '');
|
|
102
|
+
if (href) {
|
|
103
|
+
var obj = {
|
|
104
|
+
'href': href,
|
|
105
|
+
'target': $G("target").checked ? "_blank" : '_self',
|
|
106
|
+
'title': $G("title").value.replace(/^\s+|\s+$/g, ''),
|
|
107
|
+
'_href': href,
|
|
108
|
+
};
|
|
109
|
+
//修改链接内容的情况太特殊了,所以先做到这里了
|
|
110
|
+
//todo:情况多的时候,做到command里
|
|
111
|
+
if (orgText && text.value != orgText) {
|
|
112
|
+
link[browser.ie ? 'innerText' : 'textContent'] = obj.textValue = text.value;
|
|
113
|
+
range.selectNode(link).select()
|
|
114
|
+
}
|
|
115
|
+
if (range.collapsed) {
|
|
116
|
+
obj.textValue = text.value;
|
|
117
|
+
}
|
|
118
|
+
editor.execCommand('link', utils.clearEmptyAttrs(obj));
|
|
119
|
+
dialog.close();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
dialog.onok = handleDialogOk;
|
|
124
|
+
$G('href').onkeydown = $G('title').onkeydown = function (evt) {
|
|
125
|
+
evt = evt || window.event;
|
|
126
|
+
if (evt.keyCode == 13) {
|
|
127
|
+
handleDialogOk();
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
$G('href').onblur = function () {
|
|
132
|
+
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
function hrefStartWith(href, arr) {
|
|
136
|
+
href = href.replace(/^\s+|\s+$/g, '');
|
|
137
|
+
for (var i = 0, ai; ai = arr[i++];) {
|
|
138
|
+
if (href.indexOf(ai) == 0) {
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
</script>
|
|
147
|
+
</body>
|
|
148
|
+
</html>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/html4/loose.dtd">
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
6
|
+
<style>
|
|
7
|
+
html, body {
|
|
8
|
+
height: 100%;
|
|
9
|
+
width: 100%;
|
|
10
|
+
padding: 0;
|
|
11
|
+
margin: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
#preview {
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
padding: 0;
|
|
18
|
+
margin: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
#preview * {
|
|
22
|
+
font-family: sans-serif;
|
|
23
|
+
font-size: 16px;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
26
|
+
<script type="text/javascript" src="../internal.js?32939b8e"></script>
|
|
27
|
+
<script src="../../ueditor.parse.js?8ec8e2ae"></script>
|
|
28
|
+
<title></title>
|
|
29
|
+
</head>
|
|
30
|
+
<body class="view">
|
|
31
|
+
<div id="preview" style="margin:8px">
|
|
32
|
+
|
|
33
|
+
</div>
|
|
34
|
+
</body>
|
|
35
|
+
<script>
|
|
36
|
+
document.getElementById('preview').innerHTML = editor.getContent();
|
|
37
|
+
uParse('#preview', {
|
|
38
|
+
rootPath: '../../',
|
|
39
|
+
chartContainerHeight: 500
|
|
40
|
+
})
|
|
41
|
+
dialog.oncancel = function () {
|
|
42
|
+
document.getElementById('preview').innerHTML = '';
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
</html>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|