Shared-Edits Improvements

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"];
  });
</script>

then in CSS

.shared-edits-post {
  // do some work
}
5 Likes