[wp-trac] [WordPress Trac] #53970: Add HTML mark tag support on Gutenberg

WordPress Trac noreply at wordpress.org
Fri Aug 20 12:33:37 UTC 2021


#53970: Add HTML mark tag support on Gutenberg
----------------------------------+-----------------------------
 Reporter:  isaumya               |      Owner:  (none)
     Type:  enhancement           |     Status:  new
 Priority:  normal                |  Milestone:  Awaiting Review
Component:  Editor                |    Version:
 Severity:  normal                |   Keywords:
  Focuses:  ui, coding-standards  |
----------------------------------+-----------------------------
 Hi,
 In Gutenberg when we are writing a paragraph or a list item, sometimes it
 is needed to highlight a certain part of the text without bolding them.

 In HTML 5 there is a specific tag for this called `mark`. Using the mark
 tag we can highlight a certain part of the text so it will look like we
 have highlighted that text without doing anything crazy.

 Here is an example code:

 {{{#!php
 <p>I have a car and that car is <mark>super fast</mark> even on bad
 roads.</p>
 }}}


 You can take a deep drive into the `mark` tag
 [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark here on
 the MDN Docs].

 Currently, the only way to achieve it is by writing the paragraph or list
 item in the Gutenberg and then edit them as HTML and add the tag at which
 point Gutenberg doesn't recognize the element as the same element and ask
 users to convert it to HTML block.

 It would be really awesome if a new icon can be added in the Gutenberg
 formatting menu just beside the icons of Bold, Italics etc. This Highlight
 icon will simply add the `mark` tag to the selected text and the rest will
 be automatically taken care of by the browser. It can further be custom
 styles in CSS if someone wants to do it. Honestly, it would be awesome to
 see it in Gutenberg.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53970>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list