{"id":2382,"date":"2017-08-04T22:10:16","date_gmt":"2017-08-04T13:10:16","guid":{"rendered":"http:\/\/appsweets.net\/blog\/?p=2382"},"modified":"2017-08-04T22:10:16","modified_gmt":"2017-08-04T13:10:16","slug":"integration","status":"publish","type":"post","link":"https:\/\/appsweets.net\/blog\/2017\/08\/04\/integration\/","title":{"rendered":"Integration"},"content":{"rendered":"<div class=\"db9cc8cdb64025d13c1cc9dad0a0e262\" data-index=\"1\" style=\"float: left; margin: 16px 16px 16px 0;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-5825700137064158\";\r\n\/* 250sq, appsweets-blog *\/\r\ngoogle_ad_slot = \"4837931762\";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>wasavi \u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u3001writeas \u3068\u3044\u3046\u3082\u306e\u304c\u3042\u308a\u3001\u3053\u3046\u3044\u3046<a href=\"https:\/\/github.com\/akahuku\/wasavi\/wiki\/Editing-%22content-edltable%22-element#3-new-option-writeas\" target=\"_blank\">\u4ed5\u69d8<\/a>\u306b\u306a\u3063\u3066\u3044\u308b\u3002\u3064\u307e\u308a\u3001contentEditable \u306a\u8981\u7d20\u306b\u5bfe\u3057\u3066 wasavi \u306e\u30d0\u30c3\u30d5\u30a1\u3092\u66f8\u304d\u623b\u3059\u969b\u3001\u3069\u306e\u3088\u3046\u306a DOM \u306e\u69cb\u9020\u306b\u3059\u308b\u304b\u3092\u6307\u5b9a\u3059\u308b\u3002\u305f\u3068\u3048\u3070 [cci]p[\/cci] \u306a\u3089\u3001\u5404\u884c\u3092 [cci]p[\/cci] \u8981\u7d20\u3068\u3057\u3066\u66f8\u304d\u623b\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u5f53\u7136\u306a\u304c\u3089 contentEditable \u306a\u8981\u7d20\u306e\u5185\u90e8\u69cb\u9020\u3092\u3069\u306e\u3088\u3046\u306b\u4fdd\u6301\u3057\u3066\u3044\u308b\u304b\u306f\u30b5\u30a4\u30c8\u3054\u3068\u306b\u307e\u3061\u307e\u3061\u3067\u3042\u308a\u3001\u3072\u3068\u3064\u306b\u6c7a\u3081\u3089\u308c\u308b\u3082\u306e\u3067\u306f\u306a\u3044\u3002\u305d\u3053\u3067\u3001writeas \u306b\u306f \u9023\u60f3\u914d\u5217\u3092\u8868\u3059 json \u6587\u5b57\u5217\u3092\u4ee3\u5165\u3059\u308b\u3053\u3068\u3082\u8a31\u3057\u3066\u3044\u308b\u3002\u3053\u3093\u306a\u611f\u3058\u3067:<\/p>\n<p><code>set writeas='{ \\<br \/>\n  \"http:\/\/example.com\/*\": \"div\", \\<br \/>\n  \"http:\/\/example.net\/*\": [ \\<br \/>\n    { \\<br \/>\n      \"selector\": \"#any-css-selector\", \\<br \/>\n      \"writeas\": \"textAndBreak\" \\<br \/>\n    } \\<br \/>\n  ] \\<br \/>\n}'<\/code><\/p>\n<p>\u9023\u60f3\u914d\u5217\u306e\u30ad\u30fc\u304c URL \u30d1\u30bf\u30fc\u30f3\u3067\u3001\u5024\u304c writeas \u3068\u3044\u3046\u5f62\u5f0f\u3060\u3002\u307e\u305f\u306f\u3001\u3055\u3089\u306b\u9023\u60f3\u914d\u5217\u306e\u914d\u5217\u3092\u5165\u308c\u5b50\u306b\u3057\u3066\u3001CSS \u30bb\u30ec\u30af\u30bf\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u3064\u307e\u308a\u30b5\u30a4\u30c8\u3054\u3068\u306b writeas \u306e\u5b9a\u7fa9\u3092\u5206\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>\u305f\u3060\u2026\u2026\u898b\u3066\u306e\u3068\u304a\u308a exrc \u4e2d\u306b\u6539\u884c\u306e\u30a8\u30b9\u30b1\u30fc\u30d7\u3057\u307e\u304f\u308a\u3067\u66f8\u304b\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u3001\u3068\u3066\u3082\u9762\u5012\u304f\u3055\u3044\u3002\u307e\u305f [cci]set all[\/cci] \u3057\u305f\u6642\u306e\u898b\u6804\u3048\u3082\u3068\u3066\u3082\u3088\u304f\u306a\u3044\u3002\u3082\u3063\u3068\u6d17\u7df4\u3055\u308c\u305f\u5f62\u5f0f\u3067\u4fdd\u6301\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p>\u3068\u3053\u308d\u3067\u3001\u30b5\u30a4\u30c8\u3054\u3068\u306b\u5b9a\u7fa9\u3092\u632f\u308a\u5206\u3051\u3066\u3044\u308b\u3082\u306e\u306f wasavi \u306f\u3082\u3046\u3072\u3068\u3064\u6301\u3063\u3066\u3044\u308b\u3002\u30b5\u30a4\u30c8\u81ea\u8eab\u304c\u63d0\u4f9b\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3068\u30b3\u30f3\u30d5\u30ea\u30af\u30c8\u3059\u308b\u304b\u4f55\u304b\u3067\u3046\u307e\u304f\u52d5\u304b\u306a\u3044\u5834\u5408\u306b\u3001wasavi \u306e\u8d77\u52d5\u3092\u3057\u306a\u3044\u3068\u3044\u3046\u4f8b\u5916\u30ea\u30b9\u30c8\u3067\u3042\u308b\u3002\u3053\u308c\u306f\u666e\u901a\u306e\u30d7\u30ec\u30a4\u30f3\u30c6\u30ad\u30b9\u30c8\u3067<\/p>\n<p><code>http:\/\/example.com\/<br \/>\nhttp:\/\/exmaple.org\/  #some-id<br \/>\n<\/code><br \/>\n\u306e\u3088\u3046\u306b\u884c\u3054\u3068\u306b URL \u3092\u66f8\u304d\u9023\u306d\u308b\u3002URL \u306e\u3042\u3068\u306b\u4efb\u610f\u306e\u500b\u6570\u306e\u7a7a\u767d\u3092\u631f\u3093\u3067 CSS \u30bb\u30ec\u30af\u30bf\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3002\u3053\u308c\u3068 writeas \u306e\u5b9a\u7fa9\u3092\u7d71\u5408\u3067\u304d\u306a\u3044\u3060\u308d\u3046\u304b\u3002\u3064\u307e\u308a\u4f8b\u5916\u30ea\u30b9\u30c8\u3067\u306f\u306a\u304f per-site overrides \u3068\u3044\u3046\u6271\u3044\u306b\u3057\u305f\u3044\u3002<\/p>\n<p><code>override := URL-pattern (CSS-selector)? action<br \/>\naction := allow-actions<br \/>\n          \"block\"<br \/>\nallow-actions := allow-action (\",\" allow-action)*<br \/>\nallow-action := \"writeas\" \"=\" writeas-value<br \/>\nwriteas-value: \"div\" | \"p\" | \"textAndBreak\" | \"plaintext\" | \"html\"<br \/>\n<\/code><\/p>\n<p>\u3068\u3044\u3046\u611f\u3058\u3060\u3002<\/p>\n<div class=\"db9cc8cdb64025d13c1cc9dad0a0e262\" data-index=\"1\" style=\"float: left; margin: 16px 16px 16px 0;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-5825700137064158\";\r\n\/* 250sq, appsweets-blog *\/\r\ngoogle_ad_slot = \"4837931762\";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>wasavi \u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u3001writeas \u3068\u3044\u3046\u3082\u306e\u304c\u3042\u308a\u3001\u3053\u3046\u3044\u3046\u4ed5\u69d8\u306b\u306a\u3063\u3066\u3044\u308b\u3002\u3064\u307e\u308a\u3001contentEditable \u306a\u8981\u7d20\u306b\u5bfe\u3057\u3066 wasavi \u306e\u30d0\u30c3\u30d5\u30a1\u3092\u66f8\u304d\u623b\u3059\u969b\u3001\u3069\u306e\u3088\u3046\u306a DOM \u306e\u69cb\u9020\u306b\u3059\u308b\u304b\u3092\u6307\u5b9a\u3059\u308b\u3002\u305f\u3068\u3048\u3070 [cci]p[\/cci] \u306a\u3089\u3001\u5404\u884c\u3092 [cci]p[\/cci] \u8981\u7d20\u3068\u3057\u3066\u66f8\u304d\u623b\u3059\u3002 \u3057\u304b\u3057\u3001\u5f53\u7136\u306a\u304c\u3089 contentEditable \u306a\u8981\u7d20\u306e\u5185\u90e8\u69cb\u9020\u3092\u3069\u306e\u3088\u3046\u306b\u4fdd\u6301\u3057\u3066\u3044\u308b\u304b\u306f\u30b5\u30a4\u30c8\u3054\u3068\u306b\u307e\u3061\u307e\u3061\u3067\u3042\u308a\u3001\u3072\u3068\u3064\u306b\u6c7a\u3081\u3089\u308c\u308b\u3082\u306e\u3067\u306f\u306a\u3044\u3002\u305d\u3053\u3067\u3001writeas \u306b\u306f \u9023\u60f3\u914d\u5217\u3092\u8868\u3059 json \u6587\u5b57\u5217\u3092\u4ee3\u5165\u3059\u308b\u3053\u3068\u3082\u8a31\u3057\u3066\u3044\u308b\u3002\u3053\u3093\u306a\u611f\u3058\u3067: set writeas='{ \\ &#8220;http:\/\/example.com\/*&#8221;: &#8220;div&#8221;, \\ &#8220;http:\/\/example.net\/*&#8221;: [ \\ { \\ &#8220;selector&#8221;: &#8220;#any-css-selector&#8221;, \\ &#8220;writeas&#8221;: &#8220;textAndBreak&#8221; \\ } \\ ] \\ &hellip; <a href=\"https:\/\/appsweets.net\/blog\/2017\/08\/04\/integration\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5,3,4],"class_list":["post-2382","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-javascript","tag-vi","tag-wasavi"],"_links":{"self":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/2382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/comments?post=2382"}],"version-history":[{"count":4,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/2382\/revisions"}],"predecessor-version":[{"id":2386,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/2382\/revisions\/2386"}],"wp:attachment":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/media?parent=2382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/categories?post=2382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/tags?post=2382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}