Skip to content

Instantly share code, notes, and snippets.

@aakash14goplani
Last active March 20, 2019 12:32
Show Gist options
  • Save aakash14goplani/8e2fb88a2380056c89cdb5feef1821f5 to your computer and use it in GitHub Desktop.
Save aakash14goplani/8e2fb88a2380056c89cdb5feef1821f5 to your computer and use it in GitHub Desktop.
Out of the Box Asset Include Button for CKEditor

The Aim is to design an element to be used with custom file link i.e. Out of the Box Asset Include Button for CKEditor

  1. Create Template
  2. For Asset Type: Required asset type for which custom link/button is required. For sake of example I will go with Image File Asset.
  3. Applies to subtypes: Any (preferably)
  4. Legal Arguments: This is very important point. you need to provide arguments which you want while uploading an image (per my example). Here I want to enter alt text and image alignment value when Image is to be embedded in CKEditor.
    • Enter the Argument name. e.g. "Alignment" and then enter corresponding values. = Element Usgae: Set this to "Usage Unspecified"

OOTB 11
OOTB 12
OOTB 13

  1. You should now see "Asset Include" button enabled in CKEditor
    OOTB 14

  2. Drag & Drop Image asset, Template options will pop-up, select your target template and then you should see the options that we configured. OOTB 15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment