Fast Highlight

All this needs now is a “Highlight” button!

Could a Theme Component work for this, or would it need to be a Plugin? Any existing starting points would be stellar for me to get started looking into it!

Maybe duplicate the “Quote” button functions and re-style the result… hmm…

sharpie markers lol GIF by Sharpie

4 Likes

this feature is clearly a good idea

2 Likes

Why? (+ few characters more…[1])


  1. that limit actually quite often increases noise that decreases ↩︎

1 Like

What would the highlight button do @denvergeeks? Can you give me an example of when you’d use it?

2 Likes

@JammyDodger - I use Discourse for a variety of different use-cases.

For me Discourse is a toolset for building information “containers”.

I host my own 10 private (for now, and growing) instances for my various creative projects and collaborations. Each one is a unique workspace for something I’m passionate about, and customizing each workspace is half (or more) of the fun as I build my creative empire!

Highlighting is just one more awesome way I can call out and mark up certain information that I want the eye to be drawn to, in order to simplify (and make more fun and interesting and compelling) my own (re)reading and comprehension and editing for both myself and my collaborators.

Wow. To be able to swipe a block of text and pop a background color on it, right on the face of the page; or instantly add a footnote/annotation/tooltip (next on my list if I can figure out how to add more buttons to the fast edit - !!!)

I think I would never get any sleep at all anymore I would be so productive!

https://www.google.com/search?q=highlighting+text

1 Like

Ah, so you’re looking to highlight the selected text within the posts (rather than quote it with highlight prefilled in the composer). Sort of like a targeted staff-colour style concept?

2 Likes

Yes. The Mini Editor box that pops up does accept BBCODE so I’m thinking that the Highlight button could, right inside the mini-box, just wrap the selected text inside a bbcode like this

[bgcolor=#ff8]this text would then have a yellow background[/bgcolor]

@merefield’s tidy little TC might be able to be used – I’m looking at it…

If we wanted to go fancy, the button could pop up a tiny bbcode toolbar like this…

https://www.phpbb.com/customise/db/extension/advanced_bbcode_box/

2 Likes

I think this would be an awesome feature and I also think it would be difficult to develop.

It makes me think of this project that was never released:

1 Like

So here’s my tiny hack of @merefield’s bitty colouring TC…

It works in the composer, so a start!

2 Likes

My idea for the coloring would be to use [wrap=highlight] around the stuff you want highlighted and then apply the style to <div class="d-wrap" data-wrap="highlight">

The next step would be to add a composer button to apply the highlight to selected text in the composer, and then you could go about doing it without opening the composer.

Discourse Mermaid is a good theme component to use to see how to add a composer button. That targets code-blocks, though. https://github.com/literatecomputing/discourse-qrcode-wrap-theme-component is a theme component that I wrote that generates a qrcode using a wrap.

2 Likes

I think that <ins> could also do the job

1 Like

Thank you!!! Studying those now…

https://github.com/literatecomputing/discourse-qrcode-theme-component is the correct URL (or… er… anyway the other is 404)

2 Likes

If you want to have an example that uses code-blocks rather than using [wrap]. I don’t think you want code blocks.

That one is 404 - got a working link?

I think MD Composer extras has one in, though I’m unsure how to make this the same as the floating fast edit one?

1 Like

Sorry. It was private. Fixed now.

You and me both, brother!

I think you’d need to wade into the discourse source.

2 Likes

@pfaffman could you please clarify “without opening the composer”?

I thought what you wanted was to be able to do a “fast edit” so that you could add the highlighting without opening the full composer.

Like this:

image

But maybe with a “highlight” button there (which might not be so hard). And what it sounded like you really wanted was a single click that would edit, apply the highlight, and save.

Yes indeed, that is exactly what I’m seeking.

Alright well now I’ve got 2 working theme components rolled for this…

and

The one above I modified from @merefield’s Coloured Text TC.

Now want to make it a quick edit tool.

3 Likes