1 | <!DOCTYPE html> |
---|
2 | <!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"><![endif]--> |
---|
3 | <!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]--> |
---|
4 | <!--[if IE 8]><html class="no-js lt-ie9" lang="en"><![endif]--> |
---|
5 | <!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]--> |
---|
6 | <head> |
---|
7 | <title>Encompass</title> |
---|
8 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
---|
9 | <meta http-equiv="content-language" content="en-us" /> |
---|
10 | <!-- SEO --> |
---|
11 | <meta name="author" content="careerbuilder.com" /> |
---|
12 | <meta name="copyright" content="Careerbuilder" /> |
---|
13 | <meta name="description" content="" /> |
---|
14 | <meta name="keywords" content="" /> |
---|
15 | <!-- Mobile Devices --> |
---|
16 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> |
---|
17 | <meta name="viewport" content="target-densitydpi=device-dpi" /> |
---|
18 | <meta name="apple-mobile-web-app-capable" content="yes"> |
---|
19 | <meta name="HandheldFriendly" content="true" /> |
---|
20 | <meta http-equiv="cleartype" content="on"> |
---|
21 | |
---|
22 | <!--<link type="text/css" href="/Content/css/base.css" rel="stylesheet" /> |
---|
23 | <link type="text/css" href="/Content/css/widget.css" rel="stylesheet" />--> |
---|
24 | <!--[if lt IE 9]> |
---|
25 | <script type="text/javascript" src="/Scripts/lib/html5shiv.js"></script> |
---|
26 | <![endif]--> |
---|
27 | <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script> |
---|
28 | <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script> |
---|
29 | <script src="../ckeditor_source.js" type="text/javascript"></script> |
---|
30 | </head> |
---|
31 | <body class="cb"> |
---|
32 | <button id="btn">button</button> |
---|
33 | <script type="text/javascript"> |
---|
34 | $(function () { |
---|
35 | $('body').append("<div id='dialog'><div id='editorId'></div></div>"); |
---|
36 | var $dialog = $("#dialog"); |
---|
37 | |
---|
38 | var html = "<ul style='list-style-type:disc'><li>testsssss</li></ul>"; |
---|
39 | var editorFontFamilyStr = 'andale mono;arial,helvetica,sans-serif;arial black,avant garde;comic sans ms;impact,chicago;times new roman;Garamond;Century Gothic'; |
---|
40 | var editorConfig = { |
---|
41 | width: 445, |
---|
42 | height: 160, |
---|
43 | toolbar: [{ name: 'clipboard', items: ['Bold', 'Underline', 'Italic', 'Font', 'FontSize', 'NumberedList', 'BulletedList', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']}], |
---|
44 | forcePasteAsPlainText: true, |
---|
45 | toolbarCanCollapse: false, |
---|
46 | resize_enabled: false, |
---|
47 | font_defaultLabel: 'arial,helvetica,sans-serif', |
---|
48 | font_names: editorFontFamilyStr, |
---|
49 | removePlugins: 'elementspath', |
---|
50 | startupFocus: true, |
---|
51 | scayt_autoStartup: true |
---|
52 | }; |
---|
53 | |
---|
54 | var editor; |
---|
55 | var $btn = $("#btn"); |
---|
56 | |
---|
57 | $dialog.dialog({ |
---|
58 | autoOpen: false, |
---|
59 | width: 470, |
---|
60 | height: 380, |
---|
61 | dialogClass: 'thisDialogDom', |
---|
62 | close: function(){ |
---|
63 | if (editor) { |
---|
64 | //console.log('destroyed2'); |
---|
65 | editor.destroy(); |
---|
66 | editor = null; |
---|
67 | } |
---|
68 | }, |
---|
69 | buttons: { |
---|
70 | 'cancel': function () { |
---|
71 | $dialog.dialog("close"); |
---|
72 | }, |
---|
73 | 'ok': function () { |
---|
74 | $dialog.dialog("close"); |
---|
75 | } |
---|
76 | } |
---|
77 | }); |
---|
78 | |
---|
79 | $btn.click(function () { |
---|
80 | if($dialog.dialog("isOpen")!== true){ |
---|
81 | if (editor) {//CKEDITOR.instances['editorId'] |
---|
82 | editor.destroy();//CKEDITOR.instances['editorId'] |
---|
83 | } |
---|
84 | editor = CKEDITOR.replace('editorId', editorConfig); |
---|
85 | editor.on('instanceReady', function(evt){ |
---|
86 | evt.editor.setData(html); |
---|
87 | }); |
---|
88 | $dialog.dialog( "open" ); |
---|
89 | } |
---|
90 | }); |
---|
91 | }) |
---|
92 | </script> |
---|
93 | </body> |
---|
94 | </html> |
---|