• Resolved Guido

    (@guido07111975)


    Hi,

    I still haven’t learned JavaScript (and React) deeply..

    I would like to add a simple link to my block description, such as <a href="url">link text</a>
    The setup of my block is:

    registerBlockType('plugin/plugin-block', {
    	title: 'Block Title',
    	description: 'Description of my block',
    	category: 'widgets',
    	// etc
    
    })

    When adding the link to the description, the link is returned as HTML in the editor.

    So how can I output the link properly?

    Guido

Viewing 1 replies (of 1 total)
  • Thread Starter Guido

    (@guido07111975)

    It seems now that description must be a string, otherwise I get a deprecated warning.

    So decided to include it in the InspectorControls:

    
    React.createElement('a', { className: "link", href: "my-url" }, 'My link label'),

    Guido

Viewing 1 replies (of 1 total)
  • The topic ‘Adding link in block description’ is closed to new replies.