{"id":53385,"date":"2017-01-04T13:01:48","date_gmt":"2017-01-04T13:01:48","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/acf-medium-editor-field\/"},"modified":"2022-10-10T17:38:17","modified_gmt":"2022-10-10T17:38:17","slug":"acf-medium-editor-field","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/acf-medium-editor-field\/","author":10176418,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"3.0.0","stable_tag":"3.0.0","tested":"6.0.12","requires":"4.0.0","requires_php":"","requires_plugins":"","header_name":"ACF Medium Editor Field","header_author":"John A. Huebner II","header_description":"","assets_banners_color":"","last_updated":"2022-10-10 17:38:17","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/acf-medium-editor-field\/","header_author_uri":"https:\/\/github.com\/Hube2","rating":5,"author_block_rating":0,"active_installs":3000,"downloads":27744,"num_ratings":0,"support_threads":2,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"2.0.1":{"tag":"2.0.1","author":"Hube2","date":"2017-01-22 14:45:56"},"2.0.2":{"tag":"2.0.2","author":"Hube2","date":"2017-01-06 12:23:25"},"2.1.0":{"tag":"2.1.0","author":"Hube2","date":"2017-01-15 21:19:42"},"2.1.1":{"tag":"2.1.1","author":"Hube2","date":"2017-01-18 21:27:45"},"2.2.0":{"tag":"2.2.0","author":"Hube2","date":"2017-01-20 22:13:49"},"2.2.1":{"tag":"2.2.1","author":"Hube2","date":"2017-01-22 14:45:56"},"2.2.2":{"tag":"2.2.2","author":"Hube2","date":"2017-01-27 23:26:52"},"2.3.0":{"tag":"2.3.0","author":"Hube2","date":"2017-02-01 17:41:19"},"2.3.1":{"tag":"2.3.1","author":"Hube2","date":"2017-02-19 14:40:44"},"2.4.0":{"tag":"2.4.0","author":"Hube2","date":"2017-06-21 00:40:23"},"2.4.1":{"tag":"2.4.1","author":"Hube2","date":"2017-07-28 02:22:11"},"2.4.2":{"tag":"2.4.2","author":"Hube2","date":"2017-07-28 13:07:41"},"2.4.4":{"tag":"2.4.4","author":"Hube2","date":"2018-12-20 18:41:52"},"2.5.0":{"tag":"2.5.0","author":"Hube2","date":"2019-03-10 17:03:46"},"2.5.1":{"tag":"2.5.1","author":"Hube2","date":"2019-04-07 16:07:28"},"2.5.2":{"tag":"2.5.2","author":"Hube2","date":"2019-06-18 12:06:31"},"2.5.3":{"tag":"2.5.3","author":"Hube2","date":"2020-04-17 12:07:14"},"2.6.0":{"tag":"2.6.0","author":"Hube2","date":"2021-12-23 18:02:29"},"2.6.1":{"tag":"2.6.1","author":"Hube2","date":"2022-10-01 16:23:21"},"3.0.0":{"tag":"3.0.0","author":"Hube2","date":"2022-10-10 17:38:17"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":6},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["2.0.1","2.0.2","2.1.0","2.1.1","2.2.0","2.2.1","2.2.2","2.3.0","2.3.1","2.4.0","2.4.1","2.4.2","2.4.4","2.5.0","2.5.1","2.5.2","2.5.3","2.6.0","2.6.1","3.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2796748,"resolution":"1","location":"plugin"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":2796748,"resolution":"3","location":"plugin"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":2796748,"resolution":"2","location":"plugin"}},"screenshots":{"1":"Medium Editor field when toolbar is not shown","2":"Medium Editor field when toolbar is shown","3":"Medium Editor Settings"}},"plugin_section":[],"plugin_tags":[2211,2223,13818,130265,130266],"plugin_category":[43,59],"plugin_contributors":[83588],"plugin_business_model":[],"class_list":["post-53385","plugin","type-plugin","status-closed","hentry","plugin_tags-acf","plugin_tags-add-on","plugin_tags-configurable","plugin_tags-inline-wysywig","plugin_tags-medium-editor","plugin_category-customization","plugin_category-utilities-and-tools","plugin_contributors-hube2","plugin_committers-hube2"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/acf-medium-editor-field.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/acf-medium-editor-field\/trunk\/screenshot-1.png?rev=2796748","caption":"Medium Editor field when toolbar is not shown"},{"src":"https:\/\/ps.w.org\/acf-medium-editor-field\/trunk\/screenshot-2.png?rev=2796748","caption":"Medium Editor field when toolbar is shown"},{"src":"https:\/\/ps.w.org\/acf-medium-editor-field\/trunk\/screenshot-3.png?rev=2796748","caption":"Medium Editor Settings"}],"raw_content":"<!--section=description-->\n<h4>Compatibility<\/h4>\n\n<p>This ACF field type is compatible with:\n* ACF 5\n* ACF 6<\/p>\n\n<p><strong><em>This is an add on plugin for Advanced Custom Fields (ACF) 5 or 6. This plugin will not work if ACF is not installed and active. This plugin may work in a limited capacity if the repeater field is not avilable.<\/em><\/strong><\/p>\n\n<p>Ever needed to give a client a way to edit the appearence of text without wanting to give them a full blown WYSIWYG editor? Need something less than a WYSYWIG but more than a text or textarea field that you can configure the way you need it to work with the features you need it to have?<\/p>\n\n<p>This add on for ACF5 adds <a href=\"https:\/\/github.com\/yabwe\/medium-editor\">MediumEditor<\/a> as an ACF field. \nEach field instance is configurable, and each field instance has its own settings. Many of the options \navailable in MediumEditor are supported, including the creation of custom buttons using <a href=\"https:\/\/github.com\/arcs-\/MediumButton\">MediumButton<\/a>. It is also possible using either a configuration\nsetting or a filter to alter the MediumEditor Theme. Some of the available options are covered below.\nFor more information on MediumEditor and MediumButton, see the description of these libaries at the links provided.<\/p>\n\n<p>For more information see\n<a href=\"https:\/\/wordpress.org\/plugins\/medium-editor-field-for-acf\/other_notes\">Other Notes<\/a> and\n<a href=\"https:\/\/wordpress.org\/plugins\/medium-editor-field-for-acf\/screenshots\">Screenshots<\/a><\/p>\n\n<p><strong><em>Medium Editor needs your help!. This plugin depends <a href=\"https:\/\/github.com\/yabwe\/medium-editor\">Medium Editor<\/a> which is the JavaScript package that powers this ACF Add On. I do not maintain this package. This pluig is simply an implementation of it for ACF. <a href=\"https:\/\/github.com\/yabwe\/medium-editor\/issues\/1503\">Medium Editor is looking for contributors<\/a>. Without people to help maintain and improve it Medium Editor could fade away and if that happens this plugin will also no longer be possible.<\/em><\/strong><\/p>\n\n<h3>Github Repository<\/h3>\n\n<p>This plugin is also on GitHub \n<a href=\"https:\/\/github.com\/Hube2\/acf-medium-editor\">https:\/\/github.com\/Hube2\/acf-medium-editor<\/a><\/p>\n\n<h3>Field Settings<\/h3>\n\n<p>The following is an explanation of the fields, not including the ones that should be self explanatory.<\/p>\n\n<p><strong>Buttons:<\/strong> These are the buttons that are included in <a href=\"https:\/\/github.com\/yabwe\/medium-editor#buttons\">MediumEditor<\/a>.\nSelect the buttons you want to include in each editor instance.<\/p>\n\n<p><strong>Custom Buttons:<\/strong> This is the main reason that I created this plugin. This field supports adding \ncustom buttons using <a href=\"https:\/\/github.com\/arcs-\/MediumButton#html-buttons\">MediumButton<\/a>. \nPlease note that if any of the main fields (Name, Label, HTML Tag) are empty that the entire \nbutton will be ignored.<\/p>\n\n<p><strong><em>Name<\/em><\/strong>: This is then name of the button and will be used when instaniating the MediumButton Object. \nThe button name must be unique and cannot be one of the buttons already included in MediumEditor, a\nbutton of the same name as one of the standard button in Medium Editor will not override that button\nif it is also included. I do not know what the effects of custom characters in the name will be. \nPlease report any bugs and I will look into adding something to clean up characters or find some other work-around for any that cause errors.<\/p>\n\n<p><strong><em>Label<\/em><\/strong>: This is the label that will appear in the button bar. This field allows HTML. \nPlease make sure it is valid html (I do not validate the html you enter). Invalid markup will probably \nbreak the button bar or the entire admin. MediumButton also supports using icons for buttons.\nIf you want to use icons in your buttons then it is your responsibility to make sure the icon font set is\navailable for use in the admin of your site.<\/p>\n\n<p><strong><em>HTML Tag<\/em><\/strong>: Enter the html tag that will be inserted by this button. Only non-empty html tags are allowed.\nMost valid HTML tags are supported. If an invalid HTML tag is entered then the button will be ignored.<\/p>\n\n<p>I'm not sure at this time what effect some of the tags will have in the editor. I haven't tried them all\nif you run into issues let me know and I'll need to make a decision on wheter to try to fix it or remove\nthe tag(s) from the allowed list.<\/p>\n\n<p>The currently supported tags are: abbr, acronym, address, article, asside, b, \nbdi, bdo, blockquote, button, caption, cite, code, del, details, dfn, \ndiv, em, footer, h1, h2, h3, h4, h5, h6, header, \ni, ins, main, mark, meta, p, pre, q, s, samp, section, small, span, \nstrong, sub, sup, summary, time, u, var, wbr<\/p>\n\n<p><strong><em>Attributes<\/em><\/strong>: Add attributes to the html tag. Attibute names must be valid (they must \nbegin with a letter and contain only letter, numbers, underscores and dashes. Attribute \nvalues must not contain double quotes (\") any attributes that do not conform to these \nrules will be ignored. Please note that beyond this, attribute names and values are not \nvalidated. I do not know what effect invalid entries will have on your admin. Like other \nvalues, if you find something that causes an issue, open one and I'll see what needs to be done.<\/p>\n\n<p><strong>Other MediumEditor Options:<\/strong> This is a selection of other\n<a href=\"https:\/\/github.com\/yabwe\/medium-editor#core-options\">Core Options<\/a> available for \nMediumEditor with the exception of <strong><em>allowBreakInSingleLineInput<\/em><\/strong> (see below). Please \nsee the MediumEditor documentation for information on each of the other options. Selecting \nan option will set that option's value to true, unselecting the value will set it to false.<\/p>\n\n<p><strong><em>allowBreakInSingleLineInput:<\/em><\/strong> This is an option added specifically for use with WP.\nIf you set disableReturn on then the medium editor acts like a single line input field. Setting\nallowBreakInSingleLineInput allows editors to manually type in &lt;br&gt; tags into these\nsingle line fields to create line breaks.<\/p>\n\n<h3>Medium Editor Theme<\/h3>\n\n<p>MediumEditor fields will use the WordPress theme created specifically for the this plugin unless you change it.\nYou can alter the theme used for all MediumEditor fields, this is not something that you can apply to only \nsome fields. You can change the theme on your site in one of two ways:<\/p>\n\n<p>1) wp-config.php\nAdd the following code to your wp-cofig.php file<\/p>\n\n<pre><code>define('MEDIUM_EDITOR_THEME', 'beagle');\n<\/code><\/pre>\n\n<p>2) filter\nAdd the following code to your functions.php file or wherever you would add such a filter<\/p>\n\n<pre><code>add_filter('medium-editor-theme', 'my_medium_editor_theme_function');\nfunction my_medium_editor_theme_function($theme) {\n  $theme = 'beagle';\n  return $theme;\n}\n<\/code><\/pre>\n\n<p>Theme name in the above code is one of the following themes currently supported by MediumEditor:\nbeagle, bootstrap, default, flat, mani, roman, tim<\/p>\n\n<p>For more information see <a href=\"https:\/\/github.com\/yabwe\/medium-editor#mediumeditor\">MediumEditor<\/a> and\n<a href=\"https:\/\/github.com\/arcs-\/MediumButton#mediumbutton\">MediumButton<\/a><\/p>\n\n<h3>Custom Editor Styles<\/h3>\n\n<p>The styles used in the medium editor for elementa is inherited from WP. If you want to override these styles\ncreate a file named \"medium-editor-syle.css\" in your theme folder. If this file exists is will be\nautomatcially enqueued on all pages where ACF fields appear.<\/p>\n\n<h3>Add Custom Buttons in Code<\/h3>\n\n<p>This filter is applied to the custom buttons before they are validated as having all the correct\nrequirements that are given when creating a custom button in the field settings for a Medium Editor Field.<\/p>\n\n<p><strong>Hooks<\/strong><\/p>\n\n<ol>\n<li><strong>acf\/medium-editor-field\/custom-buttons<\/strong> - filter for every field <\/li>\n<li><strong>acf\/medium-editor-field\/custom-buttons\/name={$field_name}<\/strong> - filter for specific field based on it's name<\/li>\n<li><strong>acf\/medium-editor-field\/custom-buttons\/key={$field_key}<\/strong> - filter for specific field based on it's key<\/li>\n<\/ol>\n\n<p><strong>Parameters<\/strong><\/p>\n\n<ol>\n<li><strong>$buttons<\/strong> - an array of button options<\/li>\n<li><p><strong>$field<\/strong> - an array containing all the fields settings for the field being loaded<\/p>\n\n<p>\/\/ functions.php<\/p>\n\n<p>function my_custom_buttons($buttons, $field) {\n  $buttons[] = array(\n    'name' =&gt; 'red',\n    'label' =&gt; 'Red\"',\n    'attributes' =&gt; array(\n      'name' =&gt; 'style',\n      'value' =&gt; 'color: #F00;'\n    )\n  );\n  return $buttons;\n}\nadd_filter('acf\/medium-editor-field\/custom-buttons', 'my_custom_buttons', 10, 2);<\/p><\/li>\n<\/ol>\n\n<h3>Filter Buttons<\/h3>\n\n<p>This filter is applied to the list of buttons that will be shown. This list will contain the \"name\"\nof each standard button as well as the \"name\" of each custom button that has been set up for the field.\nPlease note that only valid button names can be used here. See medium editor's list of available\nbuttons.<\/p>\n\n<p><strong>Hooks<\/strong><\/p>\n\n<ol>\n<li><strong>acf\/medium-editor-field\/buttons<\/strong> - filter for every field <\/li>\n<li><strong>acf\/medium-editor-field\/buttons\/name={$field_name}<\/strong> - filter for specific field based on it's name<\/li>\n<li><strong>acf\/medium-editor-field\/buttons\/key={$field_key}<\/strong> - filter for specific field based on it's key<\/li>\n<\/ol>\n\n<p><strong>Parameters<\/strong><\/p>\n\n<ol>\n<li><strong>$buttons<\/strong> - an array of button options<\/li>\n<li><p><strong>$field<\/strong> - an array containing all the fields settings for the field being loaded<\/p>\n\n<p>\/\/ functions.php<\/p>\n\n<p>function my_custom_buttons($buttons, $field) {\n  \/\/ add underline button to all medium editor fields\n  \/\/ set both the index and the value of the array element\n  if (!isset($buttons['underline'])) {\n    $buttons['underline'] = 'underline';\n  }\n  \/\/ unset strikethrough if it is set\n    if (isset($buttons['strikethrough'])) {\n    unset($buttons['strikethrough']);\n  }\n  return $buttons;\n}\nadd_filter('acf\/medium-editor-field\/buttons', 'my_buttons', 10, 2);<\/p><\/li>\n<\/ol>\n\n<!--section=installation-->\n<ol>\n<li>Copy the <code>acf-medium-editor<\/code> folder into your <code>wp-content\/plugins<\/code> folder<\/li>\n<li>Activate the Medium Editor Field plugin via the plugins admin page<\/li>\n<li>Create a new field via ACF and select the Medium Editor Field type<\/li>\n<li>Please refer to the description for more info regarding the field type settings<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>3.0.0<\/h4>\n\n<ul>\n<li>ACF &gt;= V6, prevent initialization of medium editor scripts on ACF Field Group editor<\/li>\n<li>Removed custom button settings from field editor, not supported by ACF6. Adding custom buttons is now only available through the filter hook \"acf\/medium-editor-field\/custom-buttons\"<\/li>\n<li>removed ACF V6 Notice<\/li>\n<\/ul>\n\n<h4>2.6.1<\/h4>\n\n<ul>\n<li>added ACF V6 Notice<\/li>\n<\/ul>\n\n<h4>2.6.0<\/h4>\n\n<ul>\n<li>allow override of plugin input.js src<\/li>\n<\/ul>\n\n<h4>2.5.3<\/h4>\n\n<ul>\n<li>added disc\/number list style type in editor to overide WP admin styling<\/li>\n<\/ul>\n\n<h4>2.5.2<\/h4>\n\n<ul>\n<li>improved element targeting and field initialization<\/li>\n<li>corrected issue with initialization when using acf blocks<\/li>\n<\/ul>\n\n<h4>2.5.1<\/h4>\n\n<ul>\n<li>increased z-index of toolbar so it won't be hidden by other modals<\/li>\n<\/ul>\n\n<h4>2.5.0<\/h4>\n\n<ul>\n<li>removed donation nag<\/li>\n<li>added enqueing of medium-editor-style.css if it exists in theme<\/li>\n<li>updated Medium Editor to 5.23.3<\/li>\n<\/ul>\n\n<h4>2.4.4<\/h4>\n\n<ul>\n<li>Corrected issues with ACF&gt;=5.7.0<\/li>\n<\/ul>\n\n<h4>2.4.3<\/h4>\n\n<ul>\n<li>moved parenthesis to be part of string to be translated and added filter to allow changing the additional field instructions<\/li>\n<\/ul>\n\n<h4>2.4.2<\/h4>\n\n<ul>\n<li>corrected bug <\/li>\n<\/ul>\n\n<p>&lt;<\/p>\n\n<p>pre&gt; tags being stripped from saved value\n* modified the \"evaluate html\" button icon<\/p>\n\n<h4>2.4.1<\/h4>\n\n<ul>\n<li>updated Medium Editor to 5.23.1<\/li>\n<\/ul>\n\n<h4>2.4.0<\/h4>\n\n<ul>\n<li>updated Medium Editor to 5.23.0<\/li>\n<li>updated Medium Butoon to latest <\/li>\n<li>added new html button for medium editor<\/li>\n<\/ul>\n\n<h4>2.3.1<\/h4>\n\n<ul>\n<li>corrected button style to allow wider buttons for custom buttons<\/li>\n<li>abandoned static container, for now, do to incompatibility with Mac<\/li>\n<\/ul>\n\n<h4>2.3.0<\/h4>\n\n<ul>\n<li>corrected bug - in_array() error on line 725<\/li>\n<li>css change, fix, work-around for jumpy editor behaviour<\/li>\n<li>added delay initialization setting<\/li>\n<\/ul>\n\n<h4>2.2.2<\/h4>\n\n<ul>\n<li>fixed jumpy behavior of editer\/toolbar - thanks @Hrohh<\/li>\n<\/ul>\n\n<h4>2.2.1<\/h4>\n\n<ul>\n<li>fixed behaviour of toolbar in safari<\/li>\n<\/ul>\n\n<h4>2.2.0<\/h4>\n\n<ul>\n<li>added WordPress theme to medium editor<\/li>\n<li>other changes to make the editor look and feel more like WordPress<\/li>\n<\/ul>\n\n<h4>2.1.1<\/h4>\n\n<ul>\n<li>added missing anchor button missed in 2.1.0 update<\/li>\n<li>reverted button order to Medium Editor default<\/li>\n<li>corrected bug in custom buttons created in 2.1.0<\/li>\n<li>updated screenshots<\/li>\n<\/ul>\n\n<h4>2.1.0<\/h4>\n\n<ul>\n<li>Added dashicons (tmconnect)<\/li>\n<li>Added transaltion Support (tmconnect)<\/li>\n<li>Added German transaltion (tmconnect)<\/li>\n<li>\n<ul>\n<li>Thanks <a href=\"https:\/\/github.com\/tmconnect\">tmconnect<\/a><\/li>\n<\/ul><\/li>\n<\/ul>\n\n<h4>2.0.2<\/h4>\n\n<ul>\n<li>Removed github updater support<\/li>\n<\/ul>\n\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>First released to wordpress.org<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>removed support for nested html tags for custom buttons<\/li>\n<\/ul>\n\n<h4>0.0.7<\/h4>\n\n<ul>\n<li>corrected bug when in clone field<\/li>\n<\/ul>\n\n<h4>0.0.6<\/h4>\n\n<ul>\n<li>correcting bugs<\/li>\n<\/ul>\n\n<h4>0.0.1<\/h4>\n\n<ul>\n<li>initial release<\/li>\n<\/ul>","raw_excerpt":"Medium Editor Field for ACF","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/53385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=53385"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/hube2"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=53385"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=53385"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=53385"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=53385"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=53385"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=53385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}