by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Miguel Michelson Martinez
    @michelson
    u welcome!
    saranghills
    @saranghills
    Dear Michelson, thank you for the Dante editor. I tried the jquery version. The editor is working fine. However, I couldn't figure out how the file is saved nor the images uploaded. This is obviously because I am a newbie. Could you please help here? I mean guide me in the right direction? For image uploading I put a php file and the images are being uploaded. However, I know that your editor already has the feature embedded.
    Miguel Michelson Martinez
    @michelson
    Hi @saranghills , Dante will upload via http POST , so you have to do the server side part , look at this issue on github michelson/Dante#44
    Mohammad Moein Hoseini Manesh
    @moein7tl
    @michelson when you will merge master with paste-fix branch?
    Miguel Michelson Martinez
    @michelson
    @moein7tl this week I hope
    saranghills
    @saranghills
    Thank you @michelson. I followed that thread and got the saving part right.
    Miguel Michelson Martinez
    @michelson
    @saranghills u welcome
    Miguel Michelson Martinez
    @michelson
    saranghills
    @saranghills
    I have one more question.
    I am trying to save the content into a database. Currently every change is saved as a new record in the db. I am getting the last insert ID from SQL. If I can pass the same back to the editor, I can restrict the script to update that record instead of adding a new record for every change. How do I pass something back to the editor page? I guess its something ajax, but couldn't figure out how.
    Miguel Michelson Martinez
    @michelson
    Hi @saranghills I think that is outside the scope of the library. anyway I think that you could do it updating the action url of the form with the last id of the record, so if you get ID 10, then you change the action in the form to /posts/10/edit, then the next save are going to be routed to that url , so you could apply some logic to find the record with ID 10 and update it instead of insert a new one.
    in my own implementations I create the record instantly (with a draft state) when the user press the <new post> button, so I always do UPDATE on the existing record when use changes post or press save.
    André Bazaglia
    @bazaglia
    Hey Michelson! When the editor is initialized with no content, two paragraphs are created. The first one is for the placeholder (class graf--first) and the other one is a null paragraph (class graf--last). If the last paragraph is clicked (and not the first one), the placeholder won't disappear and also the (+) button won't appear. Is it a known bug? Thank you both for the attention and for this great editor. :smile:
    Miguel Michelson Martinez
    @michelson
    Hey @bazaglia , is not a known bug :fire:
    I will try to check it and fix it in the next days, thanks for reporting
    if you can submit an issue in github with an screenshot would be great :shipit:
    André Bazaglia
    @bazaglia
    @michelson yes sure! Issue #97 created: michelson/Dante#97
    Miguel Michelson Martinez
    @michelson
    @bazaglia thanks!
    fkamras
    @fkamras
    Hey all. Awesome editor. I'm having some trouble displaying the content as a non editable. Do I need to use the embedly plugin or call a dante function? The embedded videos are only shown as links and the images are there but not visible because of the positioning from the dante styles... Thanks!
    Miguel Michelson Martinez
    @michelson
    @fkamras it's hard to tell what would be the cause of the problem, maybe you could fill an issue with screenshot and tell us what is your environment, broser, OS, etc..
    Serge
    @herkyl
    Is it possible to npm install Dante?
    imerkle
    @imerkle
    is there any way to use it directly with .js file ? using cdn it would be really simple coz i dont use Ruby Gem . But i liked your editor
    Barnabas Nomo
    @Kowus
    Hello all, I have a noob question, Since Dante was built on top of draft (which is React) can I use it in a Vue.js App?
    Alexandre Gorius
    @1hkr
    Hello ! I'm super noob ! I'd love to add your editor to the rails app I'm building but I face an unstoppable "new:107 Uncaught ReferenceError: Dante is not defined". I started by trying the Dante v1 because I don't really understand how to set the second version. So I followed your instructions for the first version but I'm screwed. Do you have any simple ideas to share with me to help me fix it ?
    Alexandre Gorius
    @1hkr
    PS: I did load underscore :D
    Karthik
    @ugkarthik
    Hi
    Karthik
    @ugkarthik
    The images are not uploading. I am using dante2
    I am using this config,
    editor = new Dante(
    {
    //api_key: "86c28a410a104c8bb58848733c82f840",
    el: "editor",
    content: window.PocData,
    debug: true,
    upload_url: "http://127.0.0.1:8000/update/collection/",
    store_url: "http://127.0.0.1:8000/update/collectionss/",
    //method: "POST",
    data_storage: {
    save_handler: function(ctx, content){
    console.log("SAVING DATA!!");
    console.info({
    editor_content: JSON.stringify(content),
    text_content: ctx.getTextFromEditor(content)
    });
    },
    }
    }
    )
    I have returned the image url as response for http://127.0.0.1:8000/update/collection/
    Karthik
    @ugkarthik
    Then images are not displayed
    Miguel Michelson Martinez
    @michelson
    hard to tell what the issue is
    try to debug the json response of your server
    Karthik
    @ugkarthik
    I returned the full path url of the image
    I returned the response in string not as json
    What's the json format of the response?
    Maxime Castres
    @Mcastres

    Hello ! First of all, I love your editor !

    I don't understand how I'm supposed to set headers for image upload since the headers: {} is inside of data_storage: {}

    document.addEventListener('DOMContentLoaded', function () {
            editor = new Dante({
                el: "editor",
                content: JSON.parse(content),
                upload_url: "blablabla", 
                data_storage: {
                    url: "blablabla",
                    method: "PATCH",
                    headers: {
                        'X-CSRF-Token': token
                    }
                },
                xhr: {
                    before_handler: function (xhr) {
                        console.log(xhr);
                    },
                    success_handler: function () {
                        UIkit.notification("Your description has been saved", {
                            pos: 'bottom-right',
                            status: 'success'
                        })
                    },
                    error_handler: function () {
                        UIkit.notification("Unable to save your description", {
                            pos: 'bottom-right',
                            status: 'danger'
                        })
                    }
                }
            })
            editor.render()
        }, false);

    How can I do this ?
    I thought about setting header in xhr object in the before_handler but xhr doesn't exist...

    Miguel Michelson Martinez
    @michelson
    Hi, use config.upload_headers
    or just override the uploader with config.upload_handler
    Maxime Castres
    @Mcastres
    @michelson Thanks ! It's working great !
    Maxime Castres
    @Mcastres
    There is no explanation of how Oembed links works on the repo ?
    Maxime Castres
    @Mcastres
    Hello @michelson ! I'm facing a problem with Dante fonts in production. I do a rake assets:precompile in order to compile assets locally and then deploy in production. The thing is I get an error like not found 404 fontello.woff
    The problem is in Dante css file we have
    src: url("./fonts/dante/fontello.eot?#iefix") format("embedded-opentype"), url("./fonts/dante/fontello.woff") but now the file is fontello-276c546891e66d809466dbd99956ad6ef2b42a5c7e3938304b51d6301816a94b.woff.
    Do you know how can I solve this ?
    Miguel Michelson Martinez
    @michelson
    hi @Mcastres are you using dante1 or dante2 ?
    Maxime Castres
    @Mcastres
    I'm using dante2 :)
    Miguel Michelson Martinez
    @michelson
    @Mcastres that's good, install latest version with yarn add Dante2@next , it will just work
    Maxime Castres
    @Mcastres
    Thanks !
    Miguel Michelson Martinez
    @michelson
    u welcome
    Maxime Castres
    @Mcastres
    Hello ! I think I'm missing something but I try to only have the image uploader button inside my widget, I have this in my Dante object base_widgets: ["uploader"], but it's not working. Did something changed ?
    Maxime Castres
    @Mcastres
    @michelson ?
    Miguel Michelson Martinez
    @michelson