-
Notifications
You must be signed in to change notification settings - Fork 129
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
Update froala to v2 #355
base: master
Are you sure you want to change the base?
Update froala to v2 #355
Conversation
Hey, macrozone. I was able to upgrade to v2, there's still some bugs I have to iron out though. Right now, I'm working on integrating my server to to show images from the images I upload to the filesystem show on the image-manager. |
I am able to upload the images to orion-filesystem (with vsivsi:orion-file-collection) without any problems so far. to show images in the image manager i would use https://www.froala.com/wysiwyg-editor/docs/options#imageManagerLoadURL and would define a server-sider-route that uses the orion.filesystem.collection to return the required json. Unfortunatly there seems to be no api where you could directly return the array of images available, so we need this workaround with old-fashioned rest-calls. |
"define a server-sider-route that uses the orion.filesystem.collection to return the required json." Is there an example on how to define the server side routes and the make old fashioned rest calls? Sorry I'm still learning requests/responses.. |
iron:router has support for server routes: http://iron-meteor.github.io/iron-router/#server-routing in this case, Restivus would also be a nice and easy choice: https://github.com/kahmali/meteor-restivus |
Hey macrozone, any progress so far? Stuck on anything? |
no, had no time to work on that yet. But I asked the froala team, if there is a api where you can return a javascript-array or object instead of calling a rest-interface, but there is no such api yet. |
ok, made it work 👍 See my updated pull request. |
Awesome! I've been playing around with it all morning.. This is what I changed so far in the froala_server.js file. Added 'file-attribute' to the uploader option. But does't seem to work, any clue what I did wrong? Api.addRoute('froala/images/', { |
to display pdfs you would need to have thumbnails of the pdf. https://github.com/CollectionFS/Meteor-CollectionFS has a feature that enables you to store multiple versions of one file, e.g. scaled-down thumbnails. You then could convert the pdf file to a image file and store it as a thumb. But it would also require additional changes on froala, because pdfs are not images and can not be handled equally. The editor would insert an img-tag and try to load the pdf in it. this would fail. Maybe you can explain your use case? |
My use case is my company wants to use the docs collection, |
Hello Marco, Have you had styling issues when using froala v2 and materialize? I've had On Sat, Dec 5, 2015 at 6:36 PM, Marco Wettstein notifications@github.com
|
I did not try materialize yet, so I can't tell. Maybe you can share your css-patches. |
Here what I've got so far. If you have some that I dont have , please share as well. Thanks. |
Would love to use Froala 2 for a site I'm building now. What's the status of this merge? Github still says "This branch has conflicts that must be resolved" |
It seems like it's not ready. Not all the items are marked. Is this ready @macrozone? |
Hi there, its like the state above. In addition to just update froala2 I implemented support for the imageManager of froala2. There is room to improve this like stated above, but I think this should be scope of another PR. The PR is not up to date with latest froala2 and orion, but this should be a minor thing to fix. (I do not use it currently in a project, so i did not continue to work on this PR). I can try to update it with the latest versions this weekend, but feel free to fork and try out the update. |
I think it's a better idea if you create a package |
Hello there macrozone & nicolaslopezj! Good to see you guys again. Hey, I've been trying to connect the upload file from froala v2 onto my own server, however I haven't had alot of success. And here's the code that I have so far. As you see I've used the restivus template from the image manager to try to re-create the same functionality. However with upload file it has to be a post request. froala.js froala-server.js |
Use froala v2 for orion with imageManager-support
If you want to test it now, you can use this package: panter:orion-froala2