-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed as not planned
Labels
[Package] Notices/packages/notices/packages/notices[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
In classic editor we can introduce some limited HTML tags (<br>, <code>, <a>) by using wp_kses() function for example
In block editor these tags are always converted to text.
Is there a way to do that correctly in block editor or is it something that will be never possible?
Step-by-step reproduction instructions
- create a React component which create a warning notice for example
import { useDispatch } from '@wordpress/data';
import { store as noticesStore } from '@wordpress/notices';
const DisplayNotice = ( { notice } ) => {
const { createWarningNotice } = useDispatch( noticesStore );
createWarningNotice(
notice,
{
explicitDismiss: true,
}
);
/**
* Renderless component.
*/
return( null );
}
export default DisplayNotice;- Use the component somewhere in the block editor code by passing a notice message containing HTML tags
const notice =
`አማርኛ (<code>am</code>) is not available as target language with DeepL.<br>
Afrikaans (<code>af</code>) is not available as target language with DeepL.`;
...
<DisplayNotice notice={ notice } />Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
No
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
Metadata
Metadata
Assignees
Labels
[Package] Notices/packages/notices/packages/notices[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended


