Commit 21ecd8b4 authored by Vivek's avatar Vivek

updated tinymce to solve failed init issue.

parent a4da3a11
...@@ -115,10 +115,10 @@ ...@@ -115,10 +115,10 @@
\n \n
<link rel="http://www.renderjs.org/rel/interface" href="editor_interface.html"></link>\n <link rel="http://www.renderjs.org/rel/interface" href="editor_interface.html"></link>\n
\n \n
<script src="tinymce/js/tinymce/tinymce.js"></script>\n
<script src="jquery.js"></script>\n <script src="jquery.js"></script>\n
<script src="rsvp.js"></script>\n <script src="rsvp.js"></script>\n
<script src="renderjs.js"></script>\n <script src="renderjs.js"></script>\n
<script src="//tinymce.cachefly.net/4.2/tinymce.min.js"></script>\n
<script src="interface_gadget_tinymce.js" type="text/javascript"></script>\n <script src="interface_gadget_tinymce.js" type="text/javascript"></script>\n
</head>\n </head>\n
<body>\n <body>\n
...@@ -264,7 +264,7 @@ ...@@ -264,7 +264,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>945.33600.34754.53230</string> </value> <value> <string>945.40798.17513.32324</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -282,7 +282,7 @@ ...@@ -282,7 +282,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1441353714.75</float> <float>1441787790.36</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -100,20 +100,23 @@ ...@@ -100,20 +100,23 @@
<item> <item>
<key> <string>text_content</string> </key> <key> <string>text_content</string> </key>
<value> <string>/*jslint indent: 2 */\n <value> <string>/*jslint indent: 2 */\n
/*global window, jQuery, rJS, RSVP*/\n /*global window, jQuery, rJS, RSVP, tinymce*/\n
"use strict";\n "use strict";\n
\n \n
(function (window, $, rJS, RSVP) {\n (function (window, $, rJS, RSVP) {\n
\n \n
rJS(window).\n rJS(window).\n
declareMethod(\'getContent\', function () {\n declareMethod(\'getContent\', function () {\n
var gadget = this;\n
return tinymce.activeEditor.getContent();\n return tinymce.activeEditor.getContent();\n
})\n })\n
.declareMethod(\'setContent\', function (content) {\n .declareMethod(\'setContent\', function (content) {\n
var gadget = this;\n
return tinymce.activeEditor.setContent(content);\n return tinymce.activeEditor.setContent(content);\n
})\n })\n
.declareMethod(\'clearContent\', function () {\n .declareMethod(\'clearContent\', function () {\n
return tinymce.activeEditor.setContent(\'\');\n var gadget = this;\n
return gadget.props.editor.setContent(\'\');\n
})\n })\n
.declareMethod(\'initStateTransfer\', function () {\n .declareMethod(\'initStateTransfer\', function () {\n
var current_state = {},\n var current_state = {},\n
...@@ -128,34 +131,34 @@ ...@@ -128,34 +131,34 @@
});\n });\n
})\n })\n
.declareMethod(\'finishStateTransfer\', function (current_state) {\n .declareMethod(\'finishStateTransfer\', function (current_state) {\n
return this.setContent(current_state.content);\n return this.setContent(current_state.content);co\n
})\n })\n
.declareMethod(\'initSubGadget\', function () {\n .declareMethod(\'initSubGadget\', function () {\n
this.editor = $(\'.textarea\');\n return tinymce.init({\n
tinymce.init({\n selector: "#mytextarea",\n
selector: "#mytextarea",\n theme: "modern",\n
theme: "modern",\n width: \'100%\',\n
width: \'100%\',\n height: \'600\',\n
height: \'600\',\n plugins: [\n
plugins: [\n "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",\n
"advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",\n "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",\n
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",\n "save table contextmenu directionality emoticons template paste textcolor"\n
"save table contextmenu directionality emoticons template paste textcolor"\n ],\n
],\n toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons", \n
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons", \n style_formats: [\n
style_formats: [\n {title: \'Bold text\', inline: \'b\'},\n
{title: \'Bold text\', inline: \'b\'},\n {title: \'Red text\', inline: \'span\', styles: {color: \'#ff0000\'}},\n
{title: \'Red text\', inline: \'span\', styles: {color: \'#ff0000\'}},\n {title: \'Red header\', block: \'h1\', styles: {color: \'#ff0000\'}},\n
{title: \'Red header\', block: \'h1\', styles: {color: \'#ff0000\'}},\n {title: \'Example 1\', inline: \'span\', classes: \'example1\'},\n
{title: \'Example 1\', inline: \'span\', classes: \'example1\'},\n {title: \'Example 2\', inline: \'span\', classes: \'example2\'},\n
{title: \'Example 2\', inline: \'span\', classes: \'example2\'},\n {title: \'Table styles\'},\n
{title: \'Table styles\'},\n {title: \'Table row 1\', selector: \'tr\', classes: \'tablerow1\'}\n
{title: \'Table row 1\', selector: \'tr\', classes: \'tablerow1\'}\n ]\n
] \n
});\n });\n
})\n })\n
\n \n
.ready(function (g) {\n .ready(function (g) {\n
g.props = {};\n
});\n });\n
\n \n
}(window, jQuery, rJS, RSVP));\n }(window, jQuery, rJS, RSVP));\n
...@@ -294,7 +297,7 @@ ...@@ -294,7 +297,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>945.33593.23703.31453</string> </value> <value> <string>945.40809.19530.56627</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -312,7 +315,7 @@ ...@@ -312,7 +315,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1441353720.28</float> <float>1441787867.6</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment