(アルファ) 画像注釈ツール - プレビュー内で直接画像に注釈を追加!

(音声なし)

画像注釈ツール(アルファ/プレビュー)

リポジトリ: https://github.com/labofoz/discourse-image-annotator
インストール用ブランチ: discourse
コンポーネントサイズ: 約 42KB
Marker.js への依存: ライセンスを確認(帰属表示または購入が必要)


私は Discourse を、Evernote の代わりとしてカスタマイズ可能なツールとして活用していますが、欠けている機能の一つに画像への注釈付けがあります。この Discourse テーマコンポーネントは、トピックのプレビューに Marker.js を追加し、画像をクリックすると「注釈モード」が有効になるようにします。これにより、以下の操作が可能になります:

  • 四角形、図形、矢印、テキストの追加
  • 画像の一部のハイライト表示または隠蔽
  • 注釈付き画像をクリップボードにコピー
  • 画像をエディタに貼り付け、元の画像を保持するか削除するかを選択可能
  • モバイル対応は近日予定

プレビューから編集済みの画像をエディタにコピーして貼り付けるため、他のコピー&ペーストされた画像と同様に、自動的にアップロードされます!

現時点では最適化は行われておらず、基本的には Marker.js リポジトリ のバンドル版です。バグがある可能性もありますし、現在もさまざまな注釈ライブラリを検討中ですが、まずはスニークプレビューとしてご紹介いたします!


インストール画面

現在も実験中のため、メインブランチはソースコードの管理場所となっていますので、当面は discourse ブランチを使用してください(近々修正する予定です):

「いいね!」 48

Wow, that looks incredibly useful - I could imagine it has more uses than simply annotating (memes :wink: ). Excellent, I’m super proud and impressed of the continuous stream of talent and innovation that’s coming from the Discourse community! :trophy:

「いいね!」 3

As if you brought MS Paint into Discourse :slight_smile: This looks really good.

「いいね!」 2

Very cool! can this be done without the cut-paste step at the end? Just trigger the upload direct once editing is done?

「いいね!」 14

Yeah, this is the only hindrance I see.

「いいね!」 1

Sounds awesome! This is going to be added to our forum soon! I think it might be cool if you can crop images. Anyways, great job @labofoz! Though, I do understand this is a theme component for annotating.

「いいね!」 5

That’s a great point! I think it’s definitely possible but I think I’m going to do a more complete discourse integrated one from scratch over the weekend. I have a few other components I’m working on and I’d like to just reuse the dependencies Discourse already has.

The more I experiment the more I think I can get this down to just a few Kb vs 42, and with better integration and mobile support!

That’s a great point and definitely on my mind, I wanted to drag and drop collages together on the go so I’ll give this a try over the weekend too!

「いいね!」 17

Incredible. Love it!

「いいね!」 1

Very cool! I would love to use this, it has a lot of glitches but I’ll hold back feedback if you’re going to re-write it from scratch. Would love to see cropping as well. Looking forward to see where this goes :+1:

「いいね!」 2

Thanks! I released this a bit early to collect feedback ahead of time so feel free to list anything you find

Cropping is a great suggestion (especially for mobile users), so I’ve added that to my todo! I should have the first production ready version by eod Sunday. I’m just planning everything out now because I’d like it to be super simple for end users to use (like it’s not even there)

「いいね!」 8

It’s just a bit clunky right now, like the toolbar doesn’t always show up, the annotations move when you scroll, sometimes a new annotation doesn’t appear in the visible window and you have scroll down or make the composer bigger to find it. The finish checkbox does nothing for me, so the copy/paste functionality doesn’t work. If you close the composer window the annotation still stays until you X out of the annotation bar.

「いいね!」 2

Thanks that’s good feedback, I’m just going to do it from scratch as it would be less work for me than debugging it. There’s definitely some interest so I’ll work on a new version with everyone’s feedback over the weekend!

「いいね!」 6

Hi! Nice plugin!

But it’s not working on our community :sweat_smile:
Console reports this:

/theme-javascripts/03bd904a31a109db9cd635a25a5c572d54442e65.js?__ws=community.kodular.io:2 Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
    at Image.a.onload (https://community.kodular.io/theme-javascripts/03bd904a31a109db9cd635a25a5c572d54442e65.js?__ws=community.kodular.io:2:3725)

Any idea what can be causing this?

Hi, thanks for reporting this! From that alone I wouldn’t be able to tell, but I should have the newer version out either tonight or tomorrow (probably tomorrow)

I mostly made this for myself using off the shelf tools just to see if the idea would work out, so I didn’t test this too much. I’ll post back when I have the update (which will probably be quicker to fix anyways :sweat_smile: )

「いいね!」 8

Hey everyone, I’m still working on this but I’ve been trying to find a job too so I’m a little behind. I ended up learning the Discourse API and moved everything into a modal so that it’ll work on mobile devices too, is compatible with whatever theme you already have, and should be future compatible with Discourse.

I’ve also made progress on autosaving, which you can see in this video. The project will also be less than 5kb (since it uses Discourse’s core dependencies) and I’m trying to learn best practices, so you’ll have plugin hooks etc if you’d like to extend the annotator.

I should have this ready for sure by Sunday, but just wanted to give a quick update!

「いいね!」 20

Hi @labofoz, has there been any updates on this? It seems that your github link is broken, and I couldn’t find your username there, either.

Temporary moved to the #theme:broken-theme category until the component is fixed.

「いいね!」 7

I loved this theme, and I want to keep using it. @labofoz can you update the link or was the repository removed?

「いいね!」 2

このプロジェクトが復活することを心から願っています!

「いいね!」 1

この機能は素晴らしいと思います

「いいね!」 1