As of today it’s now possible to edit a small selection of a post in few clicks.
Can be disabled with the site setting: enable_fast_edit
If the code is not able to define with certainty which part of the post should be edited, it will fallback to open the composer.
It doesn’t work with discourse-encrypt ATM
a keyboard shortcut
@Falco @sam @dan @tgxworld and @pmusaraj
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…
this feature is clearly a good idea
Why? (+ few characters more…)
What would the highlight button do
@denvergeeks? Can you give me an example of when you’d use it?
@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!
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?
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…
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:
I have a programming question related to a new feature that I am building on a theme component. I prepared a short video to demonstrate what I already have and where I am blocked.
Here is a short description though:
I want people to be able to “like” specific text inside posts (also other peoples’ posts) - not just the entire post.
Once a user selects a text, he clicks a new icon which in turn wraps the selected text with the [warp] block, which I then use to style.
So here’s my tiny hack of
@merefield’s bitty colouring TC…
It works in the composer, so a start!
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
I think that
could also do the job
If you want to have an example that uses code-blocks rather than using
[wrap]. I don’t think you want code blocks.
MD Composer extras has one in, though I’m unsure how to make this the same as the floating fast edit one?
Sorry. It was private. Fixed now.
You and me both, brother!
I think you’d need to wade into the discourse source.
@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.
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…
The one above I modified from @merefield’s Coloured Text TC.
Now want to make it a quick edit tool.