Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update HTML anchor explaination text #16142

Merged
merged 11 commits into from
Jul 8, 2019
13 changes: 11 additions & 2 deletions packages/block-editor/src/hooks/anchor.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { assign, has } from 'lodash';
* WordPress dependencies
*/
import { addFilter } from '@wordpress/hooks';
import { TextControl } from '@wordpress/components';
import { TextControl, ExternalLink } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { hasBlockSupport } from '@wordpress/blocks';
import { createHigherOrderComponent } from '@wordpress/compose';
Expand Down Expand Up @@ -71,7 +71,16 @@ export const withInspectorControl = createHigherOrderComponent( ( BlockEdit ) =>
<InspectorAdvancedControls>
<TextControl
label={ __( 'HTML Anchor' ) }
help={ __( 'Anchors lets you link directly to a section on a page.' ) }
help={ (
<>
{ __( 'Enter a word or two — without spaces — to make a unique web address just for this heading, called an "anchor." Then, you’ll be able link directly to this section of your page.' ) }
melchoyce marked this conversation as resolved.
Show resolved Hide resolved
<div className="components-placeholder__learn-more">
melchoyce marked this conversation as resolved.
Show resolved Hide resolved
<ExternalLink href={ __( 'https://wordpress.org/support/article/#/' ) }>
{ __( 'Learn more about anchors' ) }
</ExternalLink>
</div>
</>
) }
value={ props.attributes.anchor || '' }
onChange={ ( nextValue ) => {
nextValue = nextValue.replace( ANCHOR_REGEX, '-' );
Expand Down