2 votes

Widget Dropper

OVERVIEW:

This package is to simplify the insertion or "dropping" of any kind of "widget" into the TinyMCE editor that might normally break or cause other unwanted problems. A widget can be any kind of HTML markup or code you want; for example, not just YouTube videos or iframes, but any other custom HTML, javascript, 3rd party widgets, etc. where you don't want TinyMCE trampling all over it.

The idea is that you keep your custom widget code (which again, could be a YouTube video embed code, javascript block, etc) in its own document/content node, and then inject (drop) that widget anywhere in the editor by its node ID using a regular content picker.  This simple approach is devised to avoid problems found in other solutions where macro parameters themselves can sometimes break things---for example, ever try to include a quotation mark character in one of your macro parameters, then you will know what I mean!

COMPATIBLE WITH:

  * Umbraco 4.7+, 4.8+, 4.9+, 4.10+, 4.11+, 6.0+, 6.1+, ...

PACKAGE CONTENTS:

  * Two 16x16 PNG icons from the FamFamFam Silk set
  * One macro + RAZOR script
  * A few sample content nodes to start with. (You can delete the sample widgets, but should keep the "widget container".)
  * That's it!  No DLLs or other binaries. You can use this approach right out of the box; no need to mess with TinyMCE's "TidyEditorContent" setting, which you can leave at its factory preset.

HOW TO USE:

  * Simply put your cursor into any Richtext editor field on your site, then click the "Insert Macro" button. Choose the Widget Dropper macro, then use the content picker to select the appropriate "widget" node. Save and preview your work!
  * Depending on how your site navigation is built, you may need to add an "umbracoNaviHide" property to the Widget Container document type if it starts showing up unexpectedly in your nav menus.

 

 

See the package README for usage, attribution, and further details.

 

UPDATE v1.1: Fixes issue where widget node's HTML returned as a DynamicXml object instead of a string. See post in forum for details.

UPDATE v1.2 : Removed a single, extraneous "@" character from line 20 of the razor script, which was ignored/allowed in older Umbraco versions but problematic in newer versions.

Screenshots

Package owner

Kreck Design

Kreck Design

Kreck has 33 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions:

Package Information

  • Package owner: Kreck Design
  • Created: 26/06/2012
  • Current version 1.2
  • License MIT
  • Downloads on Our: 2K