Sign in

Highlight text by using the mark tag / And Keyboard Input element

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #766
    ajeet

    Hi,

    I want to use the kbd input element in the text. I am doing this like this:

    <p>Please press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>R</kbd> to re-render an MDN page.</p>

    But there a couple of issues.

    The CSS is not getting applied in rendered post.

    .kbd {
    background: #eee; color: #333
    border-radius: 3px; border: 1px solid #b4b4b4;
    font-family: Menlo, Monaco, Consolas, Courier New, monospace;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 2px 0 0 rgba(255, 255, 255, .7) inset; }

    Secondly, to use kbd, I need to go to html of the post and manually do this. Is this possible to add an option for KBD and for Mark Tag as well.

    Any help please ?

     

    Thanks,

    Ajeet

    #924
    ajeet

    Any help, Bob?

    #925
    BobBob
    Support

    kbd is an HTML element, not a CSS class,  so style it the following way:

    kbd {
     color: etc...
    }
    

    We do not plan to add it to the editor, it is barely used, all in all, a marginal function.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #926
    ajeet

    It worked.

    Thanks 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Highlight text by using the mark tag / And Keyboard Input element’ is closed to new replies.