코드 블록 내용을 클립보드에 복사

:mega: Now live in core Discourse is the ability to show a copy button for codeblocks!

import { createWidget } from 'discourse/widgets/widget';

createWidget('my-widget', {
  tagName: 'div.hello',

  html() {
    return "hello world";
  }
});

This feature is off by default, but if your community could benefit from it, you can turn it on by enabling the show copy button on codeblocks site setting.

Some notes about the feature:

44개의 좋아요