VFS.Editor

Description

Feature Map

Editing

alt text

CopyFitting

Image Editing

Default Image Picker

alt text

alt text

The Image Toolbar

Command Packet Picker

alt text

This now uses two classes for image picking

How to Use

There are a few way to have the piece access the images for an element.

NOTE: It’s very important in the HTML to wrap the img element in a (div or td) with an id. The editor uses this div to build it’s controls.

Exact Match - specify the exact node and subnode where the image array exist you want.

<div bgcolor="#ffffff" id="e183702a8dbc4ca28d989af2814800fc">
    <img src="http://placehold.it/600x300" class="vfsEdit" vfs-image="template.imageArr1" style="width: 600px; max-width: 600px; height: auto; background: #dddddd">
</div>
<td bgcolor="#ffffff" id="e183702a8dbc4ca28d989af2814800fc">
    <img src="http://placehold.it/600x300" class="vfsEdit" vfs-image="user.dogs" style="width: 600px; max-width: 600px; height: auto; background: #dddddd">
</td>

Template Assumption Match - specify the exact node you want and the editor will check the root and if not found with then check the template node.

<td bgcolor="#ffffff" id="e183702a8dbc4ca28d989af2814800fc">
    <img src="http://placehold.it/600x300" class="vfsEdit" vfs-image="imageArr1" style="width: 600px; max-width: 600px; height: auto; background: #dddddd">
</td>

**Using a Div to inject the image into the background-image

<div id="divImageParent">
    <div class="vfsEdit vfImage" vf-image-property="background-image" vfs-image="imageArr1">
</td>

Sample Command Packet

    "version": "1.6",
    "type": "email",
    "jobId": "VE2017050920243446785ae1",
    "authentication": {
        "sponsorKey": "70d1e05967d44c8d9a550fefe4530633",
        "clientKey": "f03cbf3cabac41b0ad9518462c897d1c"
    },
    "email": {
        "subject": "Test Email",
        "from" : {
         "name": "John Public",
           "email": "john.public@velma.com"
        }
    },
   "template": {
        "Email_SubjectLine":"text here",
        "description": "VFS Email Editing Images",
        "mediaType":"Email",
        "name":"VFS Email Editing Images",
        "sku":"30551",
        "url":"https://s3-us-west-2.amazonaws.com/vfs-assets/user/dcarter/editor/ImageEditing/emailWithImages.html",
        "imageArr1": [
          {
            "url": "https://s3-us-west-2.amazonaws.com/vfs-assets/user/dcarter/editor/ImageEditing/image1.jpg",
          },
          {
            "url": "https://s3-us-west-2.amazonaws.com/vfs-assets/user/dcarter/editor/ImageEditing/image2.jpg",
          },
          {
            "url": "https://s3-us-west-2.amazonaws.com/vfs-assets/user/dcarter/editor/ImageEditing/image3.jpg",
          }
        ]
    },
    "user": {
        "AppUniqueID": "",
        "ID": 1010,
        "firstName": "John",
        "lastName": "Public",
        "companyName": "The really long first demo mortage company name that doesn't seem to fit",
        "dogs": [
          {
            "url": "https://s3-us-west-2.amazonaws.com/vfs-assets/user/dcarter/editor/ImageEditing/dog1.jpg",
          },
          {
            "url": "https://s3-us-west-2.amazonaws.com/vfs-assets/user/dcarter/editor/ImageEditing/dog2.png",
          },
          {
            "url": "https://s3-us-west-2.amazonaws.com/vfs-assets/user/dcarter/editor/ImageEditing/dog3.jpg",
          }
        ]
    }
}     

Color Picking

Class: vfColor - this enables an element to have a color injected.

Attributes: vf-color-property - this is the css property to inject the color.

To Enable: add “colorPicking”: “true” in the template node of the command packet (can be added from the Fulfillment library in Velma).

This enables the color picking symbol to appear in the editor.

E.g: alt text

Clicking this will show the color picker.

Use Color - Will inject the color into the editor specified elements. Clear Color - Will remove the color from the editor specified elements.

alt text

Html

E.g:

This will inject the color choosen into the background-color property.

  <div class="vfColor" vf-color-property="background-color" >
      <h3><b>Some Text </b></h3>
  </div>

This will inject the color choosen into the color property.

  <div class="vfColor" vf-color-property="color" >
      <h3><b>Some Text </b></h3>
  </div>

Color Picking Flow

Setting up command packet.

E.g:

alt text

alt text

alt text

E.g:

alt text

alt text

Color Picking with Image Thievery [BETA]

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
</CORSRule>
</CORSConfiguration>

E.g:

alt text

alt text

Characters Counts

The End