-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements file-upload via dropzone #2508
Conversation
We sadly cannot upgrade Elemental to I copied your changes locally and tried to drag-n-drop an image onto the Markdown field but that didn't work – what did I understand wrong, I thought that was the functionality this PR adds?
Why not just take |
I agree, that's a clearer UI in my opinion |
My idea was not doing something already "built-in", which is yet possible. But first how it works right now: in every markdown field, you can, on the Here you can configure an endpoint which would receive the uploads, example from my own keystone website code: Doc.add({
title: {
type: Types.Text,
required: true
},
content: {
type: Types.Markdown,
markedOptions: {
renderer: docRenderer,
gfm: true
},
dropZoneOptions: {
disablePreview: true,
url: '/services/upload/doc/'
},
height: 600
}, ... The Also you have the option to upload to external hosting services. Anyway, if a "just works" (tm) implementation is wanted, i can with some direction (@JedWatson i'm looking at you) to write that code. I'm thinking about having a fixed location where put those uploads, and a global option to enable that on all markdown fields? |
In any case, if the elemental octicons 3.5.0 update is not accepted, do you want i replace the non existing on 3.1.0 icons with just text? |
Ah I see, thanks for the clarification - let me try again when I'm up and awake. Yes, please replace the non-existing icons with suitable alternatives and/or characters. Thanks! |
A new PR on elemental: elementalui/elemental#147 @mxstbr I did use just text, as i dont see any alternative on octicons for bold, italic, and headings (or text-size) Hope this is accepted (i choose not to make the changes on the boostrap-markdown editor, as somebody can use that project with current v3.5.0 just fine) The current look is like this: |
Yes, i know. But mi idea looking at the future, was at some point being able to use bootstrap-markdown as a dependency, and not a copy local to keystone as it is now, including the "customized buttons" its using right now. So my take was to improve bootstrap-markdown in two ways: the dropzone integration, and lately, the octicons support. If there is no intention on using upstream boostrap-markdown, u can leave the buttons like they are right now, they will work. Anyway, the update is needed anyway for the dropzone thing. Hope there is nothing else to discuss and let keystone go go go!!! |
Lets stick with the old buttons for now, and take a look at using upstream bootstrap-markdown in another PR! Can you update this to use the old buttons and then we can finally land this 👍 Thank so much for taking the time to implement this! |
I just looked how the icons are right now on master, and i really really think the new option is better: the current icons depend on a nasty hack on boostrap-markdown where gryph icons are changed to mce icons css styles. I know my solution is also a hacky one, but i think its not so "ugly" Anyway now i'm looking into making them just look better, as much as possible as before my PR |
@JedWatson @mxstbr Any chance to merge this ? |
…just the current Session
I'm closing as i'm now using my fork for my own keystone "with features" :) |
@jacargentina would you mind if I pick up on this PR where you left off? I'd really love to see this happen, and I have the time to spend on it. |
@tmaclean-LV you' re welcome. |
Fixes #2071
Now integrates with octicons!
Depends on elementalui/elemental#146