HTML bold action

hello,
i am currently using the markdown editor and would like to add a custom action for making a selected text bold…
but instead of being in markdown with ** SELECTION ** I would like it to be replaced with

<b> SELECTION </b>

How can I achieve that?
Thanks

Try the action below. I’ve made it so that you can just swap out the content of the template tag with the base HTML tag name that you want to use so you can get re-use out of it more easily. This one simply uses “b” for The Bring Attention To element.

1 Like

Thank you so much for this!!!

I’m curious as to what’s wrong with the standard Drafts implementation of bold. Is there a problem with CSS or something?

Maybe they explicitly need <b> - most Markdown engines create <strong> tags.

1 Like

Right. If their CSS were immutable and it keyed off <strong> I could see that. As one example.

Hello
Would it be possible to get the same action also for underline?
So instead of <b> and </b> having an action with <u> and </u> please?

I tried by myself with no success…
Thanks!

Change the “b” to a “u” in the template step. That’s all it should take.

However, that tag isn’t generally used for underlining per se any more. The original use of the “u” tag for underlining was actually deprecated in the late 1990s!

1 Like

Awesome, thank you very much.
I was looking into the script step and overlooked the first step!

Appreciate it