Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 740 Bytes

wysiwyg.md

File metadata and controls

39 lines (29 loc) · 740 Bytes

WYSIWYG Editor Field

WYSIWYG fields are added to the WPGraphQL Schema as a field with the Type String.

WYSIWYG fields can be queried and a String will be returned.

Here, we have a WYSIWYG field named wysiwyg on the Post Edit screen within the "ACF Docs" Field Group.

WYSIWYG field in the Edit Post screen

This field can be Queried in GraphQL like so:

{
  post( id: "acf-example-test" idType: URI ) {
    acfDocs {
      wysiwyg
    }
  }
}

and the results of the query would be:

{
  "data": {
    "post": {
      "acfDocs": {
        "wysiwyg": "<p>Some content in a WYSIWYG field</p>\n"
      }
    }
  }
}

  • Previous Field: User