Discourse Shared Edits

There is no CSS class to style only Shared Edits, is there? Would like to be able to create a theme component like “Wikified Posts Component” for this.


If you find out how to target Shared Edits posts, we would probably be best to roll them in together into a single component. You’d be welcome to PR on Wikified Posts Component!


You can add this to your theme common > header tab (or in /common/header.html in a remote component), and it will add a shared-edits-post class to shared-edit posts if the current user can edit them.

<script type="text/discourse-plugin" version="0.8">
  api.addPostClassesCallback((attrs) => {
    if (attrs.shared_edits_enabled && attrs.canEdit) return ["shared-edits-post"];

then in CSS

.shared-edits-post {
  // do some work

Done!! It is all rolled into the Wikified Posts Component now:

Thanks Joe - made it all possible!!

What I really need to target is the first revision-footer-button (with the text Edit Wiki) and hide it for Shared Edits posts only. Any way to get that class to cover the revision panel / dialogue too?


I pushed a few changes.

This is fixed. Toggling wiki on/off on a shared edit post will now show the correct label.

This is also fixed. If you click the button from the revision history modal AND the post is set to shared-edit it will open the shared-edits composer instead of the default one.

I added the class in the plugin. So, you can remove the snippet you added. The plugin will now add that class without needing any modification.

I’m guessing you wanted that because the button used to open the default composer? That’s now fixed, so you won’t need to hide it anymore.


This is still a dealbreaker for us: we try to have as few moderators as possible for privacy reasons. Hence we would LOVE to have an option that everyone who can start a wiki can also start the shared edits - basically it’s the same. By the way: we named this mode “WikiPad” - it’s more striking than shared edits.


Sure totally open to add a setting for “groups that are allowed to start shared edits” default to “staff” but allow you to change it to whatever you want.


What are the chances to make this happen? Again - this little tweak would be a gamechanger in our everyday work.


Thanks for this great plugin, which fits in really well with our use-cases to use Discourse to collaboratively take notes, brainwrite etc. While examining the plugin I have occasionally experienced glitches though, which are unfortunately hard to consistently reproduce.

What I have experienced is that a change done by user A is undone when user B updates the document, both changes being explicitly saved using the Save-button. I am assuming it could be caused by network connectivity and managed to reproduce the behavior as follows:

I know this seems quite artificial, but it was the only to reproduce the behavior I am experiencing every now and then. Has anybody else encountered this issue? Is there perhaps even a fix for it?