wpgraphql-acf icon indicating copy to clipboard operation
wpgraphql-acf copied to clipboard

(format: RAW) not available for WYSIWYG

Open maurocolella opened this issue 4 years ago • 4 comments
trafficstars

Hi,

First, thank you for the library.

However: I am seeing an issue with WYSIWYG field, where the format arg/enum available on standard content fields is missing.

Would definitely be a great feature to have.

Our case is that we want to parse some shortcodes from a thin (Jamstack) front-end, which I suppose is pretty standard; as opposed to working our way backward from the rendered shortcodes.

https://github.com/wp-graphql/wp-graphql/issues/160

maurocolella avatar Aug 17 '21 08:08 maurocolella

(same here on gallery's description field)

nonlinearcom avatar Sep 15 '21 14:09 nonlinearcom

@nonlinearcom

Here's a temporary solution:

add_filter('graphql_resolve_field', 'strip_tags_from_image_caption', 1000, 9);
function strip_tags_from_image_caption($result, $source, $args, $context, $info, $type_name, $field_key, $field, $field_resolver) {
  if ($field_key === 'caption') {
    return trim(strip_tags($result));
  }
  return $result;
}

elliott-w avatar Dec 08 '21 02:12 elliott-w

This plugin is being re-built over here: https://github.com/wp-graphql/wpgraphql-acf

I think this enhancement is worth considering for the re-architected version of the plugin, so I'm going to transfer this issue to that repo and we'll work on it in the new version as this repo will be archived in the not-too-distant future.

jasonbahl avatar Nov 01 '23 14:11 jasonbahl

@jasonbahl having taken note of the upcoming archival of the previous repo, I just wanted to let you know that although I am not working on this project at this time, I am sincerely grateful for the excellent work that is still going on with WPGraphQL.

We've found it very useful and I am looking forward to any new development.

maurocolella avatar Nov 10 '23 03:11 maurocolella