Configuring the editor

Follow

Comments

40 comments

  • Avatar
    Jason Navarro

    Hello Again!

    When working with onSave function I am able to download the template.html file no problem but I am wondering what happens to the images that I upload. I see they are stored at eu-bee-resources.s3.amazonaws.com, How long are these images stored? My only concern is that it may be possible that a client may not want their images up in a public space and may want to host their own.

    Also when using onSave with the plugin is there a way for the plugin to create a ZIP of the resources instead of just an HTML file just as it does on the main site or is that something we will have to build into script.

    Thank you!

    Jason

    0
    Comment actions Permalink
  • Avatar
    Massimo Arrigoni

    Hi Jason: thanks for the comments! Images will be stored indefinitely up to the allotted amount, if you are using the FREE plan. If you are using a Premium plan, there is no storage limit. The Premium plans (see https://support.beefree.io/hc/en-us/articles/360004495632-How-much-is-BEE-Plugin-) will also include the ability for you to use your own file system.

    At this time, there is no built-in functionality to output a zip file with the HTML and the images. That's what we do on our showcase site https://beefree.io: the site is a client of the plugin, so you could certainly do the same in your application that embeds the plugin.

    Hope this helps!

    0
    Comment actions Permalink
  • Avatar
    Jason Navarro

    Thank you Massimo! This is great. I found out how to insert an image without having to upload one. By right clicking inside of the Text Content area it gives a few more useful options.

    0
    Comment actions Permalink
  • Avatar
    Jarosław Królewski

    Big problem. I can not save configuration (silver plan) :(

    I got: Failed to update configuration

    0
    Comment actions Permalink
  • Avatar
    Massimo Arrigoni

    Hi Jaroslaw, not sure what the problem might be. It's working correctly in our tests. We've escalated your request. In the future, please open a support ticket from within the account management area at developers.beefree.io. Thank you!

    0
    Comment actions Permalink
  • Avatar
    Jarosław Królewski

    Hi,

    Screen with issue after saving options.

    I can not find "the account management area at developers.beefree.io"

    thanks for quick reply

    0
    Comment actions Permalink
  • 0
    Comment actions Permalink
  • Avatar
    Guillermo Padilla

    We added a new method to show or hide the message structure outlines from your own UI.
    Just trigger beePluginInstance.toggleStructure() from a button or other UI element.

    0
    Comment actions Permalink
  • Avatar
    Alex Browne

    Is is possible to assign a function to the callback after it has been initialised?

    0
    Comment actions Permalink
  • Avatar
    Samuele Verzi

    Hi Alex
    No we don't have it right now, but we have it on the roadmap for the future. We are going to keep you updated on it

    0
    Comment actions Permalink
  • Avatar
    Nitish Singh

    On setting preventClose: true in beeConfig,
    the browser is giving me alert every time I want to leave the page, even if it is saved.

    0
    Comment actions Permalink
  • Avatar
    Nitish Singh

    Also can there be an onChange event.?

    0
    Comment actions Permalink
  • Avatar
    Nitish Singh

    Is there any option, to get the current JSON of email template.?

    0
    Comment actions Permalink
  • Avatar
    Guillermo Padilla

    Hi Nitish, the 'onSaveAsTemplate' event returns the JSON only, if this is what you mean.

    0
    Comment actions Permalink
  • Avatar
    Guillermo Padilla

    About your precedent questions, the preventClose won't be triggered when the Save action is configured to close the editor.

    0
    Comment actions Permalink
  • Avatar
    Nitish Singh

    Okay.
    We have implemented the editor, such that if the user just saves the template, we save the data and still remain on the same page, then the user can choose to again change or send the mail.
    In case there are unsaved changes, before window unload I just want to compare the current JSON with the last saved JSON, I have the last saved JSON, but if I use the OnSaveAsTemplate or any other event, the browser just kills the thread and unloads.
    If the current JSON would have been available locally in the browser, then I could just compare it and warn the user of loss of unsaved changes.

    0
    Comment actions Permalink
  • Avatar
    Guillermo Padilla

    Hi Nitish, the OnSaveAsTemplate callback is designed to be used several times during the editing work, so is performed in background.
    It will returns the current status of the JSON (as all the other methods).

    If I correctly understood your workflow, you can perfectly use the onSave callback perfectly (using beePluginInstance.save() as trigger), perform a JSON diff, alert the user if needed, decide what to do with both files (JSON and HTML).
    Hope this helps.

    0
    Comment actions Permalink
  • Avatar
    Chris Blair

    Just discovered your wonderful editor and am testing the sample code for a client. I'm not a full-time programmer (or really even a trained programmer) but I build websites and implement and customize PHP applications quite a bit. I've got the sample code installed and working and am able to save templates and html...but I can't figure out the function to send a test email. I've tried a few configurations but can't get it working. Are there any examples on your site or any resources that could point me in the right direction? This is an app that I believe I could easily sell to some of our clients along with Mautic, which we're preparing to switch some clients into for their email and marketing automation.
    Thanks, Chris Blair
    VP, Creative Dir.
    Magnetic Image, Inc.
    Evansville, IN

    0
    Comment actions Permalink
  • Avatar
    Massimo Arrigoni

    Hi Chris, that function does not give you a ready-to-go "Send a test" feature, but rather allows you to pass the HTML of the message to some script that will take care of the task on your side. It could be a form loaded in a modal window, or alike.


    The code for that form is entirely up to you. There are lots of samples on the Internet: from a quick search, for instance, I found this for PHP: https://bootstrapbay.com/blog/working-bootstrap-contact-form/


    Whichever form you decide to use, instead of asking the user to create the message to be sent (e.g. by showing a textarea field), you will hide that field and instead use the HTML received from the editor.


    We hope this helps!

    0
    Comment actions Permalink
  • Avatar
    Chris Blair

    Yes I was originally trying to send the output to a PHP script that uses sendmail on the server. But I must have something coded incorrectly. So thanks for the pointer!

    Chris

    0
    Comment actions Permalink
  • Avatar
    Ivelin Ivanov

    Hello,
    onSaveAsTemplate: function (jsonFile) { // + thumbnail?
    saveTemplate(jsonFile);
    },

    We save JSON to our server so, we can create a gallery with user templates, but how we can get thumbnail without pressing SAVE button, because, we use this for other stuffs.

    0
    Comment actions Permalink
  • Avatar
    Massimo Arrigoni

    The editor does not generate a thumbnail. To generate a thumbnail you indeed need to save the HTML and then do so on your side.

    0
    Comment actions Permalink
  • Avatar
    Ivelin Ivanov

    Thank you Massimo, but how can i get HTML code, without pressing SAVE button, because we want, when our users pressed Save as template button to get thumbs for their drafts later for edits

    0
    Comment actions Permalink
  • Avatar
    Massimo Arrigoni

    Hi Ivelin, to obtain the HTML, the system needs to parse the JSON and turn it into HTML code. That task is somewhat time consuming (a few seconds). For this reason, the process is not included - for example - when an autosave happens.

    0
    Comment actions Permalink
  • Avatar
    anurag

    Hi Massimo,


    I just started using this plugin and having a good experience overall. I have a query though can we customize the ui for e.g. adding a separate button to 'Save as Template' adjacent to existing 'Save' button.


    Can we somehow get htmlfile too in 'onSaveAsTemplate' callback.

    0
    Comment actions Permalink
  • Avatar
    Guillermo Padilla

    Hi Anurag, You can hide completely the Toolbar and add your own UI. Take a look to: https://support.beefree.io/hc/en-us/articles/360004545691-Customizing-the-toolbar

    If you need the JSON and the HTML, use the .save() method described in the last section, if you only need the JSON "template", use the .saveAsTemplate().

    0
    Comment actions Permalink
  • Avatar
    stukak

    Hello! Could you provide "onBeforeSave" method to handle unsaved states that less that 15s intervals. Also good to have ability to prevent savings or closings when user have unsaved changes. Thanks in advance. Alex

    0
    Comment actions Permalink
  • Avatar
    Guillermo Padilla

    Hi stukak, the preventClose param described in the above article trigger an alert when the user browses out. I'm not sure to understand what's the purpose of an "onBeforeSave" method. What event may trigger it? Why not using the already existing saveAsTemplate when you need it?

    0
    Comment actions Permalink
  • Avatar
    stukak

    Hi Guille, We open editor in modal window, so we want be sure that user have unsaved changes before modal will destroyed. 15s autosave is too much time to trigger properly and preventClose method is ignored in modal state and we got any luck with methods that we have for now. It would be more comfortable to have methods that will parse current state on demand and method that will be triggered before saving.

    0
    Comment actions Permalink
  • Avatar
    Guillermo Padilla

    In this case, the answers in this thread may help you: https://support.beefree.io/hc/en-us/community/posts/360010540011-Detect-if-unsaved-work-is-present

    Would be hard for the plugin to catch application events (for all the web-applications, with different workflows and technologies). By the other hand, your application knows these events (when the user clicks on the close link or void space) so can trigger a saveAsTemplate before closing the modal, this is a fast action and will return you the JSON. You can also trigger the save action to get the HTML, but it's not as immediately as retrieving only the JSON.
    Then, the flow to understand if the message has been edited or not, is described in the post linked above.
    Hope this helps.

    0
    Comment actions Permalink

Please sign in to leave a comment.