├── php ├── default │ ├── cache.tmp │ ├── db │ │ ├── test.php │ │ └── SimpleDB.php │ ├── file_manager_json.php │ └── import.php ├── qiniu │ ├── cache.tmp │ ├── vendor │ │ ├── autoload.php │ │ └── composer │ │ │ ├── autoload_classmap.php │ │ │ ├── autoload_namespaces.php │ │ │ ├── autoload_psr4.php │ │ │ ├── autoload_files.php │ │ │ ├── autoload_static.php │ │ │ ├── LICENSE │ │ │ ├── installed.json │ │ │ └── autoload_real.php │ ├── composer.json │ ├── config.php │ ├── file_manager_json.php │ ├── composer.lock │ └── upload_json.php └── functions.php ├── src ├── footer.js ├── header.js ├── tabs.js ├── ajax.js ├── menu.js ├── colorpicker.js └── uploadbutton.js ├── plugins ├── filemanager │ ├── css │ │ └── filemanager.min.css │ └── filemanager.js ├── emoticons │ └── images │ │ ├── 0.gif │ │ ├── 1.gif │ │ ├── 10.gif │ │ ├── 100.gif │ │ ├── 101.gif │ │ ├── 102.gif │ │ ├── 103.gif │ │ ├── 104.gif │ │ ├── 105.gif │ │ ├── 106.gif │ │ ├── 107.gif │ │ ├── 108.gif │ │ ├── 109.gif │ │ ├── 11.gif │ │ ├── 110.gif │ │ ├── 111.gif │ │ ├── 112.gif │ │ ├── 113.gif │ │ ├── 114.gif │ │ ├── 115.gif │ │ ├── 116.gif │ │ ├── 117.gif │ │ ├── 118.gif │ │ ├── 119.gif │ │ ├── 12.gif │ │ ├── 120.gif │ │ ├── 121.gif │ │ ├── 122.gif │ │ ├── 123.gif │ │ ├── 124.gif │ │ ├── 125.gif │ │ ├── 126.gif │ │ ├── 127.gif │ │ ├── 128.gif │ │ ├── 129.gif │ │ ├── 13.gif │ │ ├── 130.gif │ │ ├── 131.gif │ │ ├── 132.gif │ │ ├── 133.gif │ │ ├── 134.gif │ │ ├── 14.gif │ │ ├── 15.gif │ │ ├── 16.gif │ │ ├── 17.gif │ │ ├── 18.gif │ │ ├── 19.gif │ │ ├── 2.gif │ │ ├── 20.gif │ │ ├── 21.gif │ │ ├── 22.gif │ │ ├── 23.gif │ │ ├── 24.gif │ │ ├── 25.gif │ │ ├── 26.gif │ │ ├── 27.gif │ │ ├── 28.gif │ │ ├── 29.gif │ │ ├── 3.gif │ │ ├── 30.gif │ │ ├── 31.gif │ │ ├── 32.gif │ │ ├── 33.gif │ │ ├── 34.gif │ │ ├── 35.gif │ │ ├── 36.gif │ │ ├── 37.gif │ │ ├── 38.gif │ │ ├── 39.gif │ │ ├── 4.gif │ │ ├── 40.gif │ │ ├── 41.gif │ │ ├── 42.gif │ │ ├── 43.gif │ │ ├── 44.gif │ │ ├── 45.gif │ │ ├── 46.gif │ │ ├── 47.gif │ │ ├── 48.gif │ │ ├── 49.gif │ │ ├── 5.gif │ │ ├── 50.gif │ │ ├── 51.gif │ │ ├── 52.gif │ │ ├── 53.gif │ │ ├── 54.gif │ │ ├── 55.gif │ │ ├── 56.gif │ │ ├── 57.gif │ │ ├── 58.gif │ │ ├── 59.gif │ │ ├── 6.gif │ │ ├── 60.gif │ │ ├── 61.gif │ │ ├── 62.gif │ │ ├── 63.gif │ │ ├── 64.gif │ │ ├── 65.gif │ │ ├── 66.gif │ │ ├── 67.gif │ │ ├── 68.gif │ │ ├── 69.gif │ │ ├── 7.gif │ │ ├── 70.gif │ │ ├── 71.gif │ │ ├── 72.gif │ │ ├── 73.gif │ │ ├── 74.gif │ │ ├── 75.gif │ │ ├── 76.gif │ │ ├── 77.gif │ │ ├── 78.gif │ │ ├── 79.gif │ │ ├── 8.gif │ │ ├── 80.gif │ │ ├── 81.gif │ │ ├── 82.gif │ │ ├── 83.gif │ │ ├── 84.gif │ │ ├── 85.gif │ │ ├── 86.gif │ │ ├── 87.gif │ │ ├── 88.gif │ │ ├── 89.gif │ │ ├── 9.gif │ │ ├── 90.gif │ │ ├── 91.gif │ │ ├── 92.gif │ │ ├── 93.gif │ │ ├── 94.gif │ │ ├── 95.gif │ │ ├── 96.gif │ │ ├── 97.gif │ │ ├── 98.gif │ │ ├── 99.gif │ │ └── static.gif ├── image │ └── images │ │ ├── refresh.png │ │ ├── align_top.gif │ │ ├── align_left.gif │ │ └── align_right.gif ├── graft │ └── css │ │ ├── images │ │ ├── blur.png │ │ ├── brush.png │ │ ├── empty.png │ │ ├── init.png │ │ ├── redo.png │ │ ├── redoH.png │ │ ├── save.png │ │ ├── scale.png │ │ ├── size.png │ │ ├── undo.png │ │ ├── undoH.png │ │ ├── addimg.png │ │ ├── delimg.png │ │ ├── delimgH.png │ │ ├── emptyH.png │ │ ├── eraser.png │ │ └── scaleH.png │ │ └── scrawl.css.map ├── multiimage │ ├── css │ │ ├── icons │ │ │ ├── c.png │ │ │ ├── aep.png │ │ │ ├── asp.png │ │ │ ├── avi.png │ │ │ ├── conf.png │ │ │ ├── css.png │ │ │ ├── doc.png │ │ │ ├── eml.png │ │ │ ├── eps.png │ │ │ ├── fla.png │ │ │ ├── htm.png │ │ │ ├── idn.png │ │ │ ├── ini.png │ │ │ ├── java.png │ │ │ ├── js.png │ │ │ ├── jsf.png │ │ │ ├── mdb.png │ │ │ ├── midi.png │ │ │ ├── mov.png │ │ │ ├── mp3.png │ │ │ ├── mpeg.png │ │ │ ├── pdf.png │ │ │ ├── php.png │ │ │ ├── ppt.png │ │ │ ├── psd.png │ │ │ ├── pst.png │ │ │ ├── pub.png │ │ │ ├── py.png │ │ │ ├── rb.png │ │ │ ├── rmvb.png │ │ │ ├── scss.png │ │ │ ├── sql.png │ │ │ ├── tif.png │ │ │ ├── txt.png │ │ │ ├── vsd.png │ │ │ ├── wav.png │ │ │ ├── wma.png │ │ │ ├── wmv.png │ │ │ ├── xls.png │ │ │ ├── xml.png │ │ │ ├── zip.png │ │ │ ├── default.png │ │ │ └── markdown.png │ │ └── images │ │ │ ├── icons.png │ │ │ ├── image.png │ │ │ ├── loader.gif │ │ │ ├── progress.png │ │ │ ├── success.png │ │ │ ├── icons-all.gif │ │ │ └── dialog-title-bg.png │ ├── multiimage.js │ └── template │ │ └── template.html ├── template │ ├── html │ │ ├── 1.html │ │ ├── 3.html │ │ └── 2.html │ └── template.js ├── quote │ └── quote.js ├── code │ ├── pretty.js │ └── code.js ├── fixtoolbar │ └── fixtoolbar.js ├── pagebreak │ └── pagebreak.js ├── clearhtml │ └── clearhtml.js ├── lineheight │ └── lineheight.js ├── baidumap │ ├── map.html │ ├── index.html │ └── baidumap.js ├── autoheight │ └── autoheight.js ├── plainpaste │ └── plainpaste.js ├── anchor │ └── anchor.js ├── wordpaste │ └── wordpaste.js ├── map │ └── map.html ├── quickformat │ └── quickformat.js └── link │ └── link.js ├── test ├── webdriver │ ├── all-chrome.bat │ ├── all-firefox.bat │ ├── all-ie.bat │ ├── test-unittest.php │ ├── test-dialog.php │ ├── all.php │ ├── test-default.php │ └── php-webdriver │ │ ├── WebDriverSimpleItem.php │ │ ├── __init__.php │ │ ├── WebDriverEnvironment.php │ │ ├── WebDriverElement.php │ │ ├── WebDriver.php │ │ ├── WebDriverContainer.php │ │ └── WebDriverExceptions.php ├── data │ └── logo_180_30.gif ├── frame.html ├── index.html ├── remote.html ├── core.html ├── quirkmode.html ├── ajax.html ├── edit.js ├── navi.html ├── leak.html ├── menu.html ├── cmd.html ├── toolbar.html ├── tabs.html ├── hidden.html ├── toolbar.js ├── edit.html ├── widget.html ├── menu.js ├── range.html ├── selector.html ├── total.html ├── node.html ├── event.html ├── dialog.html ├── editor.html ├── html.html └── selector.js ├── themes ├── common │ ├── play.png │ ├── rm.gif │ ├── anchor.gif │ ├── blank.gif │ ├── flash.gif │ ├── flash.png │ ├── media.gif │ ├── icons-all.gif │ ├── loading.gif │ ├── dialog-title-bg.png │ ├── play.svg │ └── flash.svg ├── black │ └── images │ │ └── nkeditor.png ├── blue │ └── images │ │ └── nkeditor.png ├── default │ └── images │ │ ├── scrawl.png │ │ ├── default.png │ │ └── background.png ├── grey │ └── images │ │ └── nkeditor.png ├── primary │ └── images │ │ └── nkeditor.png └── app.css ├── libs └── JDialog │ └── css │ ├── loader.gif │ ├── gb_tips.png │ ├── loader1.gif │ ├── bg-default.png │ ├── gb_tips_ie6.gif │ ├── gb_tip_loading.gif │ ├── jwindow_default.gif │ ├── jdialog_confirm_icon.gif │ └── jdialog_confirm_icon_espresso.png ├── .gitignore ├── package.json └── old.html /php/default/cache.tmp: -------------------------------------------------------------------------------- 1 | 1508678800 -------------------------------------------------------------------------------- /php/qiniu/cache.tmp: -------------------------------------------------------------------------------- 1 | 1508682572 -------------------------------------------------------------------------------- /src/footer.js: -------------------------------------------------------------------------------- 1 | 2 | })(window); 3 | -------------------------------------------------------------------------------- /plugins/filemanager/css/filemanager.min.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/webdriver/all-chrome.bat: -------------------------------------------------------------------------------- 1 | php all.php --browser=chrome 2 | pause -------------------------------------------------------------------------------- /test/webdriver/all-firefox.bat: -------------------------------------------------------------------------------- 1 | php all.php --browser=firefox 2 | pause -------------------------------------------------------------------------------- /test/webdriver/all-ie.bat: -------------------------------------------------------------------------------- 1 | php all.php --browser="internet explorer" 2 | pause -------------------------------------------------------------------------------- /themes/common/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/common/play.png -------------------------------------------------------------------------------- /themes/common/rm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/common/rm.gif -------------------------------------------------------------------------------- /themes/common/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/common/anchor.gif -------------------------------------------------------------------------------- /themes/common/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/common/blank.gif -------------------------------------------------------------------------------- /themes/common/flash.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/common/flash.gif -------------------------------------------------------------------------------- /themes/common/flash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/common/flash.png -------------------------------------------------------------------------------- /themes/common/media.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/common/media.gif -------------------------------------------------------------------------------- /libs/JDialog/css/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/libs/JDialog/css/loader.gif -------------------------------------------------------------------------------- /test/data/logo_180_30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/test/data/logo_180_30.gif -------------------------------------------------------------------------------- /themes/common/icons-all.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/common/icons-all.gif -------------------------------------------------------------------------------- /themes/common/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/common/loading.gif -------------------------------------------------------------------------------- /libs/JDialog/css/gb_tips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/libs/JDialog/css/gb_tips.png -------------------------------------------------------------------------------- /libs/JDialog/css/loader1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/libs/JDialog/css/loader1.gif -------------------------------------------------------------------------------- /libs/JDialog/css/bg-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/libs/JDialog/css/bg-default.png -------------------------------------------------------------------------------- /libs/JDialog/css/gb_tips_ie6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/libs/JDialog/css/gb_tips_ie6.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/0.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/1.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/10.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/100.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/100.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/101.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/101.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/102.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/102.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/103.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/103.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/104.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/104.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/105.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/105.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/106.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/106.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/107.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/107.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/108.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/108.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/109.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/109.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/11.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/110.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/110.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/111.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/111.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/112.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/112.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/113.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/113.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/114.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/114.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/115.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/115.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/116.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/116.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/117.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/117.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/118.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/118.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/119.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/119.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/12.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/120.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/120.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/121.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/121.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/122.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/122.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/123.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/123.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/124.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/124.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/125.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/125.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/126.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/126.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/127.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/127.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/128.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/128.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/129.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/129.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/13.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/130.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/130.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/131.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/131.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/132.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/132.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/133.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/133.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/134.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/134.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/14.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/15.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/16.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/17.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/18.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/19.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/2.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/20.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/21.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/22.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/23.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/24.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/25.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/26.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/27.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/28.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/29.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/3.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/30.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/31.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/32.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/33.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/34.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/35.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/36.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/37.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/38.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/39.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/4.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/40.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/41.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/42.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/43.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/44.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/45.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/46.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/47.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/48.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/49.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/5.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/50.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/51.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/52.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/53.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/54.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/55.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/56.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/57.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/58.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/59.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/6.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/60.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/61.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/62.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/63.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/64.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/65.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/66.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/67.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/68.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/69.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/7.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/70.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/71.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/72.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/72.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/73.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/73.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/74.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/74.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/75.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/75.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/76.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/76.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/77.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/77.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/78.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/78.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/79.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/79.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/8.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/80.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/80.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/81.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/81.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/82.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/82.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/83.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/83.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/84.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/84.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/85.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/85.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/86.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/86.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/87.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/87.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/88.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/88.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/89.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/89.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/9.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/90.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/90.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/91.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/91.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/92.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/92.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/93.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/93.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/94.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/94.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/95.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/95.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/96.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/96.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/97.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/97.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/98.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/98.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/99.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/99.gif -------------------------------------------------------------------------------- /plugins/image/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/image/images/refresh.png -------------------------------------------------------------------------------- /test/frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /themes/black/images/nkeditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/black/images/nkeditor.png -------------------------------------------------------------------------------- /themes/blue/images/nkeditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/blue/images/nkeditor.png -------------------------------------------------------------------------------- /themes/default/images/scrawl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/default/images/scrawl.png -------------------------------------------------------------------------------- /themes/grey/images/nkeditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/grey/images/nkeditor.png -------------------------------------------------------------------------------- /plugins/graft/css/images/blur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/blur.png -------------------------------------------------------------------------------- /plugins/graft/css/images/brush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/brush.png -------------------------------------------------------------------------------- /plugins/graft/css/images/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/empty.png -------------------------------------------------------------------------------- /plugins/graft/css/images/init.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/init.png -------------------------------------------------------------------------------- /plugins/graft/css/images/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/redo.png -------------------------------------------------------------------------------- /plugins/graft/css/images/redoH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/redoH.png -------------------------------------------------------------------------------- /plugins/graft/css/images/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/save.png -------------------------------------------------------------------------------- /plugins/graft/css/images/scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/scale.png -------------------------------------------------------------------------------- /plugins/graft/css/images/size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/size.png -------------------------------------------------------------------------------- /plugins/graft/css/images/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/undo.png -------------------------------------------------------------------------------- /plugins/graft/css/images/undoH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/undoH.png -------------------------------------------------------------------------------- /plugins/image/images/align_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/image/images/align_top.gif -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/c.png -------------------------------------------------------------------------------- /themes/common/dialog-title-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/common/dialog-title-bg.png -------------------------------------------------------------------------------- /themes/default/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/default/images/default.png -------------------------------------------------------------------------------- /themes/primary/images/nkeditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/primary/images/nkeditor.png -------------------------------------------------------------------------------- /libs/JDialog/css/gb_tip_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/libs/JDialog/css/gb_tip_loading.gif -------------------------------------------------------------------------------- /libs/JDialog/css/jwindow_default.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/libs/JDialog/css/jwindow_default.gif -------------------------------------------------------------------------------- /plugins/emoticons/images/static.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/emoticons/images/static.gif -------------------------------------------------------------------------------- /plugins/graft/css/images/addimg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/addimg.png -------------------------------------------------------------------------------- /plugins/graft/css/images/delimg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/delimg.png -------------------------------------------------------------------------------- /plugins/graft/css/images/delimgH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/delimgH.png -------------------------------------------------------------------------------- /plugins/graft/css/images/emptyH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/emptyH.png -------------------------------------------------------------------------------- /plugins/graft/css/images/eraser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/eraser.png -------------------------------------------------------------------------------- /plugins/graft/css/images/scaleH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/graft/css/images/scaleH.png -------------------------------------------------------------------------------- /plugins/image/images/align_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/image/images/align_left.gif -------------------------------------------------------------------------------- /plugins/image/images/align_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/image/images/align_right.gif -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/aep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/aep.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/asp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/asp.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/avi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/avi.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/conf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/conf.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/css.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/css.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/doc.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/eml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/eml.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/eps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/eps.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/fla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/fla.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/htm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/htm.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/idn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/idn.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/ini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/ini.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/java.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/java.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/js.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/js.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/jsf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/jsf.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/mdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/mdb.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/midi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/midi.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/mov.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/mov.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/mp3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/mp3.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/mpeg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/mpeg.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/pdf.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/php.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/php.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/ppt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/ppt.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/psd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/psd.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/pst.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/pst.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/pub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/pub.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/py.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/py.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/rb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/rb.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/rmvb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/rmvb.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/scss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/scss.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/sql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/sql.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/tif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/tif.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/txt.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/vsd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/vsd.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/wav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/wav.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/wma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/wma.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/wmv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/wmv.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/xls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/xls.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/xml.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/zip.png -------------------------------------------------------------------------------- /themes/default/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/themes/default/images/background.png -------------------------------------------------------------------------------- /plugins/multiimage/css/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/images/icons.png -------------------------------------------------------------------------------- /plugins/multiimage/css/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/images/image.png -------------------------------------------------------------------------------- /libs/JDialog/css/jdialog_confirm_icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/libs/JDialog/css/jdialog_confirm_icon.gif -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/default.png -------------------------------------------------------------------------------- /plugins/multiimage/css/icons/markdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/icons/markdown.png -------------------------------------------------------------------------------- /plugins/multiimage/css/images/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/images/loader.gif -------------------------------------------------------------------------------- /plugins/multiimage/css/images/progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/images/progress.png -------------------------------------------------------------------------------- /plugins/multiimage/css/images/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/images/success.png -------------------------------------------------------------------------------- /plugins/multiimage/css/images/icons-all.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/images/icons-all.gif -------------------------------------------------------------------------------- /plugins/multiimage/css/images/dialog-title-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/plugins/multiimage/css/images/dialog-title-bg.png -------------------------------------------------------------------------------- /libs/JDialog/css/jdialog_confirm_icon_espresso.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjian102621/NKeditor/HEAD/libs/JDialog/css/jdialog_confirm_icon_espresso.png -------------------------------------------------------------------------------- /php/qiniu/vendor/autoload.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

8 | 在此处输入标题 9 |

10 |

11 | 在此处输入内容 12 |

13 | 14 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Test 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /php/qiniu/vendor/composer/autoload_psr4.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/qiniu/php-sdk/src/Qiniu'), 10 | ); 11 | -------------------------------------------------------------------------------- /php/qiniu/vendor/composer/autoload_files.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/qiniu/php-sdk/src/Qiniu/functions.php', 10 | ); 11 | -------------------------------------------------------------------------------- /plugins/quote/quote.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 引用插件 3 | * @author yangjian 4 | */ 5 | KindEditor.plugin('quote', function(K) { 6 | var self = this; 7 | var name = 'quote'; 8 | self.clickToolbar(name, function() { 9 | self.insertHtml('

这里输入引用内容...


'); 10 | self.focus(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /php/qiniu/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo/myapp", 3 | "description": "just a test", 4 | "type": "project", 5 | "require": { 6 | "qiniu/php-sdk": "7.2.1" 7 | }, 8 | "license": "MIT", 9 | "authors": [ 10 | { 11 | "name": "yangjian", 12 | "email": "yangjian102621@gmail.com" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /php/default/db/test.php: -------------------------------------------------------------------------------- 1 | putLine($t+$i); 14 | } 15 | printf("数据插入完毕!\n"); 16 | $items = $db->getDataList(2, 10); 17 | print_r($items); 18 | 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NKeditor", 3 | "version": "5.0.3", 4 | "filename": "NKeditor", 5 | "repository": "blackfox/NKeditor", 6 | "devDependencies": { 7 | "grunt": "~1.5.3", 8 | "grunt-contrib-concat": "~0.3.0", 9 | "grunt-contrib-uglify": "~0.2.7", 10 | "grunt-contrib-cssmin": "~2.2.1", 11 | "grunt-contrib-copy": "~0.4.1", 12 | "grunt-contrib-compress": "~0.5.3" 13 | }, 14 | "license": "MIT" 15 | } 16 | -------------------------------------------------------------------------------- /plugins/template/html/3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

8 | 在此处输入内容 9 |

10 |
    11 |
  1. 12 | 描述1 13 |
  2. 14 |
  3. 15 | 描述2 16 |
  4. 17 |
  5. 18 | 描述3 19 |
  6. 20 |
21 |

22 | 在此处输入内容 23 |

24 | 35 | 36 | -------------------------------------------------------------------------------- /plugins/code/pretty.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author yangjian 3 | * @since 18-9-11 下午9:02. 4 | */ 5 | 6 | // function _bindEvent(el, type, fn) { 7 | // if (el.addEventListener){ 8 | // el.addEventListener(type, fn); 9 | // } else if (el.attachEvent){ 10 | // el.attachEvent('on' + type, fn); 11 | // } 12 | // } 13 | // _bindEvent(document.body, "DOMNodeInserted", function(e) { 14 | // var className = e.target.className; 15 | // if (className && className.indexOf("language-") != -1) { 16 | // Prism.highlightElement(e.target); 17 | // } 18 | // }) 19 | -------------------------------------------------------------------------------- /test/webdriver/test-unittest.php: -------------------------------------------------------------------------------- 1 | open($file); 20 | equals($driver->selector('.failed')->element->text(), '0'); 21 | } 22 | 23 | $driver->close(); 24 | -------------------------------------------------------------------------------- /src/header.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-${THISYEAR} kindsoft.net 4 | * 5 | * @author Roddy 6 | * @website http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | * @version ${VERSION} 9 | *******************************************************************************/ 10 | 11 | (function (window, undefined) { 12 | 13 | if (window.KindEditor) { 14 | return; 15 | } 16 | -------------------------------------------------------------------------------- /test/remote.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Test 6 | 7 | 14 | 15 | 16 |

KindEditor Test

17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /test/core.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Unittest 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

KindEditor Unittest

14 |

15 |
    16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /plugins/template/html/2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

    8 | 标题 9 |

    10 | 11 | 12 | 13 | 16 | 19 | 20 | 21 | 24 | 27 | 28 | 29 | 32 | 35 | 36 | 37 |
    14 |

    标题1

    15 |
    17 |

    标题1

    18 |
    22 | 内容1 23 | 25 | 内容2 26 |
    30 | 内容3 31 | 33 | 内容4 34 |
    38 |

    39 | 表格说明 40 |

    41 | 42 | -------------------------------------------------------------------------------- /themes/common/play.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/webdriver/test-dialog.php: -------------------------------------------------------------------------------- 1 | script("return KindEditor('.ke-dialog').css('top')")); 9 | $prevLeft = intval($driver->script("return KindEditor('.ke-dialog').css('left')")); 10 | $driver->selector('.ke-dialog-header')->drag(100, 200); 11 | equals(intval($driver->script("return KindEditor('.ke-dialog').css('top')")), $prevTop + 200); 12 | equals(intval($driver->script("return KindEditor('.ke-dialog').css('left')")), $prevLeft + 100); 13 | 14 | // close dialog 15 | $driver->selector('.ke-dialog-icon-close')->click(); 16 | 17 | $driver->close(); 18 | -------------------------------------------------------------------------------- /test/webdriver/all.php: -------------------------------------------------------------------------------- 1 | html(''); 8 | // bold 9 | $driver->clickToolbar('bold'); 10 | $driver->input('abc'); 11 | equals($driver->html(), 'abc'); 12 | // fontsize 13 | $driver->clickToolbar('fontsize'); 14 | $driver->selector('.ke-menu-item', 6)->mouseover()->click(); 15 | $driver->input('abc'); 16 | equals($driver->html(), 'abcabc'); 17 | // removeformat 18 | $driver->clickToolbar('removeformat'); 19 | $driver->input('123'); 20 | equals($driver->html(), 'abcabc123'); 21 | 22 | $driver->close(); 23 | -------------------------------------------------------------------------------- /test/quirkmode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Test 6 | 7 | 8 |

    KindEditor Test

    9 |
    10 | 11 |
    12 | 13 | 14 | 15 | 23 |
    24 | 25 | 26 | -------------------------------------------------------------------------------- /themes/common/flash.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php/default/file_manager_json.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | error_reporting(0); 11 | require_once '../JsonResult.php'; 12 | require_once '../functions.php'; 13 | require_once "db/SimpleDB.php"; 14 | 15 | usleep(500000); 16 | $page = intval($_GET["page"]); 17 | $fileType = trim($_GET['fileType']); 18 | $pagesize = 15; 19 | //读取文件数据 20 | $db = new SimpleDB($fileType); 21 | $files = $db->getDataList($page, $pagesize); 22 | $result = new JsonResult(); 23 | if (!empty($files)) { 24 | $result->setCode(JsonResult::CODE_SUCCESS); 25 | $result->setData($files); 26 | } else { 27 | $result->setCode(JsonResult::CODE_FAIL); 28 | } 29 | $result->output(); 30 | -------------------------------------------------------------------------------- /test/webdriver/php-webdriver/WebDriverSimpleItem.php: -------------------------------------------------------------------------------- 1 | _methods; 20 | } 21 | 22 | public function setMethods($methods) { 23 | $this->_methods = $methods; 24 | return $this; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/ajax.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Tabs Test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

    KindEditor Unittest

    20 | 21 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/webdriver/php-webdriver/__init__.php: -------------------------------------------------------------------------------- 1 | 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('pagebreak', function(K) { 11 | var self = this; 12 | var name = 'pagebreak'; 13 | var pagebreakHtml = K.undef(self.pagebreakHtml, '
    '); 14 | 15 | self.clickToolbar(name, function() { 16 | var cmd = self.cmd, range = cmd.range; 17 | self.focus(); 18 | var tail = self.newlineTag == 'br' || K.WEBKIT ? '' : ''; 19 | self.insertHtml(pagebreakHtml + tail); 20 | if (tail !== '') { 21 | var p = K('#__kindeditor_tail_tag__', self.edit.doc); 22 | range.selectNodeContents(p[0]); 23 | p.removeAttr('id'); 24 | cmd.select(); 25 | } 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /php/qiniu/vendor/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php', 11 | ); 12 | 13 | public static $prefixLengthsPsr4 = array ( 14 | 'Q' => 15 | array ( 16 | 'Qiniu\\' => 6, 17 | ), 18 | ); 19 | 20 | public static $prefixDirsPsr4 = array ( 21 | 'Qiniu\\' => 22 | array ( 23 | 0 => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu', 24 | ), 25 | ); 26 | 27 | public static function getInitializer(ClassLoader $loader) 28 | { 29 | return \Closure::bind(function () use ($loader) { 30 | $loader->prefixLengthsPsr4 = ComposerStaticInitd54131a8e41e2a2e6c26ad98ddf3c990::$prefixLengthsPsr4; 31 | $loader->prefixDirsPsr4 = ComposerStaticInitd54131a8e41e2a2e6c26ad98ddf3c990::$prefixDirsPsr4; 32 | 33 | }, null, ClassLoader::class); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /plugins/filemanager/filemanager.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 文件服务器管理 3 | * @author yangjian 4 | * @since v4.1.12(2017-09-12) 5 | * @site http://git.oschina.net/blackfox/kindeditor 6 | */ 7 | KindEditor.plugin('filemanager', function(K) { 8 | var self = this; 9 | var fileManagerJson = K.undef(self.fileManagerJson, self.basePath + 'php/file_manager_json.php'); 10 | var lang = self.lang('filemanager.'); 11 | if(typeof jQuery == 'undefined') { 12 | K.options.errorMsgHandler(lang.depJQueryError, "error"); 13 | return; 14 | } else { 15 | K.loadScript(K.options.pluginsPath+"filemanager/FManager.js"); 16 | K.loadStyle(K.options.pluginsPath+"multiimage/css/upload.css"); 17 | } 18 | 19 | self.plugin.filemanagerDialog = function(options) { 20 | 21 | var clickFn = options.clickFn; 22 | new FManager({ 23 | list_url : fileManagerJson, //图片列表数据获取url 24 | lang : lang, //语言包 25 | fileType : options.dirName, 26 | top : self.dialogOffset, 27 | callback : function(data) { 28 | //console.log(data); 29 | clickFn.call(this, data[0]); 30 | } 31 | }); 32 | //return dialog; 33 | } 34 | 35 | }); 36 | -------------------------------------------------------------------------------- /php/qiniu/vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2016 Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /test/webdriver/php-webdriver/WebDriverEnvironment.php: -------------------------------------------------------------------------------- 1 | ' + key + '').bind('click', (function(key, val) { 19 | return function(e) { 20 | edit.cmd[key](val); 21 | e.stop(); 22 | }; 23 | })(key, val)); 24 | K('#cmdArea').append(a); 25 | K('#cmdArea').append(document.createTextNode(' ')); 26 | }); 27 | 28 | edit = K.edit({ 29 | src : 'div#edit', 30 | srcElement : 'body textarea', 31 | width : '700px', 32 | height : '200px', 33 | designMode : true, 34 | bodyClass : 'ke-content', 35 | cssData : 'body {font-size:12px;margin:0;}' 36 | }); 37 | 38 | K('#design').bind('click', function(e) { 39 | if (edit) { 40 | edit.design(true); 41 | } 42 | }); 43 | K('#source').bind('click', function(e) { 44 | if (edit) { 45 | edit.design(false); 46 | } 47 | }); 48 | K('#toggle').bind('click', function(e) { 49 | if (edit) { 50 | edit.design(); 51 | } 52 | }); -------------------------------------------------------------------------------- /test/navi.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Test 6 | 7 | 14 | 15 | 16 | 35 | 36 | -------------------------------------------------------------------------------- /plugins/clearhtml/clearhtml.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('clearhtml', function(K) { 11 | var self = this, name = 'clearhtml'; 12 | self.clickToolbar(name, function() { 13 | self.focus(); 14 | var html = self.html(); 15 | html = html.replace(/(]*>)([\s\S]*?)(<\/script>)/ig, ''); 16 | html = html.replace(/(]*>)([\s\S]*?)(<\/style>)/ig, ''); 17 | html = K.formatHtml(html, { 18 | a : ['href', 'target'], 19 | embed : ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'], 20 | img : ['src', 'width', 'height', 'border', 'alt', 'title', '.width', '.height'], 21 | table : ['border'], 22 | 'td,th' : ['rowspan', 'colspan'], 23 | 'div,hr,br,tbody,tr,p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : [] 24 | }); 25 | self.html(html); 26 | self.cmd.selection(true); 27 | self.addBookmark(); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /test/leak.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Memory Leak Test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 刷新 19 | 返回上一步 20 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /plugins/lineheight/lineheight.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('lineheight', function(K) { 11 | var self = this, name = 'lineheight', lang = self.lang(name + '.'); 12 | self.clickToolbar(name, function() { 13 | var curVal = '', commonNode = self.cmd.commonNode({'*' : '.line-height'}); 14 | if (commonNode) { 15 | curVal = commonNode.css('line-height'); 16 | } 17 | var menu = self.createMenu({ 18 | name : name, 19 | width : 150 20 | }); 21 | K.each(lang.lineHeight, function(i, row) { 22 | K.each(row, function(key, val) { 23 | menu.addItem({ 24 | title : val, 25 | checked : curVal === key, 26 | click : function() { 27 | self.cmd.toggle('', { 28 | span : '.line-height=' + key 29 | }); 30 | self.updateState(); 31 | self.addBookmark(); 32 | self.hideMenu(); 33 | } 34 | }); 35 | }); 36 | }); 37 | }); 38 | }); 39 | -------------------------------------------------------------------------------- /plugins/baidumap/map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Baidu Maps 6 | 10 | 11 | 39 | 40 | 41 |
    42 | 43 | 44 | -------------------------------------------------------------------------------- /test/menu.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Menu Test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |

    KindEditor Menu Test

    28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /test/cmd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Unittest 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |

    KindEditor Unittest

    21 |

    22 |
      23 | 24 | 25 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /test/toolbar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Toolbar Test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |

      KindEditor Toolbar Test

      24 |
      25 |
      26 |
      27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /test/tabs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Tabs Test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |

      KindEditor Tabs Test

      23 |
      24 |
      内容1
      25 |
      内容2
      26 |
      内容3
      27 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /old.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NKeditor 在线编辑器 PHP demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 45 | 46 | 47 |
      48 | 49 |
      50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /plugins/autoheight/autoheight.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('autoheight', function(K) { 11 | var self = this; 12 | 13 | if (!self.autoHeightMode) { 14 | return; 15 | } 16 | 17 | var minHeight; 18 | 19 | function hideScroll() { 20 | var edit = self.edit; 21 | var body = edit.doc.body; 22 | edit.iframe[0].scroll = 'no'; 23 | body.style.overflowY = 'hidden'; 24 | } 25 | 26 | function resetHeight() { 27 | if(self.fullscreenMode){ 28 | return; 29 | } 30 | var edit = self.edit; 31 | var body = edit.doc.body; 32 | edit.iframe.height(minHeight); 33 | self.resize(null, Math.max((K.IE ? body.scrollHeight : body.offsetHeight) + 76, minHeight)); 34 | } 35 | 36 | function init() { 37 | minHeight = K.removeUnit(self.height); 38 | 39 | self.edit.afterChange(resetHeight); 40 | if(!self.fullscreenMode){ 41 | hideScroll(); 42 | } 43 | resetHeight(); 44 | } 45 | 46 | if (self.isCreated) { 47 | init(); 48 | } else { 49 | self.afterCreate(init); 50 | } 51 | }); 52 | 53 | /* 54 | * 如何实现真正的自动高度? 55 | * 修改编辑器高度之后,再次获取body内容高度时,最小值只会是当前iframe的设置高度,这样就导致高度只增不减。 56 | * 所以每次获取body内容高度之前,先将iframe的高度重置为最小高度,这样就能获取body的实际高度。 57 | * 由此就实现了真正的自动高度 58 | * 测试:chrome、firefox、IE9、IE8 59 | * */ 60 | -------------------------------------------------------------------------------- /plugins/plainpaste/plainpaste.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('plainpaste', function(K) { 11 | var self = this, name = 'plainpaste'; 12 | self.clickToolbar(name, function() { 13 | var lang = self.lang(name + '.'), 14 | html = '
      ' + 15 | '
      ' + lang.comment + '
      ' + 16 | '' + 17 | '
      ', 18 | dialog = self.createDialog({ 19 | name : name, 20 | width : 450, 21 | title : self.lang(name), 22 | body : html, 23 | yesBtn : { 24 | name : self.lang('yes'), 25 | click : function(e) { 26 | var html = textarea.val(); 27 | html = K.escape(html); 28 | html = html.replace(/ {2}/g, '  '); 29 | if (self.newlineTag == 'p') { 30 | html = html.replace(/^/, '

      ').replace(/$/, '

      ').replace(/\n/g, '

      '); 31 | } else { 32 | html = html.replace(/\n/g, '
      $&'); 33 | } 34 | self.insertHtml(html).hideDialog().focus(); 35 | } 36 | } 37 | }), 38 | textarea = K('textarea', dialog.div); 39 | textarea[0].focus(); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /src/tabs.js: -------------------------------------------------------------------------------- 1 | 2 | function _tabs(options) { 3 | var self = _widget(options), 4 | remove = self.remove, 5 | afterSelect = options.afterSelect, 6 | div = self.div, 7 | liList = []; 8 | //create tabs 9 | div.addClass('ke-tabs') 10 | .bind('contextmenu,mousedown,mousemove', function(e) { 11 | e.preventDefault(); 12 | }); 13 | var ul = K('

        '); 14 | div.append(ul); 15 | //add a tab 16 | self.add = function(tab) { 17 | var li = K('
      • ' + tab.title + '
      • '); 18 | li.data('tab', tab); 19 | liList.push(li); 20 | ul.append(li); 21 | }; 22 | self.selectedIndex = 0; 23 | //select a tab 24 | self.select = function(index) { 25 | self.selectedIndex = index; 26 | _each(liList, function(i, li) { 27 | li.unbind(); 28 | if (i === index) { 29 | li.addClass('ke-tabs-li-selected'); 30 | K(li.data('tab').panel).show(''); 31 | } else { 32 | li.removeClass('ke-tabs-li-selected').removeClass('ke-tabs-li-on') 33 | .mouseover(function() { 34 | K(this).addClass('ke-tabs-li-on'); 35 | }) 36 | .mouseout(function() { 37 | K(this).removeClass('ke-tabs-li-on'); 38 | }) 39 | .click(function() { 40 | self.select(i); 41 | }); 42 | K(li.data('tab').panel).hide(); 43 | } 44 | }); 45 | if (afterSelect) { 46 | afterSelect.call(self, index); 47 | } 48 | }; 49 | //remove tabs 50 | self.remove = function() { 51 | _each(liList, function() { 52 | this.remove(); 53 | }); 54 | ul.remove(); 55 | remove.call(self); 56 | }; 57 | return self; 58 | } 59 | 60 | K.tabs = _tabs; 61 | -------------------------------------------------------------------------------- /test/webdriver/php-webdriver/WebDriverElement.php: -------------------------------------------------------------------------------- 1 | 'POST', 20 | 'submit' => 'POST', 21 | 'text' => 'GET', 22 | 'value' => 'POST', 23 | 'name' => 'GET', 24 | 'clear' => 'POST', 25 | 'selected' => 'GET', 26 | 'enabled' => 'GET', 27 | 'attribute' => 'GET', 28 | 'equals' => 'GET', 29 | 'displayed' => 'GET', 30 | 'location' => 'GET', 31 | 'location_in_view' => 'GET', 32 | 'size' => 'GET', 33 | 'css' => 'GET', 34 | ); 35 | } 36 | 37 | private $id; 38 | public function __construct($url, $id) { 39 | $this->id = $id; 40 | parent::__construct($url); 41 | } 42 | 43 | public function getID() { 44 | return $this->id; 45 | } 46 | 47 | protected function getElementPath($element_id) { 48 | return preg_replace(sprintf('/%s$/', $this->id), $element_id, $this->url); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /plugins/anchor/anchor.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('anchor', function(K) { 11 | var self = this, name = 'anchor', lang = self.lang(name + '.'); 12 | self.plugin.anchor = { 13 | edit : function() { 14 | var html = ['
        ', 15 | '
        ', 16 | '', 17 | '', 18 | '
        ', 19 | '
        '].join(''); 20 | var dialog = self.createDialog({ 21 | name : name, 22 | width : 300, 23 | title : self.lang(name), 24 | body : html, 25 | yesBtn : { 26 | name : self.lang('yes'), 27 | click : function(e) { 28 | self.insertHtml('').hideDialog().focus(); 29 | } 30 | } 31 | }); 32 | var div = dialog.div, 33 | nameBox = K('input[name="name"]', div); 34 | var img = self.plugin.getSelectedAnchor(); 35 | if (img) { 36 | nameBox.val(unescape(img.attr('data-ke-name'))); 37 | } 38 | nameBox[0].focus(); 39 | nameBox[0].select(); 40 | }, 41 | 'delete' : function() { 42 | self.plugin.getSelectedAnchor().remove(); 43 | } 44 | }; 45 | self.clickToolbar(name, self.plugin.anchor.edit); 46 | }); 47 | -------------------------------------------------------------------------------- /test/webdriver/php-webdriver/WebDriver.php: -------------------------------------------------------------------------------- 1 | 'GET', 20 | ); 21 | } 22 | 23 | public function session( 24 | $browser = 'firefox', 25 | $additional_capabilities = array()) { 26 | 27 | $desired_capabilities = array_merge( 28 | $additional_capabilities, 29 | array('browserName' => $browser)); 30 | 31 | $results = $this->curl( 32 | 'POST', 33 | '/session', 34 | array('desiredCapabilities' => $desired_capabilities), 35 | array(CURLOPT_FOLLOWLOCATION => true)); 36 | 37 | return new WebDriverSession($results['info']['url']); 38 | } 39 | 40 | public function sessions() { 41 | $result = $this->curl('GET', '/sessions'); 42 | $sessions = array(); 43 | foreach ($result['value'] as $session) { 44 | $sessions[] = new WebDriverSession( 45 | $this->url . '/session/' . $session['id']); 46 | } 47 | return $sessions; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /test/hidden.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | KindEditor Test 7 | 8 | 9 |

        KindEditor Test

        10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /php/qiniu/vendor/composer/installed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "qiniu/php-sdk", 4 | "version": "v7.2.1", 5 | "version_normalized": "7.2.1.0", 6 | "source": { 7 | "type": "git", 8 | "url": "https://github.com/qiniu/php-sdk.git", 9 | "reference": "8c7ba738bd4443ee3569a07441913b07c4b2c4a2" 10 | }, 11 | "dist": { 12 | "type": "zip", 13 | "url": "https://api.github.com/repos/qiniu/php-sdk/zipball/8c7ba738bd4443ee3569a07441913b07c4b2c4a2", 14 | "reference": "8c7ba738bd4443ee3569a07441913b07c4b2c4a2", 15 | "shasum": "" 16 | }, 17 | "require": { 18 | "php": ">=5.3.3" 19 | }, 20 | "require-dev": { 21 | "phpunit/phpunit": "~4.0", 22 | "squizlabs/php_codesniffer": "~2.3" 23 | }, 24 | "time": "2017-08-26 00:46:11", 25 | "type": "library", 26 | "installation-source": "source", 27 | "autoload": { 28 | "psr-4": { 29 | "Qiniu\\": "src/Qiniu" 30 | }, 31 | "files": [ 32 | "src/Qiniu/functions.php" 33 | ] 34 | }, 35 | "notification-url": "https://packagist.org/downloads/", 36 | "license": [ 37 | "MIT" 38 | ], 39 | "authors": [ 40 | { 41 | "name": "Qiniu", 42 | "email": "sdk@qiniu.com", 43 | "homepage": "http://www.qiniu.com" 44 | } 45 | ], 46 | "description": "Qiniu Resource (Cloud) Storage SDK for PHP", 47 | "homepage": "http://developer.qiniu.com/", 48 | "keywords": [ 49 | "cloud", 50 | "qiniu", 51 | "sdk", 52 | "storage" 53 | ] 54 | } 55 | ] 56 | -------------------------------------------------------------------------------- /plugins/wordpaste/wordpaste.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('wordpaste', function(K) { 11 | var self = this, name = 'wordpaste'; 12 | self.clickToolbar(name, function() { 13 | var lang = self.lang(name + '.'), 14 | html = '
        ' + 15 | '
        ' + lang.comment + '
        ' + 16 | '' + 17 | '
        ', 18 | dialog = self.createDialog({ 19 | name : name, 20 | width : 450, 21 | title : self.lang(name), 22 | body : html, 23 | yesBtn : { 24 | name : self.lang('yes'), 25 | click : function(e) { 26 | var str = doc.body.innerHTML; 27 | str = K.clearMsWord(str, self.filterMode ? self.htmlTags : K.options.htmlTags); 28 | self.insertHtml(str).hideDialog().focus(); 29 | } 30 | } 31 | }), 32 | div = dialog.div, 33 | iframe = K('iframe', div), 34 | doc = K.iframeDoc(iframe); 35 | if (!K.IE) { 36 | doc.designMode = 'on'; 37 | } 38 | doc.open(); 39 | doc.write('WordPaste'); 40 | doc.write(''); 41 | if (!K.IE) { 42 | doc.write('
        '); 43 | } 44 | doc.write(''); 45 | doc.close(); 46 | if (K.IE) { 47 | doc.body.contentEditable = 'true'; 48 | } 49 | iframe[0].contentWindow.focus(); 50 | }); 51 | }); 52 | -------------------------------------------------------------------------------- /themes/app.css: -------------------------------------------------------------------------------- 1 | /* 引用样式 */ 2 | blockquote { 3 | padding: 20px; 4 | margin: 20px 0; 5 | border: 1px solid #eee; 6 | border-left-width: 5px; 7 | border-left-color: #ce4844; 8 | border-radius: 3px; 9 | } 10 | blockquote, q { 11 | quotes: none; 12 | } 13 | 14 | /* 表格样式 */ 15 | table { 16 | border-spacing: 0; 17 | border-collapse: collapse; 18 | } 19 | td, 20 | th { 21 | padding: 0; 22 | } 23 | .table { 24 | border-collapse: collapse !important; 25 | } 26 | .table td, 27 | .table th { 28 | background-color: #fff !important; 29 | border: 1px solid #ddd; 30 | } 31 | .table-bordered th, 32 | .table-bordered td { 33 | border: 1px solid #ddd !important; 34 | } 35 | .table { 36 | width: 100%; 37 | max-width: 100%; 38 | margin-bottom: 20px; 39 | } 40 | .table > thead > tr > th, 41 | .table > tbody > tr > th, 42 | .table > tfoot > tr > th, 43 | .table > thead > tr > td, 44 | .table > tbody > tr > td, 45 | .table > tfoot > tr > td { 46 | padding: 8px; 47 | line-height: 1.42857143; 48 | vertical-align: top; 49 | border-top: 1px solid #ddd; 50 | } 51 | .table > thead > tr > th { 52 | vertical-align: bottom; 53 | border-bottom: 2px solid #ddd; 54 | } 55 | .table > caption + thead > tr:first-child > th, 56 | .table > colgroup + thead > tr:first-child > th, 57 | .table > thead:first-child > tr:first-child > th, 58 | .table > caption + thead > tr:first-child > td, 59 | .table > colgroup + thead > tr:first-child > td, 60 | .table > thead:first-child > tr:first-child > td { 61 | border-top: 0; 62 | } 63 | .table > tbody + tbody { 64 | border-top: 2px solid #ddd; 65 | } 66 | .table .table { 67 | background-color: #fff; 68 | } 69 | table col[class*="col-"] { 70 | position: static; 71 | display: table-column; 72 | float: none; 73 | } 74 | table td[class*="col-"], 75 | table th[class*="col-"] { 76 | position: static; 77 | display: table-cell; 78 | float: none; 79 | } 80 | -------------------------------------------------------------------------------- /test/toolbar.js: -------------------------------------------------------------------------------- 1 | 2 | var items = [ 3 | 'source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste', 4 | 'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 5 | 'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript', 6 | 'superscript', '|', 'selectall', '/', 7 | 'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 8 | 'italic', 'underline', 'strikethrough', 'removeformat', '|', 'image', 9 | 'flash', 'media', 'table', 'hr', 'emoticons', 'link', 'unlink', '|', 'about' 10 | ]; 11 | var list = []; 12 | K.each(items, function(i, name) { 13 | if (name == '|') { 14 | list.push(''); 15 | } else if (name == '/') { 16 | list.push('
        '); 17 | } else { 18 | list.push(''); 19 | list.push(''); 20 | } 21 | }); 22 | 23 | var toolbar = K.toolbar({ 24 | src : 'div#toolbar', 25 | width : '100%', 26 | html : list.join(''), 27 | click : function(e, name) { 28 | alert(name); 29 | } 30 | }); 31 | 32 | K('#enable').bind('click', function(e) { 33 | if (toolbar) { 34 | toolbar.disableAll(false); 35 | } 36 | }); 37 | 38 | K('#disable').bind('click', function(e) { 39 | if (toolbar) { 40 | toolbar.disableAll(true); 41 | } 42 | }); 43 | 44 | K('#toggle').bind('click', function(e) { 45 | if (toolbar) { 46 | toolbar.disableAll(); 47 | } 48 | }); 49 | 50 | K('#select').bind('click', function(e) { 51 | if (toolbar) { 52 | toolbar.select('bold'); 53 | } 54 | }); 55 | 56 | K('#unselect').bind('click', function(e) { 57 | if (toolbar) { 58 | toolbar.unselect('bold'); 59 | } 60 | }); 61 | -------------------------------------------------------------------------------- /test/edit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Edit Test 6 | 7 | 8 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |

        KindEditor Edit Test

        35 |
        36 | 52 |
        53 |
        54 |
        55 |
        56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /test/widget.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Widget Test 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |

        KindEditor Widget Test

        35 | 36 | 37 |
        38 |
        39 | 40 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /test/menu.js: -------------------------------------------------------------------------------- 1 | 2 | var menu = null; 3 | K('#menu').bind('click', function(e) { 4 | if (menu) { 5 | menu.remove(); 6 | menu = null; 7 | } else { 8 | var menuPos = K('#menu').pos(); 9 | menu = K.menu({ 10 | width : 200, 11 | x : menuPos.x, 12 | y : menuPos.y + K('#menu').height(), 13 | z : 19811212, 14 | centerLineMode : false 15 | }); 16 | K.each('9px,10px,12px,14px,16px,18px,24px,32px'.split(','), function(i, val) { 17 | menu.addItem({ 18 | title : '' + val + '', 19 | click : function() { 20 | alert(val); 21 | }, 22 | height : parseInt(val, 10) + 12, 23 | checked : val === '12px' 24 | }); 25 | }); 26 | } 27 | }); 28 | 29 | var contextmenu = null; 30 | K('#contextmenu').bind('click', function(e) { 31 | if (contextmenu) { 32 | contextmenu.remove(); 33 | contextmenu = null; 34 | } else { 35 | var contextmenuPos = K('#contextmenu').pos(); 36 | contextmenu = K.menu({ 37 | width : 200, 38 | x : contextmenuPos.x, 39 | y : contextmenuPos.y + K('#contextmenu').height(), 40 | z : 19811213 41 | }); 42 | K.each('image,flash,media,-,bold,cut,copy,paste,-,selectall'.split(','), function(i, val) { 43 | contextmenu.addItem({ 44 | title : val, 45 | click : function() { 46 | alert(val); 47 | }, 48 | iconClass : 'ke-icon-' + val 49 | }); 50 | }); 51 | } 52 | }); 53 | 54 | var colorpicker = null; 55 | K('#colorpicker').bind('click', function(e) { 56 | if (colorpicker) { 57 | colorpicker.remove(); 58 | colorpicker = null; 59 | } else { 60 | var colorpickerPos = K('#colorpicker').pos(); 61 | colorpicker = K.colorpicker({ 62 | x : colorpickerPos.x, 63 | y : colorpickerPos.y + K('#colorpicker').height(), 64 | z : 19811214, 65 | selectedColor : 'default', 66 | noColor : '无颜色', 67 | click : function(color) { 68 | alert(color); 69 | } 70 | }); 71 | } 72 | }); -------------------------------------------------------------------------------- /test/range.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Unittest 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

        KindEditor Unittest

        20 |

        21 |
          22 | 23 | 24 | 31 | 32 | 36 | 37 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /plugins/map/map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 53 | 54 | 55 |
          56 | 57 | -------------------------------------------------------------------------------- /test/selector.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Unittest 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |

          KindEditor Unittest

          19 |

          20 |
            21 | 22 | 23 | 32 | 33 | 40 | 41 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /php/qiniu/config.php: -------------------------------------------------------------------------------- 1 | curl( 20 | 'POST', 21 | '/element', 22 | array( 23 | 'using' => $using, 24 | 'value' => $value)); 25 | } catch (NoSuchElementWebDriverError $e) { 26 | throw new NoSuchElementWebDriverError( 27 | sprintf( 28 | 'Element not found with %s, %s', 29 | $using, 30 | $value) . "\n\n" . $e->getMessage(), 31 | $e->getResults()); 32 | } 33 | 34 | return $this->webDriverElement($results['value']); 35 | } 36 | 37 | public function elements($using, $value) { 38 | $results = $this->curl( 39 | 'POST', 40 | '/elements', 41 | array( 42 | 'using' => $using, 43 | 'value' => $value 44 | )); 45 | 46 | return array_filter(array_map( 47 | array($this, 'webDriverElement'), $results['value'])); 48 | } 49 | 50 | protected function webDriverElement($value) { 51 | return array_key_exists('ELEMENT', (array) $value) ? 52 | new WebDriverElement( 53 | $this->getElementPath($value['ELEMENT']), // url 54 | $value['ELEMENT']) : // id 55 | null; 56 | } 57 | 58 | 59 | abstract protected function getElementPath($element_id); 60 | } 61 | -------------------------------------------------------------------------------- /test/total.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | KindEditor Test 7 | 8 | 9 |

            KindEditor Test

            10 |
            11 | 12 |
            13 | 14 |
            15 | 16 |
            17 | 18 |
            19 | 20 |
            21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 56 |
            57 | 58 | 59 | -------------------------------------------------------------------------------- /php/qiniu/file_manager_json.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | 12 | use Qiniu\Auth; 13 | use Qiniu\Storage\BucketManager; 14 | 15 | require_once "vendor/autoload.php"; 16 | require_once "../JsonResult.php"; 17 | require_once "config.php"; 18 | require_once "../functions.php"; 19 | 20 | $page = intval($_GET["page"]); 21 | $fileType = trim($_GET['fileType']); 22 | if ($fileType == '') { 23 | $fileType = "image"; 24 | } 25 | $marker = trim($_GET['marker']); //上次列举返回的位置标记,作为本次列举的起点信息。 26 | 27 | if ($marker == "no_records") { 28 | \JsonResult::fail("没有更多的文件了"); 29 | } 30 | 31 | // 构建鉴权对象 32 | $auth = new Auth(QINIU_ACCESS_KEY, QINIU_SECRET_KEY); 33 | $bucketManager = new BucketManager($auth); 34 | 35 | // 要列取文件的公共前缀 36 | $prefix = $fileType."-"; 37 | 38 | // 本次列举的条目数 39 | $limit = 15; 40 | $delimiter = '/'; 41 | list($ret, $err) = $bucketManager->listFiles(QINIU_TEST_BUCKET, $prefix, $marker, $limit, $delimiter); 42 | $result = new \JsonResult(); 43 | if ($err !== null) { 44 | $result->setCode(\JsonResult::CODE_FAIL); 45 | $result->setMessage($err); 46 | } else { 47 | $files = array(); 48 | $result->setCode(\JsonResult::CODE_SUCCESS); 49 | foreach($ret["items"] as $value) { 50 | $filename = $value['key']; 51 | if (strpos($value['mimeType'], 'image') !== false) { //如果是图片则获取尺寸 52 | $imgSize = getImgSize($value['key']); 53 | } 54 | array_push($files, array( 55 | "thumbURL" => QINIU_BUCKET_DOMAIN.$filename, 56 | "oriURL" => QINIU_BUCKET_DOMAIN.$filename, 57 | "filesize" => $value['fsize'], 58 | "width" => intval($imgSize["width"]), 59 | "height" => intval($imgSize["height"]))); 60 | } 61 | $result->setData($files); 62 | if (array_key_exists('marker', $ret)) { 63 | $result->setExtra($ret['marker']); 64 | } else { 65 | $result->setExtra("no_records"); 66 | } 67 | } 68 | $result->output(); 69 | -------------------------------------------------------------------------------- /test/node.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Unittest 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |

            KindEditor Unittest

            23 |

            24 |
              25 | 26 | 27 |
              28 |

              29 | abcdefghijkxyz
              30 | 0123456789
              31 |

              32 |
              div area
              33 |
              div area 2
              34 | 35 |
              36 | 37 | 44 | 45 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /php/default/import.php: -------------------------------------------------------------------------------- 1 | $fileUrl, 58 | "oriURL" => $fileUrl, 59 | "filesize" => $filesize, 60 | "width" => intval($size[0]), 61 | "height" => intval($size[1]) 62 | ]; 63 | $db->putLine($data); 64 | tprint("添加路径: {$fileUrl}"); 65 | } 66 | } 67 | 68 | closedir($handler); 69 | } 70 | 71 | /** 72 | * 终端打印函数 73 | * @param $message 74 | */ 75 | function tprint($message) { 76 | printf("\033[32m\033[1m{$message}\033[0m\n"); 77 | } 78 | -------------------------------------------------------------------------------- /plugins/quickformat/quickformat.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('quickformat', function(K) { 11 | var self = this, name = 'quickformat', 12 | blockMap = K.toMap('blockquote,center,div,h1,h2,h3,h4,h5,h6,p'); 13 | function getFirstChild(knode) { 14 | var child = knode.first(); 15 | while (child && child.first()) { 16 | child = child.first(); 17 | } 18 | return child; 19 | } 20 | self.clickToolbar(name, function() { 21 | self.focus(); 22 | var doc = self.edit.doc, 23 | range = self.cmd.range, 24 | child = K(doc.body).first(), next, 25 | nodeList = [], subList = [], 26 | bookmark = range.createBookmark(true); 27 | while(child) { 28 | next = child.next(); 29 | var firstChild = getFirstChild(child); 30 | if (!firstChild || firstChild.name != 'img') { 31 | if (blockMap[child.name]) { 32 | child.html(child.html().replace(/^(\s| | )+/ig, '')); 33 | child.css('text-indent', '2em'); 34 | } else { 35 | subList.push(child); 36 | } 37 | if (!next || (blockMap[next.name] || blockMap[child.name] && !blockMap[next.name])) { 38 | if (subList.length > 0) { 39 | nodeList.push(subList); 40 | } 41 | subList = []; 42 | } 43 | } 44 | child = next; 45 | } 46 | K.each(nodeList, function(i, subList) { 47 | var wrapper = K('

              ', doc); 48 | subList[0].before(wrapper); 49 | K.each(subList, function(i, knode) { 50 | wrapper.append(knode); 51 | }); 52 | }); 53 | range.moveToBookmark(bookmark); 54 | self.addBookmark(); 55 | }); 56 | }); 57 | 58 | /** 59 | -------------------------- 60 | abcd
              61 | 1234
              62 | 63 | to 64 | 65 |

              66 | abcd
              67 | 1234
              68 |

              69 | 70 | -------------------------- 71 | 72 |   abcd1233 73 |

              1234

              74 | 75 | to 76 | 77 |

              abcd1233

              78 |

              1234

              79 | 80 | -------------------------- 81 | */ -------------------------------------------------------------------------------- /test/event.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Event Test 6 | 7 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |

              KindEditor Event Test

              29 |

              30 |
                31 |
                32 | outer event: 40 | inner event: 49 | event method: 55 |
                56 | 57 |
                58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /plugins/template/template.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('template', function(K) { 11 | var self = this, name = 'template', lang = self.lang(name + '.'), 12 | htmlPath = self.pluginsPath + name + '/html/'; 13 | function getFilePath(fileName) { 14 | return htmlPath + fileName + '?ver=' + encodeURIComponent(K.DEBUG ? K.TIME : K.VERSION); 15 | } 16 | self.clickToolbar(name, function() { 17 | var lang = self.lang(name + '.'), 18 | arr = ['
                ', 19 | '
                ', 20 | '
                ', 21 | // left start 22 | lang. selectTemplate + ' ', 28 | // right start 29 | ' ', 30 | '
                ', 31 | '
                ', 32 | 33 | //template iframe 34 | '', 35 | '
                '].join(''); 36 | var dialog = self.createDialog({ 37 | name : name, 38 | width : 500, 39 | title : self.lang(name), 40 | body : html, 41 | yesBtn : { 42 | name : self.lang('yes'), 43 | click : function(e) { 44 | var doc = K.iframeDoc(iframe); 45 | self[checkbox[0].checked ? 'html' : 'insertHtml'](doc.body.innerHTML).hideDialog().focus(); 46 | } 47 | } 48 | }); 49 | var selectBox = K('select', dialog.div), 50 | checkbox = K('[name="replaceFlag"]', dialog.div), 51 | iframe = K('iframe', dialog.div); 52 | checkbox[0].checked = true; 53 | iframe.attr('src', getFilePath(selectBox.val())); 54 | selectBox.change(function() { 55 | iframe.attr('src', getFilePath(this.value)); 56 | }); 57 | }); 58 | }); 59 | -------------------------------------------------------------------------------- /test/dialog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Dialog Test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |

                KindEditor Dialog Test

                28 | 29 | 30 |
                31 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /php/qiniu/composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "hash": "950bafd0ae6623c9fdc42a0ef039aac6", 8 | "content-hash": "e0dd4b480ce3ed67ad527554d82237fd", 9 | "packages": [ 10 | { 11 | "name": "qiniu/php-sdk", 12 | "version": "v7.2.1", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/qiniu/php-sdk.git", 16 | "reference": "8c7ba738bd4443ee3569a07441913b07c4b2c4a2" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/qiniu/php-sdk/zipball/8c7ba738bd4443ee3569a07441913b07c4b2c4a2", 21 | "reference": "8c7ba738bd4443ee3569a07441913b07c4b2c4a2", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "php": ">=5.3.3" 26 | }, 27 | "require-dev": { 28 | "phpunit/phpunit": "~4.0", 29 | "squizlabs/php_codesniffer": "~2.3" 30 | }, 31 | "type": "library", 32 | "autoload": { 33 | "psr-4": { 34 | "Qiniu\\": "src/Qiniu" 35 | }, 36 | "files": [ 37 | "src/Qiniu/functions.php" 38 | ] 39 | }, 40 | "notification-url": "https://packagist.org/downloads/", 41 | "license": [ 42 | "MIT" 43 | ], 44 | "authors": [ 45 | { 46 | "name": "Qiniu", 47 | "email": "sdk@qiniu.com", 48 | "homepage": "http://www.qiniu.com" 49 | } 50 | ], 51 | "description": "Qiniu Resource (Cloud) Storage SDK for PHP", 52 | "homepage": "http://developer.qiniu.com/", 53 | "keywords": [ 54 | "cloud", 55 | "qiniu", 56 | "sdk", 57 | "storage" 58 | ], 59 | "time": "2017-08-26 00:46:11" 60 | } 61 | ], 62 | "packages-dev": [], 63 | "aliases": [], 64 | "minimum-stability": "stable", 65 | "stability-flags": [], 66 | "prefer-stable": false, 67 | "prefer-lowest": false, 68 | "platform": [], 69 | "platform-dev": [] 70 | } 71 | -------------------------------------------------------------------------------- /plugins/code/code.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | // google code prettify: http://google-code-prettify.googlecode.com/ 11 | // http://google-code-prettify.googlecode.com/ 12 | 13 | KindEditor.plugin('code', function(K) { 14 | var self = this, name = 'code'; 15 | self.clickToolbar(name, function() { 16 | var lang = self.lang(name + '.'), 17 | html = ['
                ', 18 | '
                ', 19 | '', 37 | '
                ', 38 | '', 39 | '
                '].join(''), 40 | dialog = self.createDialog({ 41 | name : name, 42 | width : 450, 43 | title : self.lang(name), 44 | body : html, 45 | yesBtn : { 46 | name : self.lang('yes'), 47 | click : function(e) { 48 | var type = K('.ke-select', dialog.div).val(), 49 | code = textarea.val(), 50 | cls = type === '' ? '' : 'language-' + type, 51 | html = '
                ' + K.escape(code) + '

                '; 52 | if (K.trim(code) === '') { 53 | K.options.errorMsgHandler(lang.pleaseInput, "error"); 54 | textarea[0].focus(); 55 | return; 56 | } 57 | self.insertHtml(html).hideDialog().focus(); 58 | } 59 | } 60 | }), 61 | textarea = K('textarea', dialog.div); 62 | textarea[0].focus(); 63 | }); 64 | }); 65 | -------------------------------------------------------------------------------- /php/qiniu/vendor/composer/autoload_real.php: -------------------------------------------------------------------------------- 1 | = 50600 && !defined('HHVM_VERSION'); 27 | if ($useStaticLoader) { 28 | require_once __DIR__ . '/autoload_static.php'; 29 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitd54131a8e41e2a2e6c26ad98ddf3c990::getInitializer($loader)); 31 | } else { 32 | $map = require __DIR__ . '/autoload_namespaces.php'; 33 | foreach ($map as $namespace => $path) { 34 | $loader->set($namespace, $path); 35 | } 36 | 37 | $map = require __DIR__ . '/autoload_psr4.php'; 38 | foreach ($map as $namespace => $path) { 39 | $loader->setPsr4($namespace, $path); 40 | } 41 | 42 | $classMap = require __DIR__ . '/autoload_classmap.php'; 43 | if ($classMap) { 44 | $loader->addClassMap($classMap); 45 | } 46 | } 47 | 48 | $loader->register(true); 49 | 50 | if ($useStaticLoader) { 51 | $includeFiles = Composer\Autoload\ComposerStaticInitd54131a8e41e2a2e6c26ad98ddf3c990::$files; 52 | } else { 53 | $includeFiles = require __DIR__ . '/autoload_files.php'; 54 | } 55 | foreach ($includeFiles as $fileIdentifier => $file) { 56 | composerRequired54131a8e41e2a2e6c26ad98ddf3c990($fileIdentifier, $file); 57 | } 58 | 59 | return $loader; 60 | } 61 | } 62 | 63 | function composerRequired54131a8e41e2a2e6c26ad98ddf3c990($fileIdentifier, $file) 64 | { 65 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { 66 | require $file; 67 | 68 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /plugins/link/link.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('link', function(K) { 11 | var self = this, name = 'link'; 12 | self.plugin.link = { 13 | edit : function() { 14 | var lang = self.lang(name + '.'), 15 | html = ['
                ', 16 | //url 17 | '
                ', 18 | '', 19 | '
                ', 20 | '', 21 | '
                ', 22 | '
                ', 23 | //type 24 | '
                ', 25 | '', 26 | '
                ', 27 | '', 28 | '
                ', 29 | '
                ', 30 | '
                '].join(""), 31 | dialog = self.createDialog({ 32 | name : name, 33 | width : 450, 34 | title : self.lang(name), 35 | body : html, 36 | yesBtn : { 37 | name : self.lang('yes'), 38 | click : function(e) { 39 | var url = K.trim(urlBox.val()); 40 | if (url == 'http://' || K.invalidUrl(url)) { 41 | K.options.errorMsgHandler(self.lang('invalidUrl'), "error"); 42 | urlBox[0].focus(); 43 | return; 44 | } 45 | self.exec('createlink', url, typeBox.val()).hideDialog().focus(); 46 | } 47 | } 48 | }), 49 | div = dialog.div, 50 | urlBox = K('input[name="url"]', div), 51 | typeBox = K('select[name="type"]', div); 52 | urlBox.val('http://'); 53 | typeBox[0].options[0] = new Option(lang.newWindow, '_blank'); 54 | typeBox[0].options[1] = new Option(lang.selfWindow, ''); 55 | self.cmd.selection(); 56 | var a = self.plugin.getSelectedLink(); 57 | if (a) { 58 | self.cmd.range.selectNode(a[0]); 59 | self.cmd.select(); 60 | urlBox.val(a.attr('data-ke-src')); 61 | typeBox.val(a.attr('target')); 62 | } 63 | urlBox[0].focus(); 64 | urlBox[0].select(); 65 | }, 66 | 'delete' : function() { 67 | self.exec('unlink', null); 68 | } 69 | }; 70 | self.clickToolbar(name, self.plugin.link.edit); 71 | }); 72 | -------------------------------------------------------------------------------- /test/editor.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Unittest 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |

                KindEditor Unittest

                47 |

                KindEditor Unittest

                48 |

                49 |
                  50 |
                  51 |
                  52 | 53 |
                  54 | 55 |
                  56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /src/ajax.js: -------------------------------------------------------------------------------- 1 | 2 | function _loadScript(url, fn) { 3 | 4 | //检查资源是否已经被加载,防止重复加载,浪费资源 5 | if (K.options.resLoadCache[url]) { 6 | return; 7 | } 8 | var head = document.getElementsByTagName('head')[0] || (_QUIRKS ? document.body : document.documentElement), 9 | script = document.createElement('script'); 10 | head.appendChild(script); 11 | K.options.resLoadCache[url] = 1; 12 | script.src = url; 13 | script.charset = 'utf-8'; 14 | script.onload = script.onreadystatechange = function() { 15 | if (!this.readyState || this.readyState === 'loaded') { 16 | if (fn) { 17 | fn(); 18 | } 19 | script.onload = script.onreadystatechange = null; 20 | head.removeChild(script); 21 | } 22 | }; 23 | } 24 | 25 | // 移除URL里的GET参数 26 | function _chopQuery(url) { 27 | var index = url.indexOf('?'); 28 | return index > 0 ? url.substr(0, index) : url; 29 | } 30 | 31 | function _loadStyle(url) { 32 | 33 | //检查资源是否已经被加载,防止重复加载,浪费资源 34 | if (K.options.resLoadCache[url]) { 35 | return; 36 | } 37 | 38 | var head = document.getElementsByTagName('head')[0] || (_QUIRKS ? document.body : document.documentElement), 39 | link = document.createElement('link'), 40 | absoluteUrl = _chopQuery(_formatUrl(url, 'absolute')); 41 | var links = K('link[rel="stylesheet"]', head); 42 | for (var i = 0, len = links.length; i < len; i++) { 43 | if (_chopQuery(_formatUrl(links[i].href, 'absolute')) === absoluteUrl) { 44 | return; 45 | } 46 | } 47 | head.appendChild(link); 48 | K.options.resLoadCache[url] = 1; 49 | link.href = url; 50 | link.rel = 'stylesheet'; 51 | } 52 | 53 | function _ajax(url, fn, method, param, dataType) { 54 | method = method || 'GET'; //POST or GET 55 | dataType = dataType || 'json'; //json or html 56 | var xhr = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); 57 | xhr.open(method, url, true); 58 | xhr.onreadystatechange = function () { 59 | if (xhr.readyState == 4 && xhr.status == 200) { 60 | if (fn) { 61 | var data = _trim(xhr.responseText); 62 | if (dataType == 'json') { 63 | data = _json(data); 64 | } 65 | fn(data); 66 | } 67 | } 68 | }; 69 | if (method == 'POST') { 70 | var params = []; 71 | _each(param, function(key, val) { 72 | params.push(encodeURIComponent(key) + '=' + encodeURIComponent(val)); 73 | }); 74 | try { 75 | xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 76 | } catch (e) {} 77 | xhr.send(params.join('&')); 78 | } else { 79 | xhr.send(null); 80 | } 81 | } 82 | 83 | K.loadScript = _loadScript; 84 | K.loadStyle = _loadStyle; 85 | K.ajax = _ajax; 86 | -------------------------------------------------------------------------------- /src/menu.js: -------------------------------------------------------------------------------- 1 | 2 | // create KMenu class 3 | function KMenu(options) { 4 | this.init(options); 5 | } 6 | _extend(KMenu, KWidget, { 7 | init : function(options) { 8 | var self = this; 9 | options.z = options.z || 811213; 10 | KMenu.parent.init.call(self, options); 11 | self.centerLineMode = _undef(options.centerLineMode, true); 12 | self.div.addClass('ke-menu ke-menu-'+options.themeType).bind('click,mousedown', function(e){ 13 | e.stopPropagation(); 14 | }).attr('unselectable', 'on'); 15 | }, 16 | addItem : function(item) { 17 | var self = this; 18 | if (item.title === '-') { 19 | self.div.append(K('
                  ')); 20 | return; 21 | } 22 | var itemDiv = K('
                  '), 23 | leftDiv = K('
                  '), 24 | rightDiv = K('
                  '), 25 | height = _addUnit(item.height), 26 | iconClass = _undef(item.iconClass, ''); 27 | self.div.append(itemDiv); 28 | if (height) { 29 | itemDiv.css('height', height); 30 | rightDiv.css('line-height', height); 31 | } 32 | var centerDiv; 33 | if (self.centerLineMode) { 34 | centerDiv = K('
                  '); 35 | if (height) { 36 | centerDiv.css('height', height); 37 | } 38 | } 39 | itemDiv.mouseover(function(e) { 40 | K(this).addClass('ke-menu-item-on'); 41 | if (centerDiv) { 42 | centerDiv.addClass('ke-menu-item-center-on'); 43 | } 44 | }) 45 | .mouseout(function(e) { 46 | K(this).removeClass('ke-menu-item-on'); 47 | if (centerDiv) { 48 | centerDiv.removeClass('ke-menu-item-center-on'); 49 | } 50 | }) 51 | .click(function(e) { 52 | item.click.call(K(this)); 53 | e.stopPropagation(); 54 | }) 55 | .append(leftDiv); 56 | if (centerDiv) { 57 | itemDiv.append(centerDiv); 58 | } 59 | itemDiv.append(rightDiv); 60 | if (item.checked) { 61 | iconClass = 'ke-icon-checked'; 62 | } 63 | if (iconClass !== '') { 64 | leftDiv.html(''); 65 | } 66 | rightDiv.html(item.title); 67 | return self; 68 | }, 69 | remove : function() { 70 | var self = this; 71 | if (self.options.beforeRemove) { 72 | self.options.beforeRemove.call(self); 73 | } 74 | K('.ke-menu-item', self.div[0]).unbind(); 75 | KMenu.parent.remove.call(self); 76 | return self; 77 | } 78 | }); 79 | 80 | function _menu(options) { 81 | return new KMenu(options); 82 | } 83 | 84 | K.MenuClass = KMenu; 85 | K.menu = _menu; 86 | -------------------------------------------------------------------------------- /src/colorpicker.js: -------------------------------------------------------------------------------- 1 | 2 | // create KColorPicker class 3 | function KColorPicker(options) { 4 | this.init(options); 5 | } 6 | _extend(KColorPicker, KWidget, { 7 | init : function(options) { 8 | var self = this; 9 | options.z = options.z || 811213; 10 | KColorPicker.parent.init.call(self, options); 11 | var colors = options.colors || [ 12 | ['#E53333', '#E56600', '#FF9900', '#64451D', '#DFC5A4', '#FFE500'], 13 | ['#009900', '#006600', '#99BB00', '#B8D100', '#60D978', '#00D5FF'], 14 | ['#337FE5', '#003399', '#4C33E5', '#9933E5', '#CC33E5', '#EE33EE'], 15 | ['#FFFFFF', '#CCCCCC', '#999999', '#666666', '#333333', '#000000'] 16 | ]; 17 | self.selectedColor = (options.selectedColor || '').toLowerCase(); 18 | self._cells = []; 19 | self.div.addClass('ke-colorpicker').bind('click,mousedown', function(e){ 20 | e.stopPropagation(); 21 | }).attr('unselectable', 'on'); 22 | var table = self.doc.createElement('table'); 23 | self.div.append(table); 24 | table.className = 'ke-colorpicker-table'; 25 | table.cellPadding = 0; 26 | table.cellSpacing = 0; 27 | table.border = 0; 28 | var row = table.insertRow(0), cell = row.insertCell(0); 29 | cell.colSpan = colors[0].length; 30 | self._addAttr(cell, '', 'ke-colorpicker-cell-top'); 31 | for (var i = 0; i < colors.length; i++) { 32 | row = table.insertRow(i + 1); 33 | for (var j = 0; j < colors[i].length; j++) { 34 | cell = row.insertCell(j); 35 | self._addAttr(cell, colors[i][j], 'ke-colorpicker-cell'); 36 | } 37 | } 38 | }, 39 | _addAttr : function(cell, color, cls) { 40 | var self = this; 41 | cell = K(cell).addClass(cls); 42 | if (self.selectedColor === color.toLowerCase()) { 43 | cell.addClass('ke-colorpicker-cell-selected'); 44 | } 45 | cell.attr('title', color || self.options.noColor); 46 | cell.mouseover(function(e) { 47 | K(this).addClass('ke-colorpicker-cell-on'); 48 | }); 49 | cell.mouseout(function(e) { 50 | K(this).removeClass('ke-colorpicker-cell-on'); 51 | }); 52 | cell.click(function(e) { 53 | e.stop(); 54 | self.options.click.call(K(this), color); 55 | }); 56 | if (color) { 57 | cell.append(K('
                  ').css('background-color', color)); 58 | } else { 59 | cell.html(self.options.noColor); 60 | } 61 | K(cell).attr('unselectable', 'on'); 62 | self._cells.push(cell); 63 | }, 64 | remove : function() { 65 | var self = this; 66 | _each(self._cells, function() { 67 | this.unbind(); 68 | }); 69 | KColorPicker.parent.remove.call(self); 70 | return self; 71 | } 72 | }); 73 | 74 | function _colorpicker(options) { 75 | return new KColorPicker(options); 76 | } 77 | 78 | K.ColorPickerClass = KColorPicker; 79 | K.colorpicker = _colorpicker; 80 | -------------------------------------------------------------------------------- /test/html.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KindEditor Unittest 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

                  KindEditor Unittest

                  18 |

                  19 |
                    20 | 21 |
                    22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
                    test
                    32 |
                    123
                    test
                    123
                    33 |
                    34 |
                    test
                    35 |
                    test
                    36 |
                    test
                    37 |
                    test
                    38 |
                    ddd
                    39 |
                    ddd
                    40 |
                    ddd
                    41 |
                    ddd
                    42 |
                    ©
                    43 |
                    44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /plugins/multiimage/multiimage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * HTML5 批量文件上传 3 | * @author yangjian 4 | * @since v4.1.12(2017-09-12) 5 | * @site http://git.oschina.net/blackfox/kindeditor 6 | */ 7 | 8 | KindEditor.plugin('multiimage', function(K) { 9 | var self = this, name = 'multiimage', 10 | uploadJson = K.undef(self.uploadJson, self.basePath + 'php/upload_json.php'), 11 | fileManagerJson = K.undef(self.fileManagerJson, self.basePath + 'php/file_manager_json.php'), 12 | imageSizeLimit = K.undef(self.imageSizeLimit, 2048), //单位KB 13 | imageFileTypes = K.undef(self.imageFileTypes, 'jpg|png|gif|jpeg'), 14 | imageUploadLimit = K.undef(self.imageUploadLimit, 20), 15 | filePostName = K.undef(self.filePostName, 'imgFile'), 16 | lang = self.lang(name + '.'); 17 | 18 | if(typeof jQuery == 'undefined') { 19 | K.options.errorMsgHandler(lang.depJQueryError, "error"); 20 | return; 21 | } else { 22 | K.loadScript(K.options.pluginsPath+name+"/BUpload.js"); 23 | K.loadStyle(K.options.pluginsPath+name+"/css/upload.css"); 24 | } 25 | 26 | //锁屏插件 27 | K.locker = function () { 28 | var docWidth = Math.max(document.documentElement.clientWidth, document.body.clientWidth); 29 | var docHeight = Math.max(document.documentElement.clientHeight, document.body.clientHeight, $(document).height()) + document.documentElement.scrollTop; 30 | return K.widget({ 31 | x : 0, 32 | y : 0, 33 | cls : 'ke-dialog-lock', 34 | width : docWidth, 35 | height : docHeight 36 | }); 37 | } 38 | self.plugin.multiImageDialog = function(options) { 39 | 40 | var clickFn = options.clickFn; 41 | var locker = K.locker(); 42 | locker.show(); 43 | 44 | var dialog = new BUpload({ 45 | src : filePostName, 46 | upload_url : uploadJson, 47 | list_url : fileManagerJson, //图片列表数据获取url 48 | max_filesize : imageSizeLimit, 49 | max_filenum : imageUploadLimit, 50 | ext_allow : imageFileTypes, 51 | lang : lang, 52 | top : self.dialogOffset, 53 | fileType : "image", 54 | errorHandler : K.options.errorMsgHandler, 55 | callback : function(data) { 56 | //console.log(data); 57 | clickFn.call(this, data); 58 | }, 59 | close : function () { 60 | locker.remove(); 61 | } 62 | }); 63 | 64 | return dialog; 65 | }; 66 | self.clickToolbar(name, function() { 67 | self.plugin.multiImageDialog({ 68 | clickFn : function (urlList) { 69 | 70 | if (urlList.length === 0) { 71 | return; 72 | } 73 | K.each(urlList, function(i, data) { 74 | if (self.afterUpload) { 75 | self.afterUpload.call(self, data, data, 'multiimage'); 76 | } 77 | self.exec('insertimage', data); 78 | }); 79 | // Bugfix: [Firefox] 上传图片后,总是出现正在加载的样式,需要延迟执行hideDialog 80 | setTimeout(function() { 81 | self.hideDialog().focus(); 82 | }, 0); 83 | } 84 | }); 85 | }); 86 | }); 87 | -------------------------------------------------------------------------------- /php/functions.php: -------------------------------------------------------------------------------- 1 | 5 | */ 6 | 7 | // 文件上传的根路径 8 | define('BASE_PATH', dirname(__DIR__)."/uploads/"); 9 | // 文件上传路径前缀 10 | define('UPLOAD_PREFIX', date('Ym').'/'.date('d').'/'); 11 | // 文件上传的根 url 12 | define('BASE_URL', dirname(dirname(dirname($_SERVER['PHP_SELF'])))."/uploads/"); 13 | 14 | /** 15 | * 创建多级目录 16 | * @param $dir 17 | */ 18 | function mkdirs($path) { 19 | $files = preg_split('/[\/|\\\]/s', $path); 20 | $_dir = ''; 21 | foreach ($files as $value) { 22 | $_dir .= $value.DIRECTORY_SEPARATOR; 23 | if ( !file_exists($_dir) ) { 24 | mkdir($_dir); 25 | } 26 | } 27 | } 28 | 29 | /** 30 | * 获取文件后缀名 31 | * @param $filename 32 | * @return string 33 | */ 34 | function getFileExt($filename) { 35 | $temp_arr = explode(".", $filename); 36 | $file_ext = array_pop($temp_arr); 37 | return strtolower(trim($file_ext)); 38 | } 39 | 40 | /** 41 | * 显示图片 42 | * @param $image 43 | * @param $img_url 44 | */ 45 | function show_image($image, $img_url) { 46 | 47 | $info = pathinfo($img_url); 48 | switch ( strtolower($info["extension"]) ) { 49 | case "jpg": 50 | case "jpeg": 51 | header('content-type:image/jpg;'); 52 | imagejpeg($image); 53 | break; 54 | 55 | case "gif": 56 | header('content-type:image/gif;'); 57 | imagegif($image); 58 | break; 59 | 60 | case "png": 61 | header('content-type:image/png;'); 62 | imagepng($image); 63 | break; 64 | 65 | default: 66 | header('content-type:image/wbmp;'); 67 | image2wbmp($image); 68 | } 69 | 70 | } 71 | 72 | /** 73 | * 生成新的文件名 74 | * @param $file 75 | * @return string 76 | */ 77 | function genNewFilename($file) { 78 | $extesion = getFileExt($file); 79 | return date("YmdHis") . '_' . rand(10000, 99999) . '.' . $extesion; 80 | } 81 | 82 | /** 83 | * 清空目录 84 | * @param $dirName 85 | * @return bool 86 | */ 87 | function deldir($dirName) { 88 | //节省资源,每天清理一次 89 | $file = "cache.tmp"; 90 | $t = @file_get_contents($file); 91 | $now = time(); 92 | if ($now - intval($t) < 60*60*24) { 93 | return false; 94 | } 95 | file_put_contents($file, $now); 96 | 97 | if(file_exists($dirName) && $handle=opendir($dirName)){ 98 | while(false!==($item = readdir($handle))){ 99 | if($item!= "." && $item != ".."){ 100 | if(file_exists($dirName.'/'.$item) && is_dir($dirName.'/'.$item)){ 101 | delFile($dirName.'/'.$item); 102 | }else{ 103 | @unlink($dirName.'/'.$item); 104 | } 105 | } 106 | } 107 | closedir( $handle); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /php/default/db/SimpleDB.php: -------------------------------------------------------------------------------- 1 | handler = fopen($dataDir.$dbname.'.db', 'a+'); 34 | } 35 | 36 | /** 37 | * 写入一行数据 38 | * @return bool 39 | */ 40 | public function putLine($data) { 41 | 42 | if ($this->handler != null) { 43 | fwrite($this->handler, $this->seralize($data)); 44 | } 45 | return false; 46 | 47 | } 48 | 49 | /** 50 | * 分页获取数据列表 51 | * @param $key 52 | * @return array|null 53 | */ 54 | public function getDataList($page, $pagesize) { 55 | 56 | if($page <= 0) { 57 | $page = 1; 58 | } 59 | $offset = ($page - 1) * $pagesize; 60 | //循环读取数据 61 | $datas = []; 62 | $counter = 0; 63 | while (!feof($this->handler)) { 64 | if ($counter < $offset) { 65 | fgets($this->handler); //移动指针到下一行 66 | $counter++; 67 | continue; 68 | } 69 | if (count($datas) == $pagesize) { 70 | break; 71 | } 72 | $line = fgets($this->handler); 73 | if (!empty($line)) { 74 | $datas[] = $this->unseralize($line); 75 | } 76 | } 77 | 78 | return $datas; 79 | } 80 | 81 | /** 82 | * 序列化数据 83 | * @param $data 84 | * @return string 85 | */ 86 | private function seralize($data) { 87 | 88 | $break = "\n"; //换行符 89 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { 90 | $break = "\r\n"; 91 | } 92 | return json_encode($data, JSON_UNESCAPED_UNICODE).$break; 93 | 94 | } 95 | 96 | /** 97 | * 反序列化 98 | * @param $data 99 | * @return mixed 100 | */ 101 | private function unseralize($data) { 102 | 103 | return json_decode($data, true); 104 | 105 | } 106 | 107 | /** 108 | * 关闭文件 109 | */ 110 | public function __destruct() 111 | { 112 | if ($this->handler != null) { 113 | fclose($this->handler); 114 | } 115 | } 116 | } -------------------------------------------------------------------------------- /php/qiniu/upload_json.php: -------------------------------------------------------------------------------- 1 | 9 | * 文件上传程序 10 | */ 11 | 12 | error_reporting(0); 13 | 14 | use Qiniu\Auth; 15 | use Qiniu\Storage\UploadManager; 16 | 17 | require_once "vendor/autoload.php"; 18 | require_once "../JsonResult.php"; 19 | require_once "config.php"; 20 | require_once "../functions.php"; 21 | 22 | $fileType = trim($_GET['fileType']); 23 | if (empty($fileType)) { 24 | $fileType = "image"; 25 | } 26 | // 构建鉴权对象 27 | $auth = new Auth(QINIU_ACCESS_KEY, QINIU_SECRET_KEY); 28 | // 生成上传 Token 29 | $token = $auth->uploadToken(QINIU_TEST_BUCKET); 30 | 31 | // 要上传文件的本地路径 32 | //$filePath = './php-logo.png'; 33 | $base64 = trim($_POST['base64']); 34 | if ($base64) { 35 | $data = $_POST['img_base64_data']; 36 | $filename = "{$fileType}-".time().".png"; 37 | $res = base64Upload($data, $filename, $token); 38 | $json = new \JsonResult(); 39 | if ($res) { 40 | $res = json_decode($res, true); 41 | $json->setCode(\JsonResult::CODE_SUCCESS); 42 | $json->setData(array('url' => QINIU_BUCKET_DOMAIN.$res['key'])); 43 | } else { 44 | $json->setCode(\JsonResult::CODE_FAIL); 45 | $json->setMessage("上传涂鸦失败!"); 46 | } 47 | $json->output(); 48 | } else { 49 | $filePath = $_FILES['imgFile']['tmp_name']; 50 | $fileExt = getFileExt($_FILES['imgFile']['name']); 51 | 52 | // 返回结果 53 | $json = new \JsonResult(); 54 | //定义允许上传的文件扩展名 55 | $extArr = array( 56 | 'image' => array('gif', 'jpg', 'jpeg', 'png', 'bmp'), 57 | 'flash' => array('swf', 'flv'), 58 | 'media' => array('swf', 'flv', 'mp3', 'wav', 'wma', 'wmv', 'mid', 'avi', 'mpg', 'asf', 'rm', 'rmvb'), 59 | 'file' => array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2'), 60 | ); 61 | //最大文件大小 2MB 62 | $maxSize = 2*1024*1024; 63 | if (!in_array($fileExt, $extArr[$fileType])) { 64 | $json->setCode(\JsonResult::CODE_FAIL); 65 | $json->setMessage("非法的文件后缀名."); 66 | $json->output(); 67 | } 68 | if (filesize($filePath) > $maxSize) { 69 | $json->setCode(\JsonResult::CODE_FAIL); 70 | $json->setMessage("文件大小超出限制 2MB."); 71 | $json->output(); 72 | } 73 | 74 | // 上传到七牛后保存的文件名 75 | $key = $fileType . "-" . time() . mt_rand(1000, 9999) . ".{$fileExt}"; 76 | 77 | // 初始化 UploadManager 对象并进行文件的上传。 78 | $uploadMgr = new UploadManager(); 79 | 80 | // 调用 UploadManager 的 putFile 方法进行文件的上传。 81 | list($ret, $err) = $uploadMgr->putFile($token, $key, $filePath); 82 | if ($err !== null) { 83 | $json->setCode(\JsonResult::CODE_FAIL); 84 | $json->setMessage("上传失败."); 85 | } else { 86 | $json->setCode(\JsonResult::CODE_SUCCESS); 87 | $json->setMessage("上传成功."); 88 | $json->setData(array('url' => QINIU_BUCKET_DOMAIN . $ret['key'])); 89 | } 90 | $json->output(); 91 | } 92 | 93 | -------------------------------------------------------------------------------- /plugins/baidumap/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 百度地图API自定义地图 8 | 9 | 14 | 15 | 16 | 17 | 18 | 19 |
                    20 | 21 | 83 | -------------------------------------------------------------------------------- /test/selector.js: -------------------------------------------------------------------------------- 1 | module('selector'); 2 | 3 | test('query', function() { 4 | var div = K.query('#test-data-01'); 5 | var strong = K.query('#test-data-01 strong'); 6 | 7 | ok(K.query('p', div) === jQuery('p', div).get(0)); 8 | ok(K.query('strong', strong) === null); 9 | ok(K.query('strong', div) === jQuery('strong', div).get(0)); 10 | ok(K.query('img[border]', div) === jQuery('img[border]', div).get(0)); 11 | ok(K.query('img[alt]', div) === null); 12 | ok(K.query('img[border="0"]', div) === jQuery('img[border="0"]', div).get(0)); 13 | ok(K.query('img[border="1"]', div) === null); 14 | ok(typeof K.query('img[src="\\.\\/data\\/logo_180_30\\.gif"]') === 'object'); // note: jquery has a bug 15 | ok(K.query('.test-class') === jQuery('.test-class').get(0)); 16 | ok(K.query('.test-class', document.body) === jQuery('.test-class').get(0)); 17 | ok(K.query('[class="test-class"]') === jQuery('[class="test-class"]').get(0)); 18 | ok(K.query('[id="test-data-01"]') === jQuery('[id="test-data-01"]').get(0)); 19 | ok(K.query('img.test-class') === null); 20 | ok(K.query('img#test-data-01') === null); 21 | ok(K.query('div#escaped-id\\:\\.') === jQuery('div#escaped-id\\:\\.').get(0)); 22 | ok(K.query('input[name="escaped-name\\:\\."]') === jQuery('input[name="escaped-name\\:\\."]').get(0)); 23 | ok(K.query('input[name="escaped-name\\:\\."]', div) === jQuery('input[name="escaped-name\\:\\."]').get(0)); 24 | ok(K.query('img[border="0"]', div) === jQuery('img[border="0"]', div).get(0)); 25 | ok(K.query('img[border]', div) === jQuery('img[border]', div).get(0)); 26 | ok(K.query('.test-class') === jQuery('.test-class').get(0)); 27 | ok(K.query('img #test-data-01') === null); 28 | ok(K.query('body #test-data-01') === jQuery('body #test-data-01').get(0)); 29 | 30 | ok(K.query('div#test-data-01 strong') === jQuery('div#test-data-01 strong').get(0)); 31 | ok(K.query('div#test-data-01 p strong') === jQuery('div#test-data-01 p strong').get(0)); 32 | ok(K.query('div#test-data-01 > p > strong') === jQuery('div#test-data-01 > p > strong').get(0)); 33 | ok(K.query('div#test-data-01>p>strong') === jQuery('div#test-data-01>p>strong').get(0)); 34 | ok(K.query('div#test-data-01 > p > img[border="0"]') === jQuery('div#test-data-01 > p > img[border="0"]').get(0)); 35 | ok(K.query('div#test-data-01 > strong', document, false) === null); 36 | }); 37 | 38 | test('queryAll', function() { 39 | var div = K.query('#test-data-01'); 40 | var strong = K.query('#test-data-01 strong'); 41 | 42 | ok(K.queryAll('*').length === jQuery('*').length); 43 | ok(K.queryAll('div').length === jQuery('div').length); 44 | ok(K.queryAll('.test-class').length === jQuery('.test-class').length); 45 | ok(K.queryAll('*', div).length === jQuery('*', div).length); 46 | ok(K.queryAll('[border]', div).length === jQuery('[border]', div).length); 47 | ok(K.queryAll('[border="0"]', div).length === jQuery('[border="0"]', div).length); 48 | ok(K.queryAll('[border="1"]', div).length === jQuery('[border="1"]', div).length); 49 | ok(K.queryAll('div', div).length === jQuery('div', div).length); 50 | ok(K.queryAll('p *', div).length === jQuery('p *', div).length); 51 | ok(K.queryAll('strong', div).length === jQuery('strong', div).length); 52 | ok(K.queryAll('strong', strong).length === jQuery('strong', strong).length); 53 | ok(K.queryAll('div p').length === jQuery('div p').length); 54 | ok(K.queryAll('div,.test-class').length === jQuery('div,test-class').length); 55 | }); 56 | -------------------------------------------------------------------------------- /plugins/multiimage/template/template.html: -------------------------------------------------------------------------------- 1 |
                    2 |
                    3 |
                    4 | 多图上传 5 |
                    6 |
                    7 |
                    8 | 9 |
                    10 |
                    11 | 本地上传 12 | 文件服务器 13 | 图片搜索 14 |
                    15 | 16 |
                    17 |
                    18 |
                    19 |
                    20 |
                    点击选择图片
                    21 | 22 |
                    23 |
                    24 | 25 | 54 |
                    55 | 56 |
                    57 |
                    58 |
                      59 |
                    • 60 | 61 | "> 62 |
                    • 63 |
                    64 |
                    (⊙o⊙)亲,没有多数据了。
                    65 |
                    66 |
                    67 | 68 | 85 | 86 |
                    87 |
                    88 | 89 |
                    90 | 91 |
                    92 | 确认 93 | 取消 94 |
                    95 |
                    -------------------------------------------------------------------------------- /test/webdriver/php-webdriver/WebDriverExceptions.php: -------------------------------------------------------------------------------- 1 | results = $results; 24 | } 25 | 26 | public function getResults() { 27 | return $this->results; 28 | } 29 | } 30 | 31 | class IndexOutOfBoundsWebDriverError extends WebDriverException {} // 1 32 | class NoCollectionWebDriverError extends WebDriverException {} // 2 33 | class NoStringWebDriverError extends WebDriverException {} // 3 34 | class NoStringLengthWebDriverError extends WebDriverException {} // 4 35 | class NoStringWrapperWebDriverError extends WebDriverException {} // 5 36 | class NoSuchDriverWebDriverError extends WebDriverException {} // 6 37 | class NoSuchElementWebDriverError extends WebDriverException {} // 7 38 | class NoSuchFrameWebDriverError extends WebDriverException {} // 8 39 | class UnknownCommandWebDriverError extends WebDriverException {} // 9 40 | class ObsoleteElementWebDriverError extends WebDriverException {} // 10 41 | class ElementNotDisplayedWebDriverError extends WebDriverException {} // 11 42 | class InvalidElementStateWebDriverError extends WebDriverException {} // 12 43 | class UnhandledWebDriverError extends WebDriverException {} // 13 44 | class ExpectedWebDriverError extends WebDriverException {} // 14 45 | class ElementNotSelectableWebDriverError extends WebDriverException {} // 15 46 | class NoSuchDocumentWebDriverError extends WebDriverException {} // 16 47 | class UnexpectedJavascriptWebDriverError extends WebDriverException {} // 17 48 | class NoScriptResultWebDriverError extends WebDriverException {} // 18 49 | class XPathLookupWebDriverError extends WebDriverException {} // 19 50 | class NoSuchCollectionWebDriverError extends WebDriverException {} // 20 51 | class TimeOutWebDriverError extends WebDriverException {} // 21 52 | class NullPointerWebDriverError extends WebDriverException {} // 22 53 | class NoSuchWindowWebDriverError extends WebDriverException {} // 23 54 | class InvalidCookieDomainWebDriverError extends WebDriverException {} // 24 55 | class UnableToSetCookieWebDriverError extends WebDriverException {} // 25 56 | class UnexpectedAlertOpenWebDriverError extends WebDriverException {} // 26 57 | class NoAlertOpenWebDriverError extends WebDriverException {} // 27 58 | class ScriptTimeoutWebDriverError extends WebDriverException {} // 28 59 | class InvalidElementCoordinatesWebDriverError extends WebDriverException {}// 29 60 | class IMENotAvailableWebDriverError extends WebDriverException {} // 30 61 | class IMEEngineActivationFailedWebDriverError extends WebDriverException {}// 31 62 | class InvalidSelectorWebDriverError extends WebDriverException {} // 32 63 | -------------------------------------------------------------------------------- /plugins/baidumap/baidumap.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | // Baidu Maps: http://dev.baidu.com/wiki/map/index.php?title=%E9%A6%96%E9%A1%B5 11 | 12 | KindEditor.plugin('baidumap', function(K) { 13 | var self = this, name = 'baidumap', lang = self.lang(name + '.'); 14 | var mapWidth = K.undef(self.mapWidth, 558); 15 | var mapHeight = K.undef(self.mapHeight, 360); 16 | self.clickToolbar(name, function() { 17 | var html = ['
                    ', 18 | '
                    ', 19 | // right start 20 | '
                    ' + lang.address, 21 | ' ', 22 | '', 23 | '', 24 | '', 25 | ' ', 26 | '
                    ', 27 | '
                    ', 28 | 29 | //map iframe 30 | '
                    ', 31 | '
                    '].join(''); 32 | var dialog = self.createDialog({ 33 | name : name, 34 | width : mapWidth + 42, 35 | title : self.lang(name), 36 | body : html, 37 | yesBtn : { 38 | name : self.lang('yes'), 39 | click : function(e) { 40 | var map = win.map; 41 | var centerObj = map.getCenter(); 42 | var center = centerObj.lng + ',' + centerObj.lat; 43 | var zoom = map.getZoom(); 44 | var url = [checkbox[0].checked ? self.pluginsPath + 'baidumap/index.html' : 'http://api.map.baidu.com/staticimage', 45 | '?center=' + encodeURIComponent(center), 46 | '&zoom=' + encodeURIComponent(zoom), 47 | '&width=' + mapWidth, 48 | '&height=' + mapHeight, 49 | '&markers=' + encodeURIComponent(center), 50 | '&markerStyles=' + encodeURIComponent('l,A')].join(''); 51 | if (checkbox[0].checked) { 52 | self.insertHtml(''); 53 | } else { 54 | self.exec('insertimage', url); 55 | } 56 | self.hideDialog().focus(); 57 | } 58 | }, 59 | beforeRemove : function() { 60 | searchBtn.remove(); 61 | if (doc) { 62 | doc.write(''); 63 | } 64 | iframe.remove(); 65 | } 66 | }); 67 | var div = dialog.div, 68 | addressBox = K('[name="address"]', div), 69 | searchBtn = K('[name="searchBtn"]', div), 70 | checkbox = K('[name="insertDynamicMap"]', dialog.div), 71 | win, doc; 72 | var iframe = K(''); 73 | function ready() { 74 | win = iframe[0].contentWindow; 75 | doc = K.iframeDoc(iframe); 76 | } 77 | iframe.bind('load', function() { 78 | iframe.unbind('load'); 79 | if (K.IE) { 80 | ready(); 81 | } else { 82 | setTimeout(ready, 0); 83 | } 84 | }); 85 | K('.ke-map', div).replaceWith(iframe); 86 | // search map 87 | searchBtn.click(function() { 88 | win.search(addressBox.val()); 89 | }); 90 | }); 91 | }); 92 | -------------------------------------------------------------------------------- /plugins/graft/css/scrawl.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAAA;EACE;AACF,IAAK;EAED,MAAM,EAAE,CAAC;EACT,MAAC;IAAC,eAAe,EAAE,IAAI;EACvB,OAAE;IAAC,UAAU,EAAE,MAAM;EAErB,kBAAa;IACT,MAAM,EAAE,cAAc;IACtB,aAAa,EAAE,GAAG;IAClB,UAAU,EAAC,mBAAmB;EAElC,OAAG;IAAC,UAAU,EAAE,MAAM;EAEtB,oBAAgB;IACZ,WAAW,EAAE,GAAG;EAEpB,iBAAa;IACT,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,CAAC;IACP,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,MAAM;IAIjB,sBAAK;MACD,KAAK,EAAC,IAAI;MAEV,iCAAU;QACN,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,SAAS;QAEjB,6CAAW;UACP,QAAQ,EAAE,QAAQ;UAClB,IAAI,EAAC,CAAC;UACN,GAAG,EAAC,CAAC;UACL,OAAO,EAAE,GAAG;QAGhB,2CAAS;UACL,MAAM,EAAE,IAAI;UACZ,UAAU,EAAE,MAAM;UAClB,MAAM,EAAE,OAAO;MAIvB,kCAAW;QACP,UAAU,EAAC,IAAI;QACf,SAAS,EAAC,IAAI;QACd,UAAU,EAAE,MAAM;QAElB,uCAAK;UAAC,WAAW,EAAE,IAAI;QAEvB,yCAAO;UACH,UAAU,EAAC,OAAO;UAClB,MAAM,EAAE,iBAAiB;UACzB,MAAM,EAAE,OAAO;UACf,MAAM,EAAC,OAAO;QAId,kDAAM;UACF,OAAO,EAAE,YAAY;UACrB,KAAK,EAAC,IAAI;UAAC,MAAM,EAAC,IAAI;UACtB,gBAAgB,EAAE,sBAAsB;QAIhD,mDAAiB;UACb,MAAM,EAAE,OAAO;UACf,UAAU,EAAE,OAAO;UACnB,YAAY,EAAE,OAAO;UAErB,yDAAM;YACF,gBAAgB,EAAE,uBAAuB;QAM7C,kDAAM;UACF,OAAO,EAAE,YAAY;UACrB,KAAK,EAAC,IAAI;UACV,MAAM,EAAC,IAAI;UACX,gBAAgB,EAAE,sBAAsB;QAIhD,mDAAiB;UACb,MAAM,EAAE,OAAO;UACf,UAAU,EAAE,OAAO;UACnB,YAAY,EAAE,OAAO;UAErB,yDAAM;YACF,gBAAgB,EAAE,uBAAuB;QAIjD,8CAAY;UACR,MAAM,EAAE,OAAO;UAEf,oDAAM;YACF,OAAO,EAAE,YAAY;YACrB,KAAK,EAAC,IAAI;YAAC,MAAM,EAAC,IAAI;YACtB,gBAAgB,EAAE,uBAAuB;QAKjD,qDAAmB;UACf,MAAM,EAAE,OAAO;UACf,UAAU,EAAE,OAAO;UACnB,YAAY,EAAE,OAAO;UAErB,2DAAM;YACF,gBAAgB,EAAE,wBAAwB;QAK9C,oDAAM;UACF,OAAO,EAAE,YAAY;UACrB,KAAK,EAAC,IAAI;UAAC,MAAM,EAAC,IAAI;UACtB,gBAAgB,EAAE,uBAAuB;UACzC,MAAM,EAAC,OAAO;QAElB,qDAAO;UACH,gBAAgB,EAAE,wBAAwB;QAG9C,oDAAK;UACD,KAAK,EAAC,IAAI;UACV,MAAM,EAAC,OAAO;IAQ9B,8BAAa;MACT,KAAK,EAAC,KAAK;MACX,KAAK,EAAC,KAAK;MACX,MAAM,EAAC,KAAK;MACZ,QAAQ,EAAE,MAAM;MAEhB,yCAAW;QACP,OAAO,EAAE,YAAY;QACrB,KAAK,EAAC,IAAI;QAAC,MAAM,EAAC,IAAI;QACtB,gBAAgB,EAAE,uBAAuB;MAE7C,0CAAY;QACR,OAAO,EAAE,YAAY;QACrB,KAAK,EAAC,IAAI;QAAC,MAAM,EAAC,IAAI;QACtB,gBAAgB,EAAE,wBAAwB;MAE9C,wCAAU;QACN,OAAO,EAAE,YAAY;QACrB,KAAK,EAAC,IAAI;QAAC,MAAM,EAAC,IAAI;QACtB,UAAU,EAAE,8BAA8B;QAC1C,eAAe,EAAE,SAAS;MAG9B,wCAAU;QACN,UAAU,EAAC,IAAI;QACf,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,MAAM;QAEhB,6CAAK;UACD,KAAK,EAAE,IAAI;UACX,MAAM,EAAE,OAAO;UACf,KAAK,EAAE,IAAI;UACX,MAAM,EAAE,IAAI;UACZ,MAAM,EAAC,iBAAiB;UACxB,aAAa,EAAE,GAAG;UAClB,MAAM,EAAE,OAAO;QAGnB,gDAAQ;UACJ,YAAY,EAAE,OAAO;UACrB,UAAU,EAAC,mBAAmB;MAItC,0CAAY;QACR,UAAU,EAAC,IAAI;QACf,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,MAAM;QAElB,4CAAE;UACE,OAAO,EAAC,YAAY;UACpB,KAAK,EAAC,IAAI;UACV,MAAM,EAAC,IAAI;UACX,KAAK,EAAE,IAAI;UACX,WAAW,EAAE,MAAM;UACnB,OAAO,EAAE,GAAG;QAGhB,iDAAO;UAAC,UAAU,EAAE,2CAA4C;QAChE,iDAAO;UAAC,UAAU,EAAE,6CAA6C;QACjE,iDAAO;UAAC,UAAU,EAAE,6CAA6C;QACjE,iDAAO;UAAC,UAAU,EAAE,6CAA6C;QAEjE,gDAAM;UACF,QAAQ,EAAE,QAAQ;UAClB,GAAG,EAAC,GAAG;QAGP,8DAAM;UACF,OAAO,EAAE,YAAY;UACrB,KAAK,EAAC,IAAI;UAAC,MAAM,EAAC,IAAI;UACtB,gBAAgB,EAAE,sBAAsB;UACxC,eAAe,EAAE,SAAS;QAIlC,mDAAS;UACL,QAAQ,EAAE,QAAQ;UAElB,yDAAM;YACF,OAAO,EAAE,YAAY;YACrB,KAAK,EAAC,IAAI;YAAC,MAAM,EAAC,IAAI;YACtB,gBAAgB,EAAE,wBAAwB;YAC1C,MAAM,EAAC,OAAO;UAGlB,2DAAQ;YACJ,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,IAAI;YAAC,GAAG,EAAE,IAAI;YACpB,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE,CAAC;YACV,MAAM,EAAE,OAAO;YACf,OAAO,EAAE,CAAC;QAKd,2DAAM;UACF,OAAO,EAAE,YAAY;UACrB,KAAK,EAAC,IAAI;UAAC,MAAM,EAAC,IAAI;UACtB,gBAAgB,EAAE,wBAAwB;UAC1C,MAAM,EAAC,OAAO;QAGlB,2DAAK;UAAC,KAAK,EAAC,IAAI;UAAC,MAAM,EAAC,OAAO;QAGnC,4DAAkB;UACd,MAAM,EAAE,OAAO;UAEf,kEAAM;YACF,gBAAgB,EAAE,yBAAyB;UAG/C,kEAAK;YAAC,KAAK,EAAC,IAAI;YAAC,MAAM,EAAC,OAAO;QAInC,mDAAS;UACL,MAAM,EAAE,OAAO;UAEf,yDAAM;YACF,OAAO,EAAE,YAAY;YACrB,KAAK,EAAC,IAAI;YAAC,MAAM,EAAC,IAAI;YACtB,gBAAgB,EAAE,sBAAsB;YACxC,eAAe,EAAE,SAAS;YAC1B,MAAM,EAAC,OAAO;MAM1B,4CAAc;QAAC,MAAM,EAAE,OAAO", 4 | "sources": ["scrawl.scss"], 5 | "names": [], 6 | "file": "scrawl.css" 7 | } -------------------------------------------------------------------------------- /src/uploadbutton.js: -------------------------------------------------------------------------------- 1 | 2 | function KUploadButton(options) { 3 | this.init(options); 4 | } 5 | _extend(KUploadButton, { 6 | init : function(options) { 7 | var self = this, 8 | button = K(options.button), 9 | fieldName = options.fieldName || 'file', 10 | url = options.url || '', 11 | title = button.val(), 12 | extraParams = options.extraParams || {}, 13 | cls = button[0].className || '', 14 | target = options.target || 'kindeditor_upload_iframe_' + new Date().getTime(); 15 | options.afterError = options.afterError || function(str) { 16 | K.options.errorMsgHandler(str, "error"); 17 | }; 18 | 19 | var hiddenElements = []; 20 | for(var k in extraParams){ 21 | hiddenElements.push(''); 22 | } 23 | 24 | var html = [ 25 | '
                    ', 26 | (options.target ? '' : ''), 27 | (options.form ? '
                    ' : '
                    '), 28 | '', 29 | hiddenElements.join(''), 30 | '', 31 | '', 32 | '', 33 | (options.form ? '
                    ' : ''), 34 | '
                    '].join(''); 35 | 36 | var div = K(html, button.doc); 37 | button.hide(); 38 | button.before(div); 39 | 40 | self.div = div; 41 | self.button = button; 42 | self.iframe = options.target ? K('iframe[name="' + target + '"]') : K('iframe', div); 43 | self.form = options.form ? K(options.form) : K('form', div); 44 | self.fileBox = K('.ke-upload-file', div); 45 | var width = options.width || K('.ke-button-common', div).width(); 46 | K('.ke-upload-area', div).width(width); 47 | self.options = options; 48 | }, 49 | submit : function() { 50 | var self = this, 51 | iframe = self.iframe; 52 | iframe.bind('load', function() { 53 | iframe.unbind(); 54 | // 清空file 55 | var tempForm = document.createElement('form'); 56 | self.fileBox.before(tempForm); 57 | K(tempForm).append(self.fileBox); 58 | tempForm.reset(); 59 | K(tempForm).remove(true); 60 | 61 | var doc = K.iframeDoc(iframe), 62 | pre = doc.getElementsByTagName('pre')[0], 63 | str = '', data; 64 | if (pre) { 65 | str = pre.innerHTML; 66 | } else { 67 | str = doc.body.innerHTML; 68 | } 69 | // Bugfix: https://github.com/kindsoft/kindeditor/issues/81 70 | str = _unescape(str); 71 | // Bugfix: [IE] 上传图片后,进度条一直处于加载状态。 72 | iframe[0].src = 'javascript:false'; 73 | try { 74 | data = K.json(str); 75 | } catch (e) { 76 | self.options.afterError.call(self, '' + doc.body.parentNode.innerHTML + ''); 77 | } 78 | if (data) { 79 | self.options.afterUpload.call(self, data); 80 | } 81 | }); 82 | self.form[0].submit(); 83 | return self; 84 | }, 85 | remove : function() { 86 | var self = this; 87 | if (self.fileBox) { 88 | self.fileBox.unbind(); 89 | } 90 | // Bugfix: [IE] 上传图片后,进度条一直处于加载状态。 91 | //self.iframe[0].src = 'javascript:false'; 92 | self.iframe.remove(); 93 | self.div.remove(); 94 | self.button.show(); 95 | return self; 96 | } 97 | }); 98 | 99 | function _uploadbutton(options) { 100 | return new KUploadButton(options); 101 | } 102 | 103 | K.UploadButtonClass = KUploadButton; 104 | K.uploadbutton = _uploadbutton; 105 | 106 | --------------------------------------------------------------------------------