nextnote icon indicating copy to clipboard operation
nextnote copied to clipboard

Implement stylus support

Open brantje opened this issue 6 years ago • 12 comments

Some users would like to make drawings. Currently TinyMCE doesn't support this. We can use this plugin to give them the ability to make a drawing. Note that the drawing must be saved as base64.

brantje avatar Apr 09 '18 08:04 brantje

Great! I was looking for an open source alternative to use as replacement for OneNote on my city council. There is NONE. Stylus support could seem silly or useless, but normal users (not the geek ones) founds it just perfect to share some sketches with others, or make a quick note on their mobile devices. Thinking about it, tech-savy users can enjoy that tool too for do quick diagrams. If you get it, you will be the very first the truly open source alternative to microsoft onenote

adocampo avatar Apr 09 '18 08:04 adocampo

Well main problem is that the function will hide behind a button. In a perfect word i could detect if there is touch / stylus support needed and display a canvas. But i think, this would do for now.

brantje avatar Apr 09 '18 08:04 brantje

Not sure how well this would work in a web browser... Also, if saved as base64 it can't be modified later on, right?

ThomasDaheim avatar Apr 09 '18 12:04 ThomasDaheim

It will open in a popup, so normal users won't see it. Modification isn't possible. From the plugin approval page: Also, it seems not possible to edit an existing sketch, maybe this worth mentioning in the plugin description source

brantje avatar Apr 09 '18 12:04 brantje

Looks interesting. Unfortunately, in the moment I'm using prism.js as editor in my https://github.com/ThomasDaheim/ownNoteEditor - doesn't seem to work there out of the box...

ThomasDaheim avatar Apr 09 '18 13:04 ThomasDaheim

But prism is just a syntax highlighter, not a full featured editor like tinymce? What is your use case that you need prism in a note editor?

brantje avatar Apr 09 '18 13:04 brantje

I failed to get tinymce running properly under JavaFX. Simple as that... Also, prism.js so far covered everything that ownNote could do.

Unfortunately, I don't manage to attach a screen shot here where you could see for your self...

ThomasDaheim avatar Apr 09 '18 13:04 ThomasDaheim

JavaFX as in for a desktop app? I thought we've slaughtered java already :p.

What features are you currently missing in the editor?

brantje avatar Apr 09 '18 13:04 brantje

I prefer to work on the files locally and have them synched in the background with the nextcloud desktop. Thats usually a lot faster than trying to edit in the browser (at least for me).

ThomasDaheim avatar Apr 09 '18 13:04 ThomasDaheim

What app(s) are you using? Maybe i can mimic their api.

brantje avatar Apr 09 '18 13:04 brantje

I don't really have the need for an api - I'm happy with working on files locally (and offline if need be) and having the nextcloud sync taking care of things in the background.

ThomasDaheim avatar Apr 09 '18 13:04 ThomasDaheim

I have investigated a bit on this. I don't know how complex can it be to put together TinyMCE. All I could saw was pure HTML5 + JS, using the canvas tag. https://github.com/williammalone/Simple-HTML5-Drawing-App http://szimek.github.io/signature_pad/ https://zipso.net/a-simple-touchscreen-sketchpad-using-javascript-and-html5/

Perhaps is easy to create a plugin for TinyMCE: https://www.tinymce.com/docs/advanced/creating-a-plugin/

adocampo avatar Apr 10 '18 17:04 adocampo