{"id":3327,"date":"2020-05-31T01:35:34","date_gmt":"2020-05-30T16:35:34","guid":{"rendered":"https:\/\/www.will3in.co.jp\/frontend-blog\/?p=3327"},"modified":"2020-05-31T01:35:34","modified_gmt":"2020-05-30T16:35:34","slug":"solution-table-width-of-tinymce-advanced","status":"publish","type":"post","link":"https:\/\/www.will3in.co.jp\/frontend-blog\/article\/solution-table-width-of-tinymce-advanced\/","title":{"rendered":"TinyMCE Advanced \u306e\u30c6\u30fc\u30d6\u30eb\u3067\u52dd\u624b\u306b\u8a2d\u5b9a\u3055\u308c\u308b width \u5bfe\u7b56\uff08\u89e3\u6c7a\uff09"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">2\u30f5\u6708\u524d\u306b\u3053\u306e\u30d6\u30ed\u30b0\u3067\u3001TinyMCE Advanced \u304c 5.2.0 \u306b\u30a2\u30c3\u30d7\u30c3\u30c7\u30fc\u30c8\u3055\u308c\u3066\u304b\u3089\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30bb\u30eb\u306e\u67a0\u7dda\u306e\u30c9\u30e9\u30c3\u30b0\u3092\u7121\u52b9\u306b\u3057\u3066\u52dd\u624b\u306b width \u3084 height \u304c\u8a2d\u5b9a\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u3066\u3082\u3001\u30c6\u30fc\u30d6\u30eb\u3092\u633f\u5165\u3059\u308b\u969b\u306b\u5f37\u5236\u7684\u306b\u5168\u3066\u306e\u30bb\u30eb\u306b\u5747\u7b49\u306e width \u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u3092\u66f8\u304d\u307e\u3057\u305f\u3002<br>\uff08<a href=\"https:\/\/www.will3in.co.jp\/frontend-blog\/article\/table-width-of-tinymce-advanced\/\">TinyMCE Advanced \u306e\u30c6\u30fc\u30d6\u30eb\u3067\u52dd\u624b\u306b\u8a2d\u5b9a\u3055\u308c\u308b width \u5bfe\u7b56\uff08\u59a5\u5354\u7b56\uff09<\/a>\uff09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u306e\u969b\u306f\u3001width \u3092\u8a2d\u5b9a\u3055\u305b\u306a\u3044\u89e3\u6c7a\u7b56\u304c\u898b\u3064\u304b\u3089\u305a\u3001\u59a5\u5354\u7b56\u3068\u3057\u3066\u30c9\u30e9\u30c3\u30b0\u3067\u30b5\u30a4\u30ba\u3092\u8abf\u6574\u3067\u304d\u308b\u3068\u3044\u3046\u5229\u4fbf\u6027\u3092\u53d7\u3051\u5165\u308c\u308b\u3053\u3068\u306b\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u65b0\u898f\u306b\u5236\u4f5c\u3059\u308b\u30b5\u30a4\u30c8\u306f\u305d\u308c\u3067\u3082\u3044\u3044\u306e\u3067\u3059\u304c\u3001\u904e\u53bb\u306b\u5236\u4f5c\u3057\u305f\u30b5\u30a4\u30c8\u306f\u64cd\u4f5c\u65b9\u6cd5\u304c\u5909\u308f\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001TinyMCE Advanced \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3057\u304b\u3057\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u9762\u304b\u3089\u3082\u3044\u3064\u307e\u3067\u3082\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u306a\u3044\u8a33\u306b\u306f\u884c\u304b\u305a\u3001\u518d\u5ea6 width \u3092\u8a2d\u5b9a\u3055\u305b\u306a\u3044\u65b9\u6cd5\u3092\u63a2\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">\u3059\u308b\u3068\u3001\u4ee5\u524d\u306f\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u304b\u3089\u6570\u30f6\u6708\u7d4c\u3063\u305f\u3053\u3068\u3082\u3042\u3063\u3066\u304b\u3001\u5bfe\u7b56\u6cd5\u3092\u7d39\u4ecb\u3055\u308c\u3066\u3044\u308b\u8a18\u4e8b\u304c\u3044\u304f\u3064\u304b\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u306e\u5bfe\u7b56\u6cd5\u306f functions.php \u306b\u4ee5\u4e0b\u306e\u8a18\u8ff0\u3092\u8ffd\u52a0\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function tinymce_custom($settings) {\n  $invalid_style = array(\n    'table' =&gt; 'width height',\n    'th' =&gt; 'width height',\n    'td' =&gt; 'width height'\n  );\n  $mceInit&#091;'invalid_styles'] = json_encode($invalid_style);\n  return $settings;\n}\nadd_filter('tiny_mce_before_init', 'tinymce_custom', 0);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e9\u901f\u691c\u8a3c\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u78ba\u304b\u306b\u30c6\u30fc\u30d6\u30eb\u633f\u5165\u6642\u306e width \u306f\u8a2d\u5b9a\u3055\u308c\u307e\u305b\u3093\u304c\u3001\u3053\u306e\u65b9\u6cd5\u306f table \u3068 th, td \u306e width \u3068 height \u3092\u7121\u52b9\u306b\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u30c6\u30fc\u30d6\u30eb\u633f\u5165\u5f8c\u306b\u30c6\u30fc\u30d6\u30eb\u3084\u30bb\u30eb\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u4efb\u610f\u306e width \u3092\u8a2d\u5b9a\u3057\u3088\u3046\u3068\u3057\u3066\u3082\u7121\u8996\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4efb\u610f\u306e\u5217\u5e45\u3092\u8a2d\u5b9a\u3057\u305f\u3044\u5834\u5408\u306f\u30bb\u30eb\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u8a2d\u5b9a\u3059\u308b\u3088\u3046\u306b\u3068\u30de\u30cb\u30e5\u30a2\u30eb\u306b\u66f8\u3044\u3066\u3044\u308b\u306e\u3067\u3001\u3053\u308c\u3067\u306f\u7279\u5b9a\u306e\u5217\u306e\u5e45\u3092\u56fa\u5b9a\u3057\u305f\u3044\u3068\u304b\u3001\u4e0a\u4e0b\u306b\u4e26\u3076\u8907\u6570\u306e\u8868\u3067\u5217\u5e45\u3092\u63c3\u3048\u305f\u3044\u3068\u304b\u3044\u3046\u5834\u5408\u306b\u56f0\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3067\u3082\u30d2\u30f3\u30c8\u3092\u5f97\u305f\u306e\u3067\u3001\u4e0a\u8a18\u306e\u8a2d\u5b9a\u3092\u30c6\u30fc\u30d6\u30eb\u633f\u5165\u6642\u3060\u3051\u306b\u9069\u7528\u3059\u308b\u65b9\u6cd5\u304c\u3042\u308b\u7b48\u3060\u3068\u3001\u3055\u3089\u306b\u63a2\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u30012\u5e74\u524d\u306b\u66f8\u304b\u308c\u305f\u3082\u306e\u3067\u3059\u304c\u53c2\u8003\u306b\u306a\u308b\u8a18\u4e8b\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br><a href=\"https:\/\/www.ns-lab.org\/digiloog\/2018\/08\/article_5109\/\">DigiLoog \u00bb TinyMCE\u306eTable\u30bf\u30b0\u81ea\u52d5\u4ed8\u4e0e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u66f8\u304d\u63db\u3048\u305f<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u306e functions.php \u306e\u8a18\u8ff0\u306e <code>$mceInit['invalid_styles']<\/code> \u3092 <code>$mceInit['table_default_styles']<\/code> \u3068\u3059\u308c\u3070\u3001\u30c6\u30fc\u30d6\u30eb\u633f\u5165\u6642\u3060\u3051\u306b\u9069\u7528\u3067\u304d\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u306d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3061\u3089\u3092\u53c2\u8003\u306b\u3001\u7d50\u679c\u7684\u306b\u4ee5\u4e0b\u306e\u8a18\u8ff0\u3068\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function tinymce_custom($settings) {\n  $default_style = array(\n    'border-collapse' =&gt; 'collapse'\n  );\n  $initArray&#091;'table_default_styles'] = json_encode($default_style);\n  return $settings;\n}\nadd_filter('tiny_mce_before_init', 'tinymce_custom', 0);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>border-collapse: collapse;<\/code> \u306f\u79c1\u306e\u5834\u5408\u5916\u90e8 CSS \u30d5\u30a1\u30a4\u30eb\u3067\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u306e\u3067\u5b9f\u969b\u306f\u4e0d\u8981\u3067\u3059\u304c\u3001TinyMCE Advanced 5.2.0 \u304b\u3089\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u633f\u5165\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u307e\u3059\u3057\u3001\u7de8\u96c6\u753b\u9762\u3067\u5916\u90e8 CSS \u304c\u8aad\u307f\u8fbc\u307e\u308c\u306a\u3044\u5834\u5408\u3092\u8003\u616e\u3057\u3066\u5165\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305f\u3001TinyMCE Advanced 5.2.0 \u304b\u3089\u306f\u8a2d\u5b9a\u753b\u9762\u3067\u30c9\u30e9\u30c3\u30b0\u3067\u306e\u30c6\u30fc\u30d6\u30eb\u3001\u884c\u3001\u5217\u306e\u30b5\u30a4\u30ba\u5909\u66f4\u3092\u7121\u52b9\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u4eca\u307e\u3067 functions.php \u306b\u66f8\u3044\u3066\u3044\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u30bb\u30eb\u306e\u67a0\u7dda\u306e\u30c9\u30e9\u30c3\u30b0\u3092\u7121\u52b9\u306b\u3059\u308b\u8a18\u8ff0\u306f\u524a\u9664\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u3067\u3001\u30c6\u30fc\u30d6\u30eb\u633f\u5165\u6642\u306b\u306f width \u3092\u8a2d\u5b9a\u3057\u306a\u3044\u306e\u3067\u3001\u5f93\u6765\u3069\u304a\u308a\u30bb\u30eb\u5185\u306e\u6587\u5b57\u6570\u7b49\u306b\u3088\u3063\u3066\u5909\u5316\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u3001TinyMCE Advanced \u306e\u8a2d\u5b9a\u306b\u3088\u3063\u3066\u67a0\u7dda\u306e\u30c9\u30e9\u30c3\u30b0\u3067\u5e45\u3084\u9ad8\u3055\u3092\u8a2d\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u9078\u3079\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2\u30f5\u6708\u524d\u306b\u3053\u306e\u30d6\u30ed\u30b0\u3067\u3001TinyMCE Advanced \u304c 5.2.0 \u306b\u30a2\u30c3\u30d7\u30c3\u30c7\u30fc\u30c8\u3055\u308c\u3066\u304b\u3089\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30bb\u30eb\u306e\u67a0\u7dda\u306e\u30c9\u30e9\u30c3\u30b0\u3092\u7121\u52b9\u306b\u3057\u3066\u52dd\u624b\u306b width \u3084 height \u304c\u8a2d\u5b9a\u3055\u308c\u306a\u3044\u3088\u3046 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[34,4,81],"class_list":["post-3327","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-tinymce","tag-wordpress","tag-table"],"_links":{"self":[{"href":"https:\/\/www.will3in.co.jp\/frontend-blog\/wp-json\/wp\/v2\/posts\/3327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.will3in.co.jp\/frontend-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.will3in.co.jp\/frontend-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.will3in.co.jp\/frontend-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.will3in.co.jp\/frontend-blog\/wp-json\/wp\/v2\/comments?post=3327"}],"version-history":[{"count":0,"href":"https:\/\/www.will3in.co.jp\/frontend-blog\/wp-json\/wp\/v2\/posts\/3327\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.will3in.co.jp\/frontend-blog\/wp-json\/wp\/v2\/media?parent=3327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.will3in.co.jp\/frontend-blog\/wp-json\/wp\/v2\/categories?post=3327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.will3in.co.jp\/frontend-blog\/wp-json\/wp\/v2\/tags?post=3327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}