{"id":12605,"date":"2021-06-12T19:08:57","date_gmt":"2021-06-13T00:08:57","guid":{"rendered":"httpss:\/\/www.powenko.com\/wordpress\/docs\/tinymce\/init%e5%88%9d%e5%a7%8b%e5%8c%96\/%e5%88%9d%e5%a7%8b%e5%8c%96\/"},"modified":"2021-06-14T03:32:59","modified_gmt":"2021-06-14T08:32:59","slug":"%e5%88%9d%e5%a7%8b%e5%8c%96","status":"publish","type":"docs","link":"https:\/\/www.powenko.com\/wordpress\/?docs=tinymce\/init%e5%88%9d%e5%a7%8b%e5%8c%96\/%e5%88%9d%e5%a7%8b%e5%8c%96","title":{"rendered":"\u521d\u59cb\u5316"},"content":{"rendered":"<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&amp;lt;script&amp;gt;\r\n\r\nvar currentAuthor = 'A Tiny User';\r\nvar userAllowedToResolve = 'Admin1';\r\n\r\ntinymce.init({\r\n  selector: '#tiny-ui .editor',\r\n  toolbar: 'bold italic underline | addcomment showcomments',\r\n  menubar: 'file edit view insert format tools tc',\r\n  menu: {\r\n    tc: {\r\n      title: 'TinyComments',\r\n      items: 'addcomment showcomments deleteallconversations'\r\n    }\r\n  },\r\n  plugins: 'paste code tinycomments',\r\n  tinycomments_mode: 'embedded',\r\n  tinycomments_author: currentAuthor,\r\n  tinycomments_can_resolve: function (req, done, fail) {\r\n    var allowed = req.comments.length &amp;gt; 0 &amp;amp;&amp;amp;\r\n                  req.comments&#x5B;0].author === currentAuthor;\r\n    done({\r\n      canResolve: allowed || currentAuthor === userAllowedToResolve\r\n    });\r\n  },\r\n  content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'\r\n});\r\n\r\n&amp;lt;\/script&amp;gt;\r\n&amp;lt;div id=\"tiny-ui\"&amp;gt;\r\n  &amp;lt;textarea class=\"editor\" style=\"width: 100%; height: 500px;\"&amp;gt;\r\n    &amp;lt;h2&amp;gt;Welcome to Tiny Comments!&amp;lt;\/h2&amp;gt;\r\n    &amp;lt;p&amp;gt;Please try out this demo of our new Tiny Comments premium plugin.&amp;lt;\/p&amp;gt;\r\n    &amp;lt;ol&amp;gt;\r\n      &amp;lt;li&amp;gt;Highlight the content you want to comment on.&amp;lt;\/li&amp;gt;\r\n      &amp;lt;li&amp;gt;Click the &amp;lt;em&amp;gt;Add Comment&amp;lt;\/em&amp;gt; icon in the toolbar.&amp;lt;\/li&amp;gt;\r\n      &amp;lt;li&amp;gt;Type your comment into the text field at the bottom of the Comment sidebar.&amp;lt;\/li&amp;gt;\r\n      &amp;lt;li&amp;gt;Click &amp;lt;strong&amp;gt;Save&amp;lt;\/strong&amp;gt;.&amp;lt;\/li&amp;gt;\r\n    &amp;lt;\/ol&amp;gt;\r\n    &amp;lt;p&amp;gt;Your comment is then attached to the text, &amp;lt;span class=\"mce-annotation tox-comment\" data-mce-annotation-uid=\"mce-conversation_19679600221621399703915\" data-mce-annotation=\"tinycomments\"&amp;gt;exactly like this!&amp;lt;\/span&amp;gt;&amp;lt;\/p&amp;gt;\r\n    &amp;lt;p&amp;gt;If you want to take Tiny Comments for a test drive in your own environment, Tiny Comments is one of the premium plugins you can try for free for 30 days by signing up for a Tiny account. Make sure to check out our documentation as well.&amp;lt;\/p&amp;gt;\r\n    &amp;lt;p&amp;gt;And if you are ready to buy, you can either purchase Tiny Comments a la carte or as part of your Tiny Pro subscription. If you are a current cloud user, Tiny Comments has already been added to your key, and if you are a self-hosted user, Tiny Comments is now available in the latest download which you can access in My Account.&amp;lt;\/p&amp;gt;\r\n    &amp;lt;h2&amp;gt;A simple table to play with&amp;lt;\/h2&amp;gt;\r\n    &amp;lt;table style=\"border-collapse: collapse; width: 100%;\" border=\"1\"&amp;gt;\r\n      &amp;lt;thead&amp;gt;\r\n        &amp;lt;tr&amp;gt;\r\n          &amp;lt;th&amp;gt;Product&amp;lt;\/th&amp;gt;\r\n          &amp;lt;th&amp;gt;Value&amp;lt;\/th&amp;gt;\r\n        &amp;lt;\/tr&amp;gt;\r\n      &amp;lt;\/thead&amp;gt;\r\n      &amp;lt;tbody&amp;gt;\r\n        &amp;lt;tr&amp;gt;\r\n          &amp;lt;td&amp;gt;&amp;lt;a href=\"httpsss:\/\/www.tiny.cloud\/\"&amp;gt;Tiny Cloud&amp;lt;\/a&amp;gt;&amp;lt;\/td&amp;gt;\r\n          &amp;lt;td&amp;gt;The easiest and most reliable way to integrate powerful rich text editing into your application.&amp;lt;\/td&amp;gt;\r\n        &amp;lt;\/tr&amp;gt;\r\n        &amp;lt;tr&amp;gt;\r\n          &amp;lt;td&amp;gt;&amp;lt;a href=\"httpsss:\/\/www.tiny.cloud\/drive\/\"&amp;gt;Tiny Drive&amp;lt;\/a&amp;gt;&amp;lt;\/td&amp;gt;\r\n          &amp;lt;td&amp;gt;Image and file management for TinyMCE in the cloud.&amp;lt;\/td&amp;gt;\r\n        &amp;lt;\/tr&amp;gt;\r\n      &amp;lt;\/tbody&amp;gt;\r\n    &amp;lt;\/table&amp;gt;\r\n    &amp;lt;p&amp;gt;Thanks for supporting TinyMCE! We hope it helps your users create great content.&amp;lt;\/p&amp;gt;\r\n    &amp;lt;!--tinycomments|2.1|data:application\/json;base64,eyJtY2UtY29udmVyc2F0aW9uXzE5Njc5NjAwMjIxNjIxMzk5NzAzOTE1Ijp7InVpZCI6Im1jZS1jb252ZXJzYXRpb25fMTk2Nzk2MDAyMjE2MjEzOTk3MDM5MTUiLCJjb21tZW50cyI6W3sidWlkIjoibWNlLWNvbnZlcnNhdGlvbl8xOTY3OTYwMDIyMTYyMTM5OTcwMzkxNSIsImF1dGhvciI6IkFub3RoZXIgVGlueSBVc2VyIiwiYXV0aG9yTmFtZSI6IkFub3RoZXIgVGlueSBVc2VyIiwiY29udGVudCI6IlBsZWFzZSByZXZpc2UgdGhpcyBzZW50ZW5jZSwgZXhjbGFtYXRpb24gcG9pbnRzIGFyZSB1bnByb2Zlc3Npb25hbCEiLCJjcmVhdGVkQXQiOiIyMDIxLTA1LTE5VDA0OjQ4OjIzLjkxNFoiLCJtb2RpZmllZEF0IjoiMjAyMS0wNS0xOVQwNDo0ODoyMy45MTRaIn1dfX0=--&amp;gt;\r\n  &amp;lt;\/textarea&amp;gt;\r\n&amp;lt;\/div&amp;gt;\r\n\r\n<\/pre>\n<p><script async src=\"\/\/jsfiddle.net\/powenko\/e6t4nvpo\/2\/embed\/\"><\/script><\/p>\n","protected":false},"featured_media":0,"parent":12604,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-12605","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/docs\/12605"}],"collection":[{"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12605"}],"version-history":[{"count":3,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/docs\/12605\/revisions"}],"predecessor-version":[{"id":12693,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/docs\/12605\/revisions\/12693"}],"up":[{"embeddable":true,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/docs\/12604"}],"next":[{"title":"\u958b\u767c\u6587\u4ef6\u548c\u8cc7\u6599","link":"https:\/\/www.powenko.com\/wordpress\/?docs=tinymce\/init%e5%88%9d%e5%a7%8b%e5%8c%96\/%e9%96%8b%e7%99%bc%e6%96%87%e4%bb%b6%e5%92%8c%e8%b3%87%e6%96%99","href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/docs\/12692"}],"wp:attachment":[{"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12605"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=12605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}