brantje / nextnote

A full Evernote / OneNote style WYSIWYG note editor for Nextcloud / ownCloud. Join our telegram at: https://t.me/NextNote
GNU Affero General Public License v3.0
163 stars 19 forks source link

Implement stylus support #69

Open brantje opened 6 years ago

brantje commented 6 years ago

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.

adocampo commented 6 years ago

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

brantje commented 6 years ago

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.

ThomasDaheim commented 6 years ago

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

brantje commented 6 years ago

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

ThomasDaheim commented 6 years ago

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...

brantje commented 6 years ago

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?

ThomasDaheim commented 6 years ago

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...

brantje commented 6 years ago

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

What features are you currently missing in the editor?

ThomasDaheim commented 6 years ago

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).

brantje commented 6 years ago

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

ThomasDaheim commented 6 years ago

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.

adocampo commented 6 years ago

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/