<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">Blog posts by Ben McKernan</title><link href="http://world.optimizely.com" /><updated>2019-11-07T10:44:00.0000000Z</updated><id>https://world.optimizely.com/blogs/Ben-McKernan/</id> <generator uri="http://world.optimizely.com" version="2.0">Optimizely World</generator> <entry><title>Creating a custom property editor using only react</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2019/11/creating-a-custom-editor-using-only-react/" /><id>&lt;p&gt;I recently held a presentation at Ascend Stockholm 2019 about how you can create a custom property editor using only react. That is to say, you don&#39;t need to write any dojo code. I started by asking the room if they had ever created a custom property editor and about half the crowd raised their hands. So it seems to me that this is a relevant topic and I hope you find it interesting at the very least.&lt;/p&gt;
&lt;p&gt;About a year ago I blogged about how you could use react in the edit UI (&lt;a href=&quot;/link/7b7dbf615d3d4e28a4bf977aa4672670.aspx&quot;&gt;https://world.episerver.com/blogs/ben-mckernan/dates/2018/11/a-react-gadget-in-episerver-cms-revisited&lt;/a&gt;). However, the biggest problem with that post is that it still required you to bootstrap your react component by writing dojo code. Which means that in order to integrate well with the edit UI you would need to have a pretty good understanding of what our code is doing since there isn&#39;t a clear API to work with. So when asked to present something at Ascend, I decided that I wanted to find and present a solution to this and I figured that the best scenario would be one where you didn&#39;t need to write any dojo code. Which is why I created the react-to-dijit-adapter (&lt;a href=&quot;https://www.npmjs.com/package/@episerver/react-to-dijit-adapter&quot;&gt;https://www.npmjs.com/package/@episerver/react-to-dijit-adapter&lt;/a&gt;).&lt;/p&gt;
&lt;h3&gt;How it works&lt;/h3&gt;
&lt;p&gt;The idea is pretty simple, the adapter will abstract away all the dojo parts. So you just create your editor as a react component and then in your entry point file, call the function provided in the node module, passing your component as an argument. You can then export the result of this function as the default export. Like this:&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color:&amp;#32;#555555;&quot;&gt;&lt;strong&gt;entry.js&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code&gt;import { asEditorWidget } from &quot;@episerver/react-to-dijit-adapter&quot;;
import { MyComponent } from &quot;./my-component&quot;;

export default asEditorWidget(MyComponent);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;asEditorWidget&lt;/code&gt; function will take care of mounting and unmounting your component at the correct time, as well as propagating props to your component from the edit UI. What is also nice about these props is that they form a very clear API for your component to interact with. Notably, &lt;code&gt;value&lt;/code&gt; which contains the current value and &lt;code&gt;onChange&lt;/code&gt; which is a callback that should be called when the value changes in your component. For example, if I wanted to create the textarea with statistics editor (&lt;a href=&quot;https://gregwiechec.com/2016/05/textarea-with-statistics&quot;&gt;https://gregwiechec.com/2016/05/textarea-with-statistics&lt;/a&gt;) that my colleague Grzegorz Wiecheć created a few years ago, it would look like this:&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color:&amp;#32;#555555;&quot;&gt;&lt;strong&gt;my-component.js&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code&gt;import React from &quot;react&quot;;

const count = (value) =&amp;gt; {
    const original = typeof value === &quot;string&quot; ? value : &quot;&quot;;
    const trimmed = original.trim();
    return {
        paragraphs: trimmed ? (trimmed.match(/\n+/g) || []).length + 1 : 0,
        words: trimmed ? (trimmed.replace(/[&#39;&quot;;:,.?&amp;iquest;\-!&amp;iexcl;]+/g, &quot;&quot;).match(/\S+/g) || []).length : 0,
        characters: trimmed ? trimmed.replace(/\s/g, &quot;&quot;).length : 0
    };
};

export const MyComponent = ({ onChange, value }) =&amp;gt; {
    const result = count(value);
    return (
        &amp;lt;&amp;gt;
            &amp;lt;textarea onChange={(e) =&amp;gt; onChange(e.target.value)} value={value} style={{ width: &quot;600px&quot; }} /&amp;gt;
            &amp;lt;div&amp;gt;Characters: {result.characters}&amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;Words: {result.words}&amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;Paragraphs: {result.paragraphs}&amp;lt;/div&amp;gt;
        &amp;lt;/&amp;gt;
    );
};&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And here is what it looks like in the edit UI and you can use the react devtools as usual.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/0b097e64267e4976896d054000d9cb72.aspx&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;You need to bundle&lt;/h3&gt;
&lt;p&gt;In its current form the code won&#39;t run in the UI since it has dependencies on node modules and it&#39;s using JSX, so there need to be a bundling step. This can be done with any of the popular bundling tools, webpack or rollup for example. There are two important settings that need to be configured in order for this to run in the UI:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Format the bundle output as AMD&lt;/li&gt;
&lt;li&gt;Configure &lt;code&gt;dojo/_base/declare&lt;/code&gt; and &lt;code&gt;dijit/_WidgetBase&lt;/code&gt; as externals&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The reasons for this are that the UI uses AMD for loading JavaScript modules and therefore also expects your module to be in this format. And because the react-to-dijit-adapter has dependencies on these dojo modules but they are something that will be available at runtime and shouldn&#39;t be pulled into your bundle. So a webpack configuration would look something like this:&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color:&amp;#32;#555555;&quot;&gt;&lt;strong&gt;webpack.config.js&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code&gt;const path = require(&quot;path&quot;);

module.exports = {
    entry: path.resolve(__dirname, &quot;src/entry.js&quot;),
    output: {
        filename: &quot;TextAreaWithStatistics.js&quot;,
        libraryTarget: &quot;amd&quot;,
        libraryExport: &quot;default&quot;,
        path: path.resolve(__dirname, &quot;ClientResources/Scripts/Editors/&quot;)
    },
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: /node_modules/,
                use: {
                    loader: &quot;babel-loader&quot;,
                    options: {
                        presets: [
                            &quot;@babel/env&quot;,
                            &quot;@babel/react&quot;
                        ]
                    }
                }
            }
        ]
    },
    externals: [
        &quot;dojo/_base/declare&quot;,
        &quot;dijit/_WidgetBase&quot;
    ]
};&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The output path and filename are what you would use when configuring the &lt;code&gt;ClientEditingClass&lt;/code&gt; for your property in either an &lt;code&gt;EditorDescriptor&lt;/code&gt; or &lt;code&gt;ClientEditorAttribute&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Typescript&lt;/h3&gt;
&lt;p&gt;The react-to-dijit-adapter package includes typings. This will make it easier to see which props are available to your component when using typescript.&lt;/p&gt;
&lt;h3&gt;Contributing&lt;/h3&gt;
&lt;p&gt;The code for this adapter is open-source and you can find it on GitHub (&lt;a href=&quot;https://github.com/ben-mckernan/react-to-dijit-adapter&quot;&gt;https://github.com/ben-mckernan/react-to-dijit-adapter&lt;/a&gt;). Contributions are very welcome and if you have a scenario that doesn&#39;t work for you, please open an issue.&lt;/p&gt;
&lt;p&gt;In terms of props that are passed to the react component, only the bare minimum are available currently. So if you have a use case where you need other props passed to your property editor, please open an issue describing your use case.&lt;/p&gt;</id><updated>2019-11-07T10:44:00.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Comments for content</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2019/1/comments-for-content/" /><id>&lt;p&gt;In the next release of CMS UI (version 11.14.0), we will be releasing what I believe is a long awaited feature, comments for content. Up until now it has only been possible to comment on content in the project overview, which requires the content to be part of a project. With the new update, users will be able to comment on any content from edit mode so they can see the content at the same time as they are commenting.&lt;/p&gt;
&lt;h2&gt;A quick overview&lt;/h2&gt;
&lt;p&gt;There is a new button added to the menu in edit mode which allows users to toggle the comments pane.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;toolbar.png&quot; src=&quot;/link/84ba7c2b91fc45139ebba73d682f2a62.aspx&quot; width=&quot;859&quot; height=&quot;92&quot; /&gt;&lt;/p&gt;
&lt;p&gt;When toggled on, the comments pane will appear next to the content being edited and it will display all comments and activities for the current version of the content.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;comment_on_review_request.png&quot; src=&quot;/link/4e56eb2d95c24d6dba280570ea5639ce.aspx&quot; width=&quot;1253&quot; height=&quot;438&quot; /&gt;&lt;/p&gt;
&lt;p&gt;And as with comments in projects, it is possible to tag other users in the comment but using the &lt;code&gt;@username&lt;/code&gt; syntax.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;project_autotagging.png&quot; src=&quot;/link/88d4f9a435be4ef59590bc8c529296d9.aspx&quot; width=&quot;472&quot; height=&quot;372&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Important note&lt;/h2&gt;
&lt;p&gt;In this first version, the comments pane will only show activities and comment for the current version. This means that if a new draft is created, for example, then the comment associated with the published version will not be displayed. It is possible to see the draft for other version by using the version gadget.&lt;/p&gt;
&lt;p&gt;This obviously has advantages and disadvantages depending on the workflow of the editor. We hope to iterate on this and in a future version add the possibility for users to filter comments for all versions or just the current version.&lt;/p&gt;</id><updated>2019-01-04T14:50:12.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>A react widget in Episerver CMS (Revisited)</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2018/11/a-react-gadget-in-episerver-cms-revisited/" /><id>&lt;p&gt;Back in January 2017, Magnus Baneryd created a blog post about creating a gadget using react (&lt;a href=&quot;/link/fbf389718c364a03878b378f130738bf.aspx&quot;&gt;https://world.episerver.com/blogs/magnus-stalberg/Dates/2017/1/creating-a-react-widget-for-episerver-cms/&lt;/a&gt;). Given this was nearly two years ago and the technology has changed a bit since then, I thought that I would revisit his idea.&lt;/p&gt;
&lt;p&gt;I am going to assume that if this topic is interesting for you then you already have some knowledge about creating react applications and using different bundling tools. So I&#39;m not going to explain what node modules you need need to install but rather just point out what might be different from a regular react application setup.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Aside:&lt;/strong&gt; I his blog, Magnus creates a custom gadget. I personally hate the gadgets in the left and right panes since they are so small and adding more than two basically makes them unusable. So for this demo I will use a custom edit view since it is easy to demo. However this same approach will still work for the custom gadget.&lt;/p&gt;
&lt;h2&gt;Register the view server-side&lt;/h2&gt;
&lt;p&gt;To create a new edit view for content data we need to register a &lt;code&gt;ViewConfiguration&lt;/code&gt; class on the server side and point to the JavaScript file that should be loaded. In this case the file will be our bundled react view. The following code will do this:&lt;/p&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;[ServiceConfiguration(typeof(ViewConfiguration))]
public class MyView : ViewConfiguration&amp;lt;IContentData&amp;gt;
{
    public MyView()
    {
        Key = &quot;my-view&quot;;
        Name = &quot;React View&quot;;
        ControllerType = &quot;alloy/components/ReactGadget&quot;;
        IconClass = &quot;epi-iconStar&quot;;
        SortOrder = 100;
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now when you look in edit mode you will have an extra view listed in the view switcher.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/7f451cb27fb143bc893416a9625a1e1b.aspx&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Create the entry point&lt;/h2&gt;
&lt;p&gt;If you have ever made a react application before you will be familiar with having an entry point called index.js that simply calls &lt;code&gt;ReactDOM.render&lt;/code&gt; (&lt;a href=&quot;https://reactjs.org/docs/react-dom.html#render&quot;&gt;https://reactjs.org/docs/react-dom.html#render&lt;/a&gt;). However in this case, since our view in running inside a dojo application, the entry point needs to pretend to be a widget and that widget will instead call &lt;code&gt;ReactDOM.render&lt;/code&gt;. This can be done with code that is basically the same as what Magnus had written in his blog post:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;index.js&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code&gt;import React from &quot;react&quot;;
import ReactDOM from &quot;react-dom&quot;;
import declare from &quot;dojo/_base/declare&quot;;
import WidgetBase from &quot;dijit/_WidgetBase&quot;;
import MyComponent from &quot;./MyComponent&quot;;

export default declare([WidgetBase], {
    postCreate: function () {
        ReactDOM.render(&amp;lt;MyComponent /&amp;gt;, this.domNode);
    },
    destroy: function () {
        ReactDOM.unmountComponentAtNode(this.domNode);
    }
});&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will create a widget which will then render the react component to it&#39;s DOM node. It will also unmount the component when the view is destroyed.&lt;/p&gt;
&lt;p&gt;This code can be used as a boilerplate, just replace &lt;code&gt;MyComponent&lt;/code&gt; with your react component.&lt;/p&gt;
&lt;h2&gt;Building the bundle&lt;/h2&gt;
&lt;p&gt;At this point let&#39;s assume you have your &lt;code&gt;MyComponent&lt;/code&gt; implemented in react. In order to get it to appear in the UI it needs to be bundled into a single file (the one that our view configuration is pointing to). Nowadays the defacto bundler seems to be webpack (&lt;a href=&quot;https://webpack.js.org/&quot;&gt;https://webpack.js.org/&lt;/a&gt;) but I would argue that rollup (&lt;a href=&quot;https://rollupjs.org/&quot;&gt;https://rollupjs.org/&lt;/a&gt;) is better suited in this scenario. However I will give an example of both configurations since they are very similar.&lt;/p&gt;
&lt;p&gt;The main point to note is that since the Episerver CMS uses AMD for its module loading, the bundle we produce also needs to be AMD formatted. Luckily the build tools will do this for you will a single line of configuration.&lt;/p&gt;
&lt;p&gt;The second thing to note is that in the entry point code, in the previous example, there are imports for dojo and dijit. These however exist inside the Episerver CMS application and shouldn&#39;t be bundled, so they need to be marked as external. This is also done with a few lines of configuration.&lt;/p&gt;
&lt;p&gt;The entry point for your bundle will be the index.js file from the previous example and the output file should what you configured in the view configuration. Change the paths in the examples below to suit your needs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;webpack.config.js&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code&gt;const path = require(&quot;path&quot;);

module.exports = {
    entry: path.resolve(__dirname, &quot;src/index.js&quot;),
    output: {
        filename: &quot;ReactGadget.js&quot;,
        libraryTarget: &quot;amd&quot;,
        libraryExport: &quot;default&quot;,
        path: path.resolve(__dirname, &quot;ClientResources/Scripts/components/&quot;)
    },
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: /node_modules/,
                use: {
                    loader: &quot;babel-loader&quot;
                }
            }
        ]
    },
    externals: [
        &quot;dojo/_base/declare&quot;,
        &quot;dijit/_WidgetBase&quot;
    ]
};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The interesting parts of this configuration are the settings for &lt;code&gt;libraryTarget&lt;/code&gt;, &lt;code&gt;libraryExport&lt;/code&gt;, and &lt;code&gt;externals&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For webpack it is important to set the &lt;code&gt;libraryExport&lt;/code&gt; so that it returns the default export from the entry point rather than an object containing all the exports.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;rollup.config.js&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code&gt;import babel from &quot;rollup-plugin-babel&quot;;
import commonjs from &quot;rollup-plugin-commonjs&quot;;
import replace from &quot;rollup-plugin-replace&quot;;
import resolve from &quot;rollup-plugin-node-resolve&quot;;

export default {
    input: &quot;src/index.js&quot;,
    output: {
        file: &quot;ClientResources/Scripts/components/ReactGadget.js&quot;,
        format: &quot;amd&quot;
    },
    plugins: [
        babel({
            exclude: &quot;node_modules/**&quot;
        }),
        commonjs(),
        replace({ &quot;process.env.NODE_ENV&quot;: JSON.stringify(process.env.NODE_ENV) }),
        resolve()
    ],
    external: [
        &quot;dojo/_base/declare&quot;,
        &quot;dijit/_WidgetBase&quot;
    ]
};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The interesting parts of this configuration are the settings for &lt;code&gt;format&lt;/code&gt;, and &lt;code&gt;external&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Accessing CMS features from the react component&lt;/h2&gt;
&lt;p&gt;At this point you should have your react component loading in the UI. But as you develop your great new react view you may realise that it would be really nice to be able to use a component from the Episerver CMS. For example, you may want the user to be able to select a page using the content selector.&lt;/p&gt;
&lt;p&gt;Well luckily I have created a react component that will do exactly this for you. The code for this component can be copied from this gist into your project (&lt;a href=&quot;https://gist.github.com/ben-mckernan/b06137f4bc076f862b33d7dd0dbf9a88&quot;&gt;https://gist.github.com/ben-mckernan/b06137f4bc076f862b33d7dd0dbf9a88&lt;/a&gt;). It has a dependency on &lt;span class=&quot;pl-s&quot;&gt;&lt;code&gt;@episerver/amd-loader-proxy&lt;/code&gt;&lt;/span&gt; so make sure you install this node module. I will note however that I have only done very limited testing on this component so there maybe some quirks.&lt;/p&gt;
&lt;p&gt;Events will automatically be connected from the props to the widget based on the naming convention &lt;code&gt;onEventName&lt;/code&gt;&lt;em&gt;.&lt;/em&gt; And settings for the widget will only be passed to the widget during construction. Changes to settings will not be propagated after mount, although it is probably not hard to implement.&lt;/p&gt;
&lt;p&gt;Example usage could look like this:&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code&gt;import React, { Component } from &quot;react&quot;;
import DojoWidget from &quot;./DojoWidget&quot;;

class MyComponent extends Component {

    constructor(props) {
        super(props);
        this.state = {
            value: null
        };
        this.handleChange = this.handleChange.bind(this);
    }

    handleChange(value) {
        this.setState({ value });
    }

    render() {
        const { value } = this.state;
        const label = value ? &amp;lt;div&amp;gt;ContentLink: {value}&amp;lt;/div&amp;gt; : null;

        return (
            &amp;lt;div&amp;gt;
                &amp;lt;DojoWidget type=&quot;epi-cms/widget/ContentSelector&quot; settings={{ repositoryKey: &quot;pages&quot; }} onChange={this.handleChange} /&amp;gt;
                {label}
            &amp;lt;/div&amp;gt;
        );
    }
}

export default MyComponent;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Something else that maybe worth looking at is the &lt;code&gt;@episerver/amd-proxy-loader&lt;/code&gt; I mentioned previously (&lt;a href=&quot;https://www.npmjs.com/package/@episerver/amd-loader-proxy&quot;&gt;https://www.npmjs.com/package/@episerver/amd-loader-proxy&lt;/a&gt;). With this it is possible to dynamically require AMD modules from Episerver CMS from your JavaScript application. This is framework agnostic so it can be used with whichever JavaScript framework you prefer.&lt;/p&gt;
&lt;h2&gt;Final words&lt;/h2&gt;
&lt;p&gt;This is quite a rough example but I hope it inspires someone to make something much better.&lt;/p&gt;</id><updated>2018-11-08T08:27:00.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>The new and improved TinyMCE editor</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2018/3/an-updated-tinymce-package-has-been-released/" /><id>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;We have just release version 2.0.0 of the EPiServer.CMS.TinyMce package! This is a major version upgrade&amp;nbsp;so&amp;nbsp;you can expect breaking changes but you should be most excited about the&amp;nbsp;improvements that have been made. I&#39;m going to run through the main changes in this blog post.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The main points are, that we have upgraded to the latest version of TinyMCE&amp;nbsp;(4.7.9 at the time of writing).&amp;nbsp;We have removed the configuration from admin mode and instead the editor is only configurable via code. We have improved the drag and drop experience for pages, blocks and media when using Firefox or Chrome. IE and Edge still work&amp;nbsp;as they have previously. There is currently no support for dynamic content.&lt;/p&gt;
&lt;h2&gt;New version of TinyMCE&lt;/h2&gt;
&lt;p&gt;The new editor is using the latest version of TinyMCE (4.7.9 at the time of writing). There have been some really great improvements done to the TinyMCE product and you can read more&amp;nbsp;about them or try their demo editor at&amp;nbsp;&lt;a href=&quot;https://www.tinymce.com/&quot;&gt;https://www.tinymce.com&lt;/a&gt;. One point to note is that Episerver only bundles the standard plugins with the editor. So if you have a customer that wants to use a premium plugin they will need to license that from TinyMCE directly.&lt;/p&gt;
&lt;p&gt;One of the most noticeable changes in the new version of TinyMCE is the modern theme. The toolbar and icons are much more user friendly and it is even possible to add a menu bar if needed. This is what the editor toolbar looks like in Episerver when using the default configuration:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/f59760518fa8488295697c0298beb8b6.aspx&quot; width=&quot;772&quot; alt=&quot;Image TinyMCE_Editor.png&quot; height=&quot;70&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Configuring the editor&lt;/h2&gt;
&lt;p&gt;In this release we have completely rewritten the way the editor is configured. It is no longer possible to configure the editor in admin mode, instead&amp;nbsp;all configuration is done via code. We have introduced a new&amp;nbsp;TinyMceSettings class, which can be configured with any setting supported by TinyMCE, and also a TinyMceConfiguration class, which is responsible&amp;nbsp;for mapping settings to properties on page types. Here is an example of how to extend the default settings and also how to configure custom settings for a particular property.&lt;/p&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;context.Services.Configure&amp;lt;TinyMceConfiguration&amp;gt;(config =&amp;gt;
{
    // Add content CSS to the default settings.
    config.Default()
        .ContentCss(&quot;/static/css/editor.css&quot;);

    // Limit the block formats for the MainBody property of an ArticlePage.
    config.For&amp;lt;ArticlePage&amp;gt;(t =&amp;gt; t.MainBody)
        .BlockFormats(&quot;Paragraph=p;Header 1=h1;Header 2=h2;Header 3=h3&quot;);
});&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can see the example in its full form here:&amp;nbsp;&lt;a href=&quot;https://git.io/vxZWE&quot;&gt;https://git.io/vxZWE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The TinyMceSettings class contains helper methods for&amp;nbsp;configuring&amp;nbsp;the most common settings. However it is possible to configure any setting supported by TinyMCE by using the AddSetting or RawSettings methods.&lt;/p&gt;
&lt;h3&gt;Writing a custom plugin&lt;/h3&gt;
&lt;p&gt;It is also possible to create your own plugins for the TinyMCE editor. See the TinyMCE documentation for how to write a plugin:&amp;nbsp;&lt;a href=&quot;https://www.tinymce.com/docs/advanced/creating-a-plugin&quot;&gt;https://www.tinymce.com/docs/advanced/creating-a-plugin&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once you have created your plugin you can then&amp;nbsp;configure the TinyMCE editor to load it by using the AddExternalPlugin method.&lt;/p&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;context.Services.Configure&amp;lt;TinyMceConfiguration&amp;gt;(config =&amp;gt;
{
    config.Default()
        .AddExternalPlugin(&quot;my-plugin&quot;, &quot;/path/to/my/plugin.js&quot;);
});&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Better drag and drop support&lt;/h2&gt;
&lt;p&gt;When dragging and dropping pages, blocks, or media in the previous version the TinyMCE editor, it was not possible to target the exact location&amp;nbsp;to drop the content whilst dragging. The content would always be inserted at the place where the caret was last located. Unfortunately, in the new version, this is still the case for IE and Edge due to some browser quirks. However for Firefox and Chrome the experience is much better. The caret will&amp;nbsp;follow the mouse&amp;nbsp;whilst dragging so the user can see exactly where the content will be inserted.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/c4a175386c3448349d7522f87be904ba.aspx&quot; alt=&quot;&quot; /&gt;&lt;img src=&quot;/link/7ce73fe816e544579977d44e0a8c8449.aspx&quot; alt=&quot;Image 5ab109bf495de964695126.gif&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;No support for dynamic content&lt;/h2&gt;
&lt;p&gt;At this point there is no NuGet package for dynamic content that is compatible with the new TinyMCE package. So at this point in time we do not support using dynamic content&amp;nbsp;with the new TinyMCE editor.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</id><updated>2018-03-20T14:38:45.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Issue with modules not being found in CMS 11</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2018/1/issue-with-modules-not-being-found-in-cms-11/" /><id>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;Hello everyone! I want to quickly address&amp;nbsp;the issues around&amp;nbsp;add-on modules not being found after upgrading to CMS 11 before misinformation starts to spread. Marija mentioned some of these issues in her previous blog post&amp;nbsp;&lt;a href=&quot;http://mariajemaria.net/upgraded-several-packages-episerver-11&quot;&gt;http://mariajemaria.net/upgraded-several-packages-episerver-11&lt;/a&gt;&amp;nbsp;and there have been some questions on the forum.&lt;/p&gt;
&lt;p&gt;The problem usually manifests itself as either an assembly not being found at runtime or a route not resolving correctly in the UI.&lt;/p&gt;
&lt;p&gt;It is caused by the following, and I&#39;m not sure if this is a breaking change&amp;nbsp;but as far as I know it has not been documented (I will have the breaking changes document updated in any case). As part of the CMS 11 release the dependencies of the EPiServer.CMS nuget package were changed to no longer include EPiServer.Packaging.UI, you can compare the versions here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.CMS&amp;amp;packageVersion=11.1.0&quot;&gt;http://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.CMS&amp;amp;packageVersion=11.1.0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.CMS&amp;amp;packageVersion=10.10.4&quot;&gt;http://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.CMS&amp;amp;packageVersion=10.10.4&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For some reason, unknown to me, having EPiServer.Packaging installed changes the default behavior of the&amp;nbsp;modules system to scan the protected modules folder and automatically load modules found there during startup. The&amp;nbsp;default behavior without it installed is not to scan the protected modules folder. However this can be configured via the episerver.shell section of the web.config.&lt;/p&gt;
&lt;p&gt;So there are a couple of easy options to fix this,&amp;nbsp;either:&lt;/p&gt;
&lt;p&gt;1. Add&amp;nbsp;autoDiscovery=&quot;Modules&quot; to the protectedModules element&amp;nbsp;under episerver.shell in the web.config&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code&gt;&amp;lt;protectedModules rootPath=&quot;~/EPiServer/&quot; autoDiscovery=&quot;Modules /&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;2. Or add each protected module that should be loaded as a child to the&amp;nbsp;&lt;span&gt;protectedModules&amp;nbsp;element (this is the default setup)&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code&gt;&amp;lt;protectedModules rootPath=&quot;~/EPiServer/&quot;&amp;gt;
  &amp;lt;add name=&quot;Shell&quot; /&amp;gt;
  &amp;lt;add name=&quot;CMS&quot; /&amp;gt;
  &amp;lt;add name=&quot;EPiServer.Cms.TinyMce&quot; /&amp;gt;
&amp;lt;/protectedModules&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Also as a side note, I recommend against installing EPiServer.Packaging. The&amp;nbsp;recommended&amp;nbsp;way of installing add-ons is via nuget.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</id><updated>2018-01-08T14:00:05.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Alloy templates are now available on GitHub</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2017/11/alloy-templates-are-now-available-on-github/" /><id>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;Along with the release of CMS 11 we have also made the Alloy templates available on GitHub. There&amp;nbsp;are separate repositories for Web Forms and MVC, available here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/episerver/alloy-webforms-template&quot;&gt;https://github.com/episerver/alloy-webforms-template&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/episerver/alloy-mvc-template&quot;&gt;https://github.com/episerver/alloy-mvc-template&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;These templates are used to generate the sites that are used in Episerver&#39;s Visual Studio extension. So any improvements to these sites will eventually end up in the&amp;nbsp;extension. We would really like to have more community input in these templates since you are the ones using them the most. However, with that said, &lt;strong&gt;we can not currently&amp;nbsp;accept pull requests&lt;/strong&gt; to the repositories from non-episerver employees due to legal reasons.&amp;nbsp;But we are currently working on creating a CLA that will allow us to accept contributions. The idea being that contributors will be required to sign the CLA when creating a pull request.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</id><updated>2017-11-29T15:21:35.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Planned Breaking Changes 2017 (CMS UI)</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2017/9/planned-breaking-changes-2017-cms-ui/" /><id>&lt;h2&gt;Notable Changes&lt;/h2&gt;
&lt;h3&gt;TinyMCE Package&lt;/h3&gt;
&lt;p&gt;The TinyMCE editor and related plugin configuration features will be moved into a separate NuGet package as an add-on with its own versioning number and breaking changes. This is to allow us to have a release cycle for TinyMCE which is decoupled from the CMS UI release cycle.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;ASP.NET Identity&lt;/h3&gt;
&lt;p&gt;It was previously not possible to reset a user&#39;s password&amp;nbsp;programmatically when using the ASP.NET Identity provider. Due to a bug, the method for resetting the password simply generated a reset token but never changed the password.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;ApplicationUIUserManager&amp;lt;TUser&amp;gt;.ResetPassword(IUIUser user)&lt;/em&gt; will now throw a not supported exception. This is because ASP.NET Identity does not support generating new passwords for security reasons, i.e. it is bad&amp;nbsp;practice to send a new password to the user in plain text. The new method &lt;em&gt;ResetPassword(IUIUser user, string newPassword)&lt;/em&gt;&amp;nbsp;should be used instead.&lt;/p&gt;
&lt;p&gt;Both methods will still work when using the API with older membership providers.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Dynamic Content and XForms Packages&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;The legacy features Dynamic Content and XForms will be removed from the platform and moved into separate NuGet packages as add-ons &lt;/span&gt;&lt;span&gt;with their own versioning number and breaking changes. As the platform progresses, these features will become more limited over time. We recommend migrating to Forms or Blocks wherever possible.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;&lt;span&gt;Target .NET 4.6.1 Framework&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;The CMS Core team is now targeting .NET 4.6.1 in order to be compliant with&amp;nbsp;&lt;span&gt;NetStandard 2.0, and as such, all CMS UI projects will also target this framework.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;&lt;span&gt;Deprecations&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;h3&gt;&lt;span&gt;&lt;span&gt;jQuery&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;The jQuery library that is bundled with the CMS UI is being deprecated and should no longer be used.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;&lt;span&gt;&lt;span&gt;Gadget Framework&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;As we have mentioned previously &lt;a href=&quot;/link/a01ecec9d3e64f39a76b2aa768e0014d.aspx&quot;&gt;here&lt;/a&gt;, the gadget framework has been deprecated but will remain in the product for CMS 11. We recommend, however, that you begin to convert your gadgets to components now.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Other Changes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;IContentChangeManager.Move(IContent source, IContent destination, bool createAsLocalAsset)&lt;/em&gt;&amp;nbsp;will now return the ContentReference of the moved content instead of void.&lt;/li&gt;
&lt;li&gt;The key for content repository descriptors is no longer case sensitive.&lt;/li&gt;
&lt;li&gt;DateTime properties on the visitor group criterion model will now be serialized to ISO 8601 when being sent to the client.&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;UIHint.BlockFolder&lt;/em&gt;&amp;nbsp;and &lt;em&gt;UIHint.MediaFolder&lt;/em&gt;&amp;nbsp;have been obsoleted and should be replaced with &lt;em&gt;UIHint.AssetsFolder&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;UIHint.LongString&lt;/em&gt;&amp;nbsp;has been obsoleted and should be replaced with &lt;em&gt;UIHint.Textarea&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Removed many previously obsoleted constructors from classes where another a public constructor is available for use instead.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And of course, included with all this are a lot of bug fixes :)&lt;/p&gt;</id><updated>2017-09-18T12:27:10.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>The dot notation breaking change</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2016/9/the-dot-notation-breaking-change/" /><id>&lt;p&gt;In Magnus&#39;s blog post (&lt;a href=&quot;/link/4b536a6f4e1a4376a856ea949dcfca7e.aspx&quot;&gt;http://world.episerver.com/blogs/magnus-stalberg/Dates/2016/9/planned-breaking-changes-in-cms-ui-2016/&lt;/a&gt;) on the upcoming breaking changes in the CMS UI, there were a lot of questions and a little confusion about the removal of dot notation support. I am hoping that with this blog post I can shed some light on the matter and make things a little easier to understand.&lt;/p&gt;
&lt;h2&gt;The history&lt;/h2&gt;
&lt;p&gt;When we first released the updated UI back in CMS 7, we were using a version of dojo that had its own synchronous loader which used dot notation, the syntax looked something like this:&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
    dojo.require(&quot;dijit.Dialog&quot;);
    var dialog = new dijit.Dialog();
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When we updated to CMS 7.1 we also upgraded our dojo dependency. However dojo had changed its loader to be asynchronous and use the AMD format. This format uses slash notation since each dependency is a path to a JavaScript file. It looks something like this:&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
    require([&quot;dijit/Dialog&quot;], function (Dialog) {
        var dialog = new Dialog();
    });
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To ensure the change wouldn&#39;t be too breaking we added code to maintain support for the dot notation.&lt;/p&gt;
&lt;h2&gt;The breaking change&lt;/h2&gt;
&lt;p&gt;In the coming CMS 10 release we have removed the support for the dot notation in the JavaScript loader. So this means that anywhere were a JavaScript file is referenced in the code it should now use slash notation (that is forward slashes).&lt;/p&gt;
&lt;p&gt;It is also important to note that we have been using the slash notation since CMS 7.1 so you don&#39;t need to wait for the CMS 10 release to change your code. You can change it now!&lt;/p&gt;
&lt;p&gt;The effects of this should be very limited since there are not many areas where the dot notation could have been used. Here are the places that you should check in your code:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PropertyFor: &lt;/strong&gt;It is possible to pass an additionalViewData argument to the PropertyFor method.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;data-epi-* attributes: &lt;/strong&gt;Any epi attributes that you manually render in your views.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Widget templates&lt;/strong&gt;: The data-dojo-type attribute in widget templates.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Initializer class in module.config: &lt;/strong&gt;It is possible to pass an initializer JavaScript file to the clientModule element in the module.config, for example:&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code&gt;&amp;lt;clientModule initializer=&quot;addon/Initializer&quot;&amp;gt;

&amp;lt;/clientModule&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;ComponentBase:&lt;/strong&gt; Any class inheriting from ComponentBase that sends a widget type to the constructor.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ComponentDefinitionBase: &lt;/strong&gt;Any class inheriting from ComponentDefinitionBase that sends a widget type to the constructor.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EditorDescriptor: &lt;/strong&gt;There are several properties on the EditorDescriptor that could be affect but the most likely is ClientEditingClass.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ViewConfiguration: &lt;/strong&gt;The properties ViewType and ControllerType.&lt;/p&gt;</id><updated>2016-09-16T13:23:17.9270000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Content reference list with page preview</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2016/6/content-reference-list-with-page-preview/" /><id>&lt;p&gt;I&#39;m sure everyone has read &lt;a href=&quot;https://gregwiechec.com/&quot;&gt;Grzegorz Wiecheć&lt;/a&gt; awesome blog, and if you haven&#39;t then you should. I while back he blogged about adding previews to the content reference list (&lt;a href=&quot;https://gregwiechec.com/2015/09/content-references-list-with-preview/&quot;&gt;https://gregwiechec.com/2015/09/content-references-list-with-preview/&lt;/a&gt;) and the content area (&lt;a href=&quot;https://gregwiechec.com/2016/03/updated-contentarea-with-images/&quot;&gt;https://gregwiechec.com/2016/03/updated-contentarea-with-images/&lt;/a&gt;). However it only supported previewing images, which I thought was under-selling the concept. So I&#39;m going to one up him and add page and block preview support.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/8f7f198a1b264fb4b8e3de4d8d789304.aspx&quot; alt=&quot;Image j2cWQXiw4B.gif&quot; /&gt;&lt;/p&gt;
&lt;p&gt;There is a library called rasterizeHTML.js (&lt;a href=&quot;https://github.com/cburgmer/rasterizeHTML.js&quot;&gt;https://github.com/cburgmer/rasterizeHTML.js&lt;/a&gt;) which provides some nice methods for rendering an HTML document to a canvas element. My custom editor will use this to load the preview URL of a page or a block and render it to a canvas which is then displayed as a preview tooltip.&lt;/p&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;define([
    &quot;dojo/_base/declare&quot;,
    &quot;dojo/_base/lang&quot;,
    &quot;dojo/on&quot;,
    &quot;dojo/dom&quot;,
    &quot;dojo/aspect&quot;,

    &quot;dijit/popup&quot;,
    &quot;dijit/TooltipDialog&quot;,

    &quot;alloy/rasterize-html&quot;,

    &quot;epi-cms/contentediting/editors/ContentReferenceListEditor&quot;
], function (
    declare,
    lang,
    on,
    dom,
    aspect,

    popup,
    TooltipDialog,

    rasterizeHtml,

    ContentReferenceListEditor
) {

    return declare([ContentReferenceListEditor], {

        buildRendering: function () {
            this.inherited(arguments);

            var _this = this;
            aspect.around(this.list._list, &quot;insertRow&quot;, function (originalInsertRow) {
                return function (object, parent, beforeNode, i, option) {
                    var row = originalInsertRow.apply(this, arguments);
                    if (object.hasTemplate) {
                        lang.hitch(_this, _this._createTooltip(row, object.previewUrl, !!object.downloadUrl));
                    }
                    return row;
                };
            });
        },

        _createTooltip: function (node, previewUrl, isImage) {
            var content;

            if (isImage) {
                content = document.createElement(&quot;img&quot;);
                content.src = previewUrl;
                content.setAttribute(&quot;style&quot;, &quot;max-width: 500px;&quot;);
            } else {
                content = document.createElement(&quot;canvas&quot;);
                content.height = 600;
                content.width = 750;

                var context = content.getContext(&quot;2d&quot;);
                context.scale(0.75, 0.75);

                rasterizeHtml.drawURL(previewUrl, content, { height: 800, width: 1000 });
            }

            this.own(node.tooltip = new TooltipDialog({
                connectId: [node.id],
                content: content
            }));

            on(node, &quot;mouseleave&quot;, function () {
                popup.close(node.tooltip);
            });

            on(node, &quot;click&quot;, function () {
                popup.open({
                    popup: node.tooltip,
                    around: dom.byId(node.id),
                    orient: [&quot;after-centered&quot;]
                });
            });
        }
    });
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This approach does not support CORS so the pages and blocks being rendered have to be from the same origin as the page running the script. Browser support is limited to Firefox, Chrome, Safari, and Edge.&lt;/p&gt;
&lt;p&gt;The server side code to make your properties use this editor can be found on Grzegorz&#39;s blog post (&lt;a href=&quot;https://gregwiechec.com/2015/09/content-references-list-with-preview/&quot;&gt;https://gregwiechec.com/2015/09/content-references-list-with-preview/&lt;/a&gt;).&lt;/p&gt;</id><updated>2016-06-02T16:41:56.6500000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Supporting SVG images</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2015/7/supporting-svg-images/" /><id>&lt;p&gt;Scalable Vector Graphics (SVG) is a very handy image format when working with icons or logos that need to be used in different sizes. Adding support for SVG image files in EPiServer is very easy to do.&lt;/p&gt;
&lt;p&gt;Adding a vector image content type is done in the same way as adding an image content type. The main difference is obviously the filename extensions that are associated with the content type, in this case we associate only .svg with the content type. For example:&lt;/p&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;[ContentType(GUID = &quot;F522B459-EB27-462C-B216-989FC7FF9448&quot;)]
[MediaDescriptor(ExtensionString = &quot;svg&quot;)]
public class VectorImageFile : ImageData
{
    /// &amp;lt;summary&amp;gt;
    /// Gets the generated thumbnail for this media.
    /// &amp;lt;/summary&amp;gt;
    public override Blob Thumbnail
    {
        get { return BinaryData; }
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the example above we also override the thumbnail property to return the binary data of the image itself. The reason for this is that the built-in thumbnail generator can not parse SVG file types in order to generate a thumbnail. However this is not a problem since generating a thumbnail for a vector based image is unnecessary since it can, by its very nature, be displayed at any size.&lt;/p&gt;
&lt;p&gt;The vector image should work&amp;nbsp;seamlessly with other images types since all modern browsers support rendering SVG as well as having img tags whose source is an SVG file. This means that you will be able to drag and drop SVG images to a TinyMCE editor and resize them there or select them via the image content picker.&lt;/p&gt;
&lt;p&gt;The only quirk is that the &quot;Open in Image Editor&quot; menu option will be available. When trying to open an SVG image, the editor will show an alert stating that the current file type is not supported.&lt;/p&gt;</id><updated>2015-07-02T15:09:34.6130000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Modifying the default view components</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2015/6/modifying-the-default-view-components/" /><id>&lt;p&gt;I have recently received a lot of questions via support and on the forums about how to change the components that are available by default in the CMS view, e.g. removing the media component. Most people believe that this is not something we support, which is not strange considering the lack of documentation about it.&amp;nbsp;&lt;a href=&quot;/link/c7ca6f89979248dfb810e53141d75c08.aspx&quot;&gt;Linus Ekstr&amp;ouml;m&lt;/a&gt; blogged about this over two years ago now, you can see that &lt;a href=&quot;/link/96aa7f0a6d0546c2b793e194907804d7.aspx&quot;&gt;here&lt;/a&gt;, so I think it is time for a little reminder about how it is done. &lt;strong&gt;Note:&lt;/strong&gt; the following only works for views that have not been modified by the user, e.g. the user has not added any components to their view.&lt;/p&gt;
&lt;h2&gt;Via Configuration&lt;/h2&gt;
&lt;p&gt;The simplest way to add or remove components is via configuration in the web.config. The problem is knowing what a component is called and the area path where it is plugged into in order to make this configuration work. This is most likely the reason for people not knowing that this was possible. The following code will remove the media component from the right panel:&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code&gt;&amp;lt;episerver.shell&amp;gt;
  &amp;lt;viewManager&amp;gt;
    &amp;lt;views&amp;gt;
      &amp;lt;add name=&quot;/episerver/cms/home&quot;&amp;gt;
        &amp;lt;settings&amp;gt;
          &amp;lt;add name=&quot;RemoveMediaComponent&quot; 
               transformationType=&quot;Remove&quot;
               definitionName=&quot;EPiServer.Cms.Shell.UI.Components.MediaComponent&quot;
               plugInArea=&quot;/episerver/cms/assets/defaultgroup&quot; /&amp;gt;
        &amp;lt;/settings&amp;gt;
      &amp;lt;/add&amp;gt;
    &amp;lt;/views&amp;gt;
  &amp;lt;/viewManager&amp;gt;
&amp;lt;/episerver.shell&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you can see there are a lot of magic strings here. A lot of this information would probably need to be reflected out of the assembly unfortunately. The same code with the transformationType set to Add would add the component to the given plug-in area. Plug-in areas are available as constant strings on the PlugInArea class if you want to add a component somewhere.&lt;/p&gt;
&lt;h2&gt;Via Code&lt;/h2&gt;
&lt;p&gt;There is also a way to transform the view via code although I am not sure it is any easier. Basically you can implement a IViewTransformer class and mark it with the ViewTransformerAttribute. This will then run when the view is being loaded so you can add or remove any components then via code.&lt;/p&gt;</id><updated>2015-06-12T18:17:28.2930000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>The new and improved allowed types</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2015/2/the-new-and-improved-allowed-types/" /><id>&lt;p style=&quot;margin-bottom: 0px;&quot;&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br /&gt;The latest pre-release version of the EPiServer.CMS.UI package contains the new and improved allowed types attribute. If you are feeling adventurous then upgrade and try it out. The improvements are:&lt;/p&gt;
&lt;ul style=&quot;margin-bottom: 16px; margin-top: 8px;&quot;&gt;
&lt;li&gt;Clicking the &quot;create a new block&quot; link of a content area will now filter the block types that appear based on allowed types.&lt;/li&gt;
&lt;li&gt;It is now possible to restrict a subset of the allowed types.&lt;/li&gt;
&lt;li&gt;Interface types are now supported.&lt;/li&gt;
&lt;li&gt;UI descriptors are now automatically generated for content types classes and their base classes.&lt;/li&gt;
&lt;li&gt;Validation occurs for allowed types in the content area.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;AllowedTypesAttribute&lt;/h2&gt;
&lt;p&gt;Most of you have probably read previous blog posts from myself and others on the allowed types attribute and its usages and its limitations. For those who don&#39;t know what it is, it is an attribute that can be applied to properties on your content type model in order to control what content types that property can accept. For example, only allowing images on a gallery property. The code looks like this:&lt;/p&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;[AllowedTypes(new []{ typeof(ImageData) })]
public virtual ContentArea Gallery { get; set; }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the next major version of EPiServer &lt;em&gt;(EPiServer.CMS.UI 8.0.0)&lt;/em&gt; we have made a lot of improvements to the allowed types in order to support requested features and fix problems in the current version. The next version is currently available in the nuget feed as a pre-release package if you are interested to give it a test run.&lt;/p&gt;
&lt;h3&gt;Creating Content from the Content Area&lt;/h3&gt;
&lt;p&gt;The biggest problem with the current implementation of the allowed types, and also the most up-voted bug on EPiServer World (&lt;a href=&quot;/link/092227481eb64ae9b78ebd86e7e2d37a.aspx&quot;&gt;110190&lt;/a&gt;), is the fact that allowed types doesn&#39;t filter the list of content types when creating a block from a content area; it only affected drag and drop. This has now been fixed meaning that it is no longer possible to add disallowed types to the content area either via drag and drop or the create link.&lt;/p&gt;
&lt;h3&gt;Validation of Allowed Types&lt;/h3&gt;
&lt;p&gt;The content area has also been modified in the core so that, when saving or publishing, it validates whether it contains any types that are not allowed. This ensures that changes to a content area via code also follow the allowed types restrictions.&lt;/p&gt;
&lt;h3&gt;Restricted Types&lt;/h3&gt;
&lt;p&gt;An additional feature we have added to the allowed types attribute is the ability to specify a subset of types that should not be allowed. For example, it is quite common to have a content area which should accept all blocks except for blocks which don&#39;t fit; i.e. the jumbotron block in the alloy templates is too big to be rendered in the sidebar. The restricted types are passed through as the second constructor argument on the allowed types attribute. The code looks like this:&lt;/p&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;[AllowedTypes(new[] { typeof(BlockData) }, new[] { typeof(JumbotronBlock) })]
public virtual ContentArea RelatedContentArea { get; set; }&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Automatic Generation of UI Descriptors&lt;/h3&gt;
&lt;p&gt;Currently the system automatically creates UI descriptors for all the registered content types. This means that you can specify a particular content type as an allowed or restricted type without the need to create the UI descriptor yourself. However this was not the case for base classes and thus you needed to create a UI descriptor for any base classes you wanted to specify in the allowed types. In the next version we have refactored the automatic generation so that base classes are also generated, meaning that you can specify any class type without needing to create a UI descriptor yourself.&lt;/p&gt;
&lt;p&gt;If you have a type that you want to create a UI descriptor for in order to, for example, have a custom icon. Then you can still create the UI descriptor and it will take precedence&amp;nbsp;over the automatically generated one.&lt;/p&gt;
&lt;h3&gt;Interface Support&lt;/h3&gt;
&lt;p&gt;We have also made changes to support UI descriptors for interfaces, meaning that it is possible to specify an interface type as the allowed type. For example, if you had an interface for blocks that should appear in the sidebar then the code would look like this:&lt;/p&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;[AllowedTypes(new[] { typeof(ISidebarBlock) })]
public virtual ContentArea RelatedContentArea { get; set; }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, unlike the content type classes and their base classes, UI descriptors are not automatically generated. So in order for the above to work you will need to create a UI descriptor.&amp;nbsp;&lt;/p&gt;</id><updated>2015-02-04T09:00:00.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Using custom CSS in edit mode</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2014/12/using-custom-css-in-edit-mode/" /><id>&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br /&gt; You can dynamically load your custom CSS for your components in edit mode via the &lt;span style=&quot;font-family: monospace;&quot;&gt;xstyle/css&lt;/span&gt; plugin. Simply require the plugin with the relative path to your stylesheet as a parameter, e.g. &lt;span style=&quot;font-family: monospace;&quot;&gt;xstyle/css!./path/to/stylesheet.css&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Dynamically Loading CSS&lt;/h2&gt;
&lt;p&gt;When you develop a custom component for the edit interface in EPiServer it is often the case that you need to have custom CSS to make it look great. In large JavaScript applications, like the edit interface in EPiServer 7.5, it can be&amp;nbsp;beneficial to dynamically load resources such as CSS. The less you need to load at startup the better the startup performance will be, obviously. As you all should know, EPiServer uses an AMD loader to load JavaScript. One of the great things about AMD is that it gives us the ability to load JavaScript dynamically. So when you use the edit interface, things like editors or different views aren&#39;t loaded until they are actually needed.&lt;/p&gt;
&lt;p&gt;The next great thing about AMD is that it has a concept of plugins. A plugin is a JavaScript module within AMD which loads another file and returns that to the loader instead of itself. For example both &lt;span style=&quot;font-family: monospace;&quot;&gt;dojo/text&lt;/span&gt; and &lt;span style=&quot;font-family: monospace;&quot;&gt;epi/i18n&lt;/span&gt; are examples of plugins that return file text (good for loading templates) and EPiServer localizations respectively.&lt;/p&gt;
&lt;p&gt;We also have the &lt;span style=&quot;font-family: monospace;&quot;&gt;xstyle/css&lt;/span&gt; plugin whose sole purpose is to load CSS files.&lt;/p&gt;
&lt;div&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;define([
    &#39;dojo/_base/declare&#39;,
    &#39;xstyle/css!./path/to/stylesheet.css&#39; // PRO-TIP: Place this last since it doesn&#39;t return anything.
], function(declare) {

    return declare([], {
        // ...
    });

});
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;In the above example you can see that we are requiring the plugin and passing through the relative path to the stylesheet as a parameter. The exclamation mark indicates that the module should be loaded as a plugin and then AMD takes care of passing through the remaining string as a parameter to the plugin. The plugin will then parse this string and add a link node, with the path as its href attribute, to the head element of the page causing the referenced CSS file to be loaded into the page.&lt;/p&gt;</id><updated>2014-12-12T09:48:01.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>How to debug Episerver UI code</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2014/8/Uncompressed-JavaScript-for-EPiServer-76/" /><id>&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br /&gt;To run your site with uncompressed JavaScript in edit mode add &lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;lt;clientResources debug=&quot;true&quot; /&amp;gt;&lt;/span&gt; to your web.config inside the &lt;span style=&quot;font-family: monospace;&quot;&gt;episerver.framework&lt;/span&gt; element.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;JavaScript Debug Files Explained&lt;/h2&gt;
&lt;p&gt;A while back I posted a blog about using &lt;a href=&quot;/link/379470be10da41ac8956b9e69cd5e16c.aspx&quot;&gt;uncompressed JavaScript files for debugging EPiServer 7&lt;/a&gt;. I thought it would be worth highlighting how you can use uncompressed JavaScript in EPiServer 7.6 and onwards and how it works with the new continuous release cycle. I am happy to say it is even easier than before!&lt;/p&gt;
&lt;p&gt;As of EPiServer 7.6 the CMS UI has been released via NuGet packages. These packages contain all the JavaScript files required to run the UI compressed into a zip file. The system then reads the contents of the zip file at run time. The great thing about this approach is that at initialization, if the client resources debug flag is set to true, the system will first look for a debug version of the JavaScript zip file and load that instead if it exists.&lt;/p&gt;
&lt;p&gt;In order to have the system use the debug files you need to enable debug mode for client resources. You can do this simply by adding the&amp;nbsp;&lt;span&gt;&amp;lt;clientResources debug=&quot;true&quot; /&amp;gt;&lt;/span&gt;&amp;nbsp;element to your web.config inside the&amp;nbsp;&lt;span&gt;episerver.framework&lt;/span&gt;&amp;nbsp;element. You can then toggle the debug files on and off by changing the value of the debug attribute from true to false.&lt;/p&gt;
&lt;h3&gt;&lt;span&gt;EPiServer.CMS.UI.Sources (advanced topic)&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;This nuget package contains all original UI source files together with uncompressed dojo &amp;amp; dijit.&lt;/p&gt;
&lt;p&gt;That source package is built as part of every release so it ties quite simply into the continuous release cycle. You can install it the same way you would any other NuGet package from &lt;a href=&quot;http://nuget.episerver.com/&quot;&gt;nuget.episerver.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Install-Package EPiServer.CMS.UI.Sources&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In case you ever need to manipulate sources files and then create a customized dojo build you can use that package. It comes together with all dojo build tools.&lt;/p&gt;
&lt;p&gt;Please note that in order to debug the EPiServer edit mode you don&#39;t need that package. The config change described above is sufficient.&lt;/p&gt;</id><updated>2014-08-15T13:34:23.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Restricting the allowed types in a content area</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2013/11/Restricting-the-allowed-types-in-a-content-area/" /><id>&lt;p&gt;A feature that was sorely missed in EPiServer 7 was the ability to restrict the type of content that could be dragged and dropped into a content area. Well, you will all be glad to know that in EPiServer 7.5 the content area has received a lot of loving and it is now possible to restrict the content types that can be dragged and dropped into it.&lt;/p&gt;
&lt;p&gt;Something else that is also worth mentioning is the fact that media is also &lt;span style=&quot;font-family: monospace;&quot;&gt;IContent&lt;/span&gt; now. So you can say goodbye to those silly ImageBlock and VideoBlock implementations that I know you all have, because this change means that it is possible to drag and drop image or video content directly into the content area.&lt;/p&gt;
&lt;p&gt;These two changes open up a world of use cases for the content area. For example, image galleries or image carousels where the user can simply drag an image into the content area and it is added to the gallery or carousel. Another use case might be that you want to restrict which blocks can be added to a content area in the sidebar or footer or on the home page.&lt;/p&gt;
&lt;h2&gt;The Code&lt;/h2&gt;
&lt;p&gt;The edit interface is built up based on metadata for each property. This metadata includes the editor widget to use and also any default configuration that the widget should be initialized with. This metadata can be customized via an editor descriptor.&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 500px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;[EditorDescriptorRegistration(TargetType = &lt;span style=&quot;color: #0000ff;&quot;&gt;typeof&lt;/span&gt;(ContentArea), UIHint = &lt;span style=&quot;color: #006080;&quot;&gt;&quot;Gallery&quot;&lt;/span&gt;)]&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;class&lt;/span&gt; ImageGalleryEditorDescriptor : EditorDescriptor&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; ImageGalleryEditorDescriptor()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;// Setup the types that are allowed to be dragged and dropped into the content&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;// area; in this case only images are allowed to be added.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        AllowedTypes = &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; Type[] { &lt;span style=&quot;color: #0000ff;&quot;&gt;typeof&lt;/span&gt;(IContentImage) };&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;// Unfortunetly the ContentAreaEditorDescriptor is located in the CMS module&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;// and thus can not be inherited from; these settings are copied from that&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;// descriptor. These settings determine which editor and overlay should be&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;// used by this property in edit mode.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        ClientEditingClass = &lt;span style=&quot;color: #006080;&quot;&gt;&quot;epi-cms.contentediting.editors.ContentAreaEditor&quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        OverlayConfiguration.Add(&lt;span style=&quot;color: #006080;&quot;&gt;&quot;customType&quot;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&quot;epi-cms.widget.overlay.ContentArea&quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Here you can see that we&#39;ve set allowed types to only include &lt;span style=&quot;font-family: monospace;&quot;&gt;IContentImage&lt;/span&gt; types. So any class extending this interface can be added to the content area. This allowed types property automatically populates the relevant overlay and editor widget metadata, so that drag and drop will be restricted to images in both on-page and all properties editing modes.&lt;/p&gt;
&lt;p&gt;The other two properties indicate which editor widget should be used and that a custom overlay should also be used. Unfortunately these need to be specified as we can&#39;t extend the &lt;span style=&quot;font-family: monospace;&quot;&gt;ContentAreaEditorDescriptor&lt;/span&gt; and inherited them. This is a problem we are aware of and in the process of solving.&lt;/p&gt;
&lt;p&gt;With that added to the project it is now just a matter of telling the relevant properties to use this editor descriptor rather than the default one. This is done via the UIHint that we added in the editor descriptor registration attribute. The attribute indicates that content area properties with a UIHint of Gallery should use this editor descriptor. So it is just a matter of adding a UIHint to the relevant properties.&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;[UIHint(&lt;span style=&quot;color: #006080;&quot;&gt;&quot;Gallery&quot;&lt;/span&gt;)]&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;virtual&lt;/span&gt; ContentArea Gallery { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Caveats&lt;/h2&gt;
&lt;p&gt;The main thing to note is this only affects drag and drop in edit mode. So it is still possible to add other types of content via code.&lt;/p&gt;
&lt;p&gt;The only other caveat that I&#39;ve seen so far is that the editor and overlay for the content area both have some inbuilt help text that contains an action link for shortcutting to the block creation process. This process if followed through automatically adds the new block to the content area. Currently there is no way to configure this text not to display. It should be a fairly simple fix and there is a feature request for it so hopefully that should come soon.&lt;/p&gt;</id><updated>2013-12-03T13:19:00.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Adding extra information to the property overlay</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2013/9/Adding-extra-information-to-the-property-overlay/" /><id>&lt;p&gt;Sometimes it can be quite hard for editors to know which property they should edit or even which property they are currently editing. Especially when they’ve just created a page and are presented with a column of empty blue squares that represent editable properties. For example:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/5ea9ae66d543425bb6475f190a1ea2f9.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The question of whether it’s possible to modify the overlays to display extra information has come up several times and I have given a few quick answers on the forums. But I figured a blog post might be more appreciated.&lt;/p&gt;
&lt;h2&gt;Display Name&lt;/h2&gt;
&lt;p&gt;The display name for each property is surprisingly already added to the DOM for all properties except content areas. Unfortunately due to some late design decisions it was hidden so that it wouldn&#39;t cause any visual problems. Such as hiding important information on the underlying website. This means that it is actually really simple to get the names of properties to be displayed, for example, on hover of an overlay. It&#39;s just a matter of loading some styles in edit mode:&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 400px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #008000;&quot;&gt;/* Display the information node when hovering the overlay. */&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #cc6633;&quot;&gt;.Sleek&lt;/span&gt; &lt;span style=&quot;color: #cc6633;&quot;&gt;.epi-overlay-item&lt;/span&gt;&lt;span style=&quot;color: #cc6633;&quot;&gt;.dijitHover&lt;/span&gt; &lt;span style=&quot;color: #cc6633;&quot;&gt;.epi-overlay-item-info&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #006080;&quot;&gt;#333;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;background-color&lt;/span&gt;: &lt;span style=&quot;color: #006080;&quot;&gt;#B4C600;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;border&lt;/span&gt;: &lt;span style=&quot;color: #006080;&quot;&gt;3px solid #B4C600;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;border-radius&lt;/span&gt;: &lt;span style=&quot;color: #006080;&quot;&gt;2px 2px 0 0;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;display&lt;/span&gt;: &lt;span style=&quot;color: #006080;&quot;&gt;block;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;font-size&lt;/span&gt;: &lt;span style=&quot;color: #006080;&quot;&gt;1.2em;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;top&lt;/span&gt;: &lt;span style=&quot;color: #006080;&quot;&gt;-30px;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;right&lt;/span&gt;: &lt;span style=&quot;color: #006080;&quot;&gt;-3px;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #008000;&quot;&gt;/* Hide the information node when editing. */&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #cc6633;&quot;&gt;.Sleek&lt;/span&gt; &lt;span style=&quot;color: #cc6633;&quot;&gt;.epi-overlay-item&lt;/span&gt;&lt;span style=&quot;color: #cc6633;&quot;&gt;.dijitFocused&lt;/span&gt; &lt;span style=&quot;color: #cc6633;&quot;&gt;.epi-overlay-item-info&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;display&lt;/span&gt;: &lt;span style=&quot;color: #006080;&quot;&gt;none;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The first selector here says that we want to show the display name when a user hovers the overlay. The main part of this is the display tag which actually makes the display name appear. The others are there to make it look good. I would suggest tweaking these based on how you want it to appear.&lt;/p&gt;
&lt;p&gt;The second selector is to make the display name disappear when the user is editing. So in this case when the overlay has focus. This is important for properties that are edited inline, since the display name could distract or potentially hide important information, but you can decide if it is necessary.&lt;/p&gt;
&lt;p&gt;Thus we end up with the following:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/04d29c09b7a64db3abd4e6af73f0cd96.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Loading Custom CSS in Edit Mode&lt;/h2&gt;
&lt;p&gt;In order to load this custom CSS file in edit mode you need to add a module.config to your solution with the following:&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 400px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;xml&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;1.0&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;utf-8&quot;&lt;/span&gt;?&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;module&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;  &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;clientResources&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;add&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;epi-cms.widgets.base&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;path-to-stylesheet.css&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;resourceType&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;Style&quot;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;  &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;clientResources&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;module&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;</id><updated>2013-09-05T16:47:53.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Changes to the module.config for EPiServer 7.1</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2013/4/Changes-to-the-moduleconfig-for-EPiServer-71/" /><id>&lt;p&gt;I’ve seen on the forum that there have been several people having issues running their custom dojo code after the EPiServer 7.1 update. So I thought I’d mention these issues, their cause and the solution.&lt;/p&gt;
&lt;h2&gt;Required Resources Key Changed for CMS&lt;/h2&gt;
&lt;p&gt;So I’ve demonstrated in previous blog posts that it’s possible to initialize a module without having a component. This was done by using a little trick to add an initializer script to the required resources for CMS by adding the following to your module.config file.&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;clientResources&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;  &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;add&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;epi.cms.widgets.base&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;initialize.js&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;resourceType&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;Script&quot;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;clientResources&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;With the upgrade to dojo 1.8.3 we changed the dojo package name for CMS to be epi-cms. This is due to the fact that dojo has made changes in their loader which means that dot or slash separated package names are no longer supported. To be consistent with our naming we also changed the key for required resources. So the following are now the required resource keys:&lt;/p&gt;
&lt;p&gt;EPiServer 7: &lt;span style=&quot;font-family: monospace;&quot;&gt;epi.cms.widgets.base&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;EPiServer 7.1: &lt;span style=&quot;font-family: monospace;&quot;&gt;epi-cms.widgets.base&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;JavaScript Package Naming&lt;/h2&gt;
&lt;p&gt;As mentioned previously dojo have changed their loader to be fully AMD compliant and as such dot or slash separated names are no longer supported. For example the following is no longer supported:&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;dojoModules&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;  &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;add&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;my.addon&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;scripts/addon&quot;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;dojoModules&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;My suggestion if you are in this situation is to change the delimiter from dot or slash to be a dash instead. Meaning that in the above example the package name would instead be &lt;span style=&quot;font-family: monospace;&quot;&gt;my-addon.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Hopefully this helps anybody who runs into similar issues!&lt;/p&gt;</id><updated>2013-04-18T10:50:15.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Uncompressed JavaScript files for debugging EPiServer 7</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2012/12/Uncompressed-JavaScript-files-for-debugging-EPiServer-7/" /><id>&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; &lt;a href=&quot;/link/ae233441257c43f899c457011f466fdd.aspx&quot;&gt;Click here for a guide on how to use uncompressed JavaScript files in EPiServer 7.6+&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I’m not sure how many people are aware of the fact that there is actually a package containing the uncompressed versions of all the JavaScript files used in the new EPiServer 7 user interface available to be downloaded and used for debugging purposes.&lt;/p&gt;
&lt;p&gt;In any case, we’ve just updated the download package to contain the RTM version of the files (since for the last few weeks it has been a CTP version). The download page can be found here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://world.episerver.com/Download/Items/EPiServer-CMS/EPiServer-7---CMS/EPiServer-CMS-Debugging-of-Client-Side-Files/&quot;&gt;http://world.episerver.com/Download/Items/EPiServer-CMS/EPiServer-7---CMS/EPiServer-CMS-Debugging-of-Client-Side-Files/&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Installation Instructions&lt;/h2&gt;
&lt;p&gt;The package is a zip file which can be extracted directly into the root VPP folder for the site you wish to debug. All the files contained within the package have their filename suffixed with &lt;strong&gt;.uncompressed.js&lt;/strong&gt;, meaning that they will not override the current compressed files. This allows you, as a developer, to switch between compressed and uncompressed files very simply.&lt;/p&gt;
&lt;h2&gt;Running with the Uncompressed Files&lt;/h2&gt;
&lt;p&gt;To tell the system to use the uncompressed files, simply add the following to the EPiServerFramework.config file underneath the episerver.framework element:&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;clientResources&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;debug&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;true&quot;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Happy coding!&lt;/p&gt;</id><updated>2012-12-11T15:23:27.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Taking control of the EPiServer 7 user interface</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2012/12/Taking-control-of-the-EPiServer-7-user-interface/" /><id>&lt;p&gt;The design of the user interface in EPiServer 7 has been primarily targeted toward editors and publishes. Meaning that a lot of the more advanced functionality has been hidden from the main view. Dynamic Properties is one of these pieces of functionality that has been hidden.&lt;/p&gt;
&lt;p&gt;From my time working with previous versions of EPiServer at a partner company, I know that dynamic properties can be used quite often. So to make your lives as developers or system admins easier I’ve created a nice little plugin that will add a button to the main toolbar in edit mode. The button will display the dynamic properties edit view in the main content area of edit mode when clicked. The nice thing about this scenario is that it lets me demonstrate a couple of ways that you too can customize edit mode!&lt;/p&gt;
&lt;h2&gt;The Command&lt;/h2&gt;
&lt;p&gt;In EPiServer 7 we use a command pattern to back the visual elements in the user interface. This allows us to separate the functional concerns of a command from the visual representation. Here is the code for the edit dynamic properties command:&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;define([&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// General application modules&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/_base/declare&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/_base/lang&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/topic&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;epi/cms/contentediting/ContentActionSupport&#39;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// Parent classes&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #006080;&quot;&gt;&#39;epi/shell/command/_Command&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;epi/cms/_ContentContextMixin&#39;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// Resources&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #006080;&quot;&gt;&#39;epi/i18n!epi/nls/addon.dynamicproperties&#39;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;], &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;(declare, lang, topic, ContentActionSupport, _Command, _ContentContextMixin, resources) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// module:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;//        addon/command/EditDynamicProperties&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;//        Displays the edit dynamic properties view in the main edit area when executed. Also listens&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;//        for context changes in order to update whether it can execute.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; declare([_Command, _ContentContextMixin], {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;// label: [public] String&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;//        The action text of the command to be used in visual elements.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        label: resources.label,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;// tooltip: [public] String&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;//        The description text of the command to be used in visual elements.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        tooltip: resources.tooltip,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;// iconClass: [public] String&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;//        The icon class of the command to be used in visual elements.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        iconClass: &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dijitNoIcon&#39;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        contentContextChanged: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Set the command&#39;s model to the new current content.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        protected&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.getCurrentContent().then(lang.hitch(&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;set&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;model&#39;&lt;/span&gt;));&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        _execute: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Publishes a change view topic to switch to the dynamic properties view for the current model.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        protected&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            topic.publish(&lt;span style=&quot;color: #006080;&quot;&gt;&#39;/epi/shell/action/changeview&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;addon/view/DynamicProperties&#39;&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;null&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.model);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        _onModelChange: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Updates canExecute after the model has been updated. Set to true if the current content is&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        a page and the current user has the administer access level; otherwise false.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        protected&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;var&lt;/span&gt; model = &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.model,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;                canExecute = model &amp;amp;&amp;amp; model.capabilities.isPage &amp;amp;&amp;amp; ContentActionSupport.hasAccess(model.accessMask, ContentActionSupport.accessLevel.Administer);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.set(&lt;span style=&quot;color: #006080;&quot;&gt;&#39;canExecute&#39;&lt;/span&gt;, canExecute);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    });&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;});&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;As you can see the only things that related to the user interface are the properties: label, tooltip, and icon class.&lt;/p&gt;
&lt;p&gt;Here you can also see the first method for taking control of the user interface. In the _execute method we publish a topic which tells the main view to display the widget that we pass through; in this case the &lt;span style=&quot;font-family: monospace;&quot;&gt;addon/view/DynamicProperties&lt;/span&gt; widget. We also pass through the model as a parameter to be set on the view since this contains the information about the current page.&lt;/p&gt;
&lt;h2&gt;Localization&lt;/h2&gt;
&lt;p&gt;You might have noticed that the label and tooltip properties are having their values set from a resource file. This resource file is using the standard EPiServer localization service with the translations coming from a XML file as usual. To use localization in JavaScript we use a special plugin module. This module takes a parameter which is defined after the ! character. In this case the parameter is &lt;span style=&quot;font-family: monospace;&quot;&gt;epi/nls/addon.dynamicproperties&lt;/span&gt;. This parameter is parsed server side; the first part indicates that EPiServer will handle this language resource, the second part indicates that this is a language resource request, and the third part is the usual dot separated path to the localization in the XML file.&lt;/p&gt;
&lt;h2&gt;The View&lt;/h2&gt;
&lt;p&gt;The view that we’re going to display basically just wraps an iframe. This is because I’m not creating a new edit view for dynamic properties but rather just display the legacy one in the main content area.&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;define([&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// General application modules&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/_base/declare&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;epi/routes&#39;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// Parent classes&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #006080;&quot;&gt;&#39;epi/shell/widget/Iframe&#39;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;], &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;(declare, routes, Iframe) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// module:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;//        addon/view/DynamicProperties&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;//        Displays the legacy dynamic properties edit view for the current page.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; declare([Iframe], {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;// baseUrl: [public] String&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;//        The base URL to the edit dynamic properties page.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        baseUrl: &lt;span style=&quot;color: #0000ff;&quot;&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        constructor: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Construct the dynamic properties view and set the base URL.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        public&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.baseUrl = routes.getActionPath({&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;                path: &lt;span style=&quot;color: #006080;&quot;&gt;&#39;Edit/EditDynProp.aspx&#39;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                moduleArea: &lt;span style=&quot;color: #006080;&quot;&gt;&#39;LegacyCMS&#39;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            });&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        updateView: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;(data) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Load a new view in the iframe using the base URL and the current page&#39;s content link.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        public&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.load(&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.baseUrl, {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                query: {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;                    id: data.contentLink&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            });&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    });&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;});&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;So all this really does is get the base URL to the legacy edit dynamic properties view and then append the current page ID to the end as a query parameter.&lt;/p&gt;
&lt;h2&gt;Getting the Command into the Main Toolbar&lt;/h2&gt;
&lt;p&gt;So now for the next method for taking control of the user interface. While not simple, it is possible to plug into the main toolbar. But first a little explanation.&lt;/p&gt;
&lt;p&gt;EPiServer 7 uses a provider and consumer pattern for passing commands around the interface. This allows, for example, a component to say that it provides commands without having to be concerned about where the commands are consumed or how they are displayed. In this example the component toolbar is a consumer and will automatically take those commands and display them how they should be displayed in a toolbar.&lt;/p&gt;
&lt;p&gt;So in the global toolbar case, the toolbar is a consumer and it consumes commands that are registered in a named global provider. So we need to add our command to this named provider.&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;require([&lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/aspect&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;epi/dependency&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;addon/command/EditDynamicProperties&#39;&lt;/span&gt;], &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;(aspect, dependency, EditDynamicProperties) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;//        Initialize the addon by registering the command in the global toolbar.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;var&lt;/span&gt; handle,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        key = &lt;span style=&quot;color: #006080;&quot;&gt;&#39;epi.cms.globalToolbar&#39;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        registry = dependency.resolve(&lt;span style=&quot;color: #006080;&quot;&gt;&#39;epi.globalcommandregistry&#39;&lt;/span&gt;),&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        callback = &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;(identifier, provider) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt;(identifier !== key) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                &lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// When the command provider for the global toolbar is registered add our additional command.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            provider.addCommand(&lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; EditDynamicProperties(), {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;                showLabel: &lt;span style=&quot;color: #0000ff;&quot;&gt;true&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            });&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// Remove the aspect handle.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            handle.remove();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        };&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// Listen for when the global toolbar command provider is registered in the command provider registry.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    handle = aspect.after(registry, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;registerProvider&#39;&lt;/span&gt;, callback, &lt;span style=&quot;color: #0000ff;&quot;&gt;true&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;});&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Here we have a small initialization script that will hook into the provider registration method and when the global toolbar provider is registered we’ll add our command.&lt;/p&gt;
&lt;h2&gt;How It Looks&lt;/h2&gt;
&lt;p&gt;This is the button in the toolbar&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/f5f04fade19a4d42b90641e527ad2490.png&quot; alt=&quot;&quot; width=&quot;214&quot; height=&quot;43&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This is the edit dynamic properties view&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/1e28834a8c774650a45eb4919bf30d0d.png&quot; alt=&quot;&quot; width=&quot;564&quot; height=&quot;268&quot; /&gt;&lt;/p&gt;
&lt;p&gt;To make your life easier, I’ve packaged this as an add-on which you can manually upload and install on your site if you want to try it out or you can just extract it to see the code.&lt;/p&gt;
&lt;p&gt;&lt;a title=&quot;Download&quot; href=&quot;/link/70e38ccdf460481c9e1208bfbcf1bd01.nupkg&quot; target=&quot;_blank&quot;&gt;Download&lt;/a&gt;&lt;/p&gt;</id><updated>2012-12-06T18:25:00.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Using contenteditable for editing</title><link href="https://world.optimizely.com/blogs/Ben-McKernan/Dates/2012/11/Using-contenteditable-for-editing/" /><id>&lt;h2&gt;Introducing &lt;span style=&quot;font-size: 120%; font-family: monospace;&quot;&gt;contenteditable&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The contenteditable attribute has been around since the good old days of Internet Explorer 5.5 and has finally been introduced into the HTML5 standards and is supported by pretty much every browser (&lt;a title=&quot;http://caniuse.com/#feat=contenteditable&quot; href=&quot;http://caniuse.com/#feat=contenteditable&quot; target=&quot;_blank&quot;&gt;http://caniuse.com/#feat=contenteditable&lt;/a&gt;). It allows us to edit text directly on an HTML page.&lt;/p&gt;
&lt;p id=&quot;editable-block&quot;&gt;EDIT ME!&lt;/p&gt;
&lt;script type=&quot;text/javascript&quot;&gt;// &lt;![CDATA[
document.getElementById(&quot;editable-block&quot;).setAttribute(&quot;contenteditable&quot;, true);
// ]]&gt;&lt;/script&gt;
&lt;p&gt;With the release of EPiServer 7 we&#39;ve added a lot of functionality to the editing experience but unfortunately contenteditable didn&#39;t make the cut. However with a little spare time after the release I did a little hacking and have created an add-on that can be easily plugged into a site to add contenteditable editing for plain text!&lt;/p&gt;
&lt;h2&gt;Editor Wrapper&lt;/h2&gt;
&lt;p&gt;In EPiServer 7 properties are associated with a particular editor based on their type. These editors are wrapped by an editor wrapper which generically handles the updating of the content model when a change event occurs in the editor and is also responsible for how the editor appears on screen (e.g. forms mode, floating dialog, or inline textbox).&lt;/p&gt;
&lt;p&gt;However, in the contenteditable case, the browser is going to be the editor so there is no need to create a custom editor. Which means that since all the built-in editor wrappers require an editor to be available we need to create a new custom editor wrapper that will start editing when an overlay is clicked and cause changes to be passed to the content model when editing is stopped.&lt;/p&gt;
&lt;p&gt;Here&#39;s one I prepared earlier:&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;define([&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/_base/declare&#39;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// General application modules&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/_base/array&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/dom-attr&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/dom-style&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/_base/event&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/keys&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/_base/lang&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/on&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;dijit/Tooltip&#39;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// Parent classes&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #006080;&quot;&gt;&#39;epi/cms/contentediting/_EditorWrapperBase&#39;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;], &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;(declare, array, domAttr, domStyle, &lt;span style=&quot;color: #0000ff;&quot;&gt;event&lt;/span&gt;, keys, lang, on, Tooltip, _EditorWrapperBase) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// module:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;//        addon/wrapper/ContentEditable&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;//        Adds content editable editing functionality for properties marked up with the &quot;contenteditable&quot; wrapper type.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;//        This editor wrapper doesn&#39;t require or support having an editor widget since editing is done directly on&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;//        the DOM node and is handled by the browser.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; declare([_EditorWrapperBase], {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;// regExp: [public] String&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #008000;&quot;&gt;//        Regular expression string used to validate the input.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        regExp: &lt;span style=&quot;color: #006080;&quot;&gt;&#39;.*&#39;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        constructor: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;(parameters) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;._handlers = [];&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// HACK: Since this editor wrapper doesn&#39;t have an editor widget, mix the editorParams into this.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            lang.mixin(&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;, parameters.editorParams);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            delete parameters.editorParams;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        uninitialize: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Ensure the editing features have been removed during destroy.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        protected&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;._removeEditingFeatures();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        startEdit: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Enable &quot;contenteditable&quot; for the DOM node, connect event listens, and give the editable node focus.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        protected&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;var&lt;/span&gt; node = &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.blockDisplayNode;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.inherited(arguments);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;._handlers.push(&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                on(node, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;blur&#39;&lt;/span&gt;, lang.hitch(&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;tryToStopEditing&#39;&lt;/span&gt;)), &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;                on(node, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;keydown&#39;&lt;/span&gt;, lang.hitch(&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;_processKeyEvent&#39;&lt;/span&gt;))&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            );&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            domStyle.set(&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.overlayItem.domNode, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;visibility&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;hidden&#39;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            domAttr.set(node, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;contenteditable&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;true&#39;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;._focusContentEditable();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        getEditorValue: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Gets the text content of the DOM node.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        public&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.blockDisplayNode.textContent;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        setEditorValue: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;(value) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Sets the given value as the text content of the DOM node.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        public&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.blockDisplayNode.textContent = value;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        isValid: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Tests if the value is valid.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        public&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;var&lt;/span&gt; value = &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.getEditorValue(),&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                regex = &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; RegExp(&lt;span style=&quot;color: #006080;&quot;&gt;&#39;^(?:&#39;&lt;/span&gt; + &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.regExp + &lt;span style=&quot;color: #006080;&quot;&gt;&#39;)&#39;&lt;/span&gt; + (&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.required ? &lt;span style=&quot;color: #006080;&quot;&gt;&#39;&#39;&lt;/span&gt; : &lt;span style=&quot;color: #006080;&quot;&gt;&#39;?&#39;&lt;/span&gt;) + &lt;span style=&quot;color: #006080;&quot;&gt;&#39;$&#39;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; regex.test(value) &amp;amp;&amp;amp; (!&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.required || !&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;._isEmpty(value));&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        _onTryToStopWithInvalidValue: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Display a validation error when the user tries to stop editing in an invalid state.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        protected&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            Tooltip.show(&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.missingMessage, &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.overlayItem.domNode, [&lt;span style=&quot;color: #006080;&quot;&gt;&quot;before-centered&quot;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&quot;after-centered&quot;&lt;/span&gt;]);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        _removeEditingFeatures: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Remove the contenteditable attribute from the DOM node and change back to a non-editing state.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        protected&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            domStyle.set(&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.overlayItem.domNode, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;visibility&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;visible&#39;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            domAttr.remove(&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.blockDisplayNode, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;contenteditable&#39;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.blockDisplayNode.blur();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            Tooltip.hide(&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.overlayItem.domNode);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            array.forEach(&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;._handlers, &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;(handler) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                handler.remove();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            });&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        _focusContentEditable: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Focuses the editable node, setting the caret to the end of the text.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        private&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;var&lt;/span&gt; doc = &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;._getDocument(),&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                range = doc.createRange(),&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;                selection = doc.getSelection();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// Set the range to the entire contents of the node, then collapse the caret to the end.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            range.selectNodeContents(&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.blockDisplayNode);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            range.collapse(&lt;span style=&quot;color: #0000ff;&quot;&gt;false&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// Remove any existing ranges, then make our new range visible.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            selection.removeAllRanges();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            selection.addRange(range);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.blockDisplayNode.focus();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        _getDocument: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Gets the document for the editable node.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        private&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.blockDisplayNode.ownerDocument;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        _isEmpty: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;(value) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Checks if the value is empty or whitespace.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        private&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; (/^\s*$/).test(value);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        },&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        _processKeyEvent: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;(e) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        Handles keypress events inside the content editable and invokes the relevant action.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// tags:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;//        private&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;switch&lt;/span&gt;(e.keyCode) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                &lt;span style=&quot;color: #0000ff;&quot;&gt;case&lt;/span&gt; keys.ESCAPE:&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;                    &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.cancel();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                    &lt;span style=&quot;color: #0000ff;&quot;&gt;break&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;                &lt;span style=&quot;color: #0000ff;&quot;&gt;case&lt;/span&gt; keys.ENTER:&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                &lt;span style=&quot;color: #0000ff;&quot;&gt;case&lt;/span&gt; keys.TAB:&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;                    &lt;span style=&quot;color: #0000ff;&quot;&gt;event&lt;/span&gt;.stop(e);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                    &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.tryToStopEditing();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;                    &lt;span style=&quot;color: #0000ff;&quot;&gt;break&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                &lt;span style=&quot;color: #0000ff;&quot;&gt;default&lt;/span&gt;:&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;                    &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.isModified = &lt;span style=&quot;color: #0000ff;&quot;&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;                    &lt;span style=&quot;color: #0000ff;&quot;&gt;break&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    });&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;});&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Editor Descriptor&lt;/h2&gt;
&lt;p&gt;Now, in order to make sure that our new editor wrapper is used instead of the default one for a string typed property we need to create an editor descriptor. An editor descriptor allows us to add custom information to the metadata for properties which will then be evaluated by the client side code at runtime. In this case it is as simple as specifying the uiWrapperType. Since we have a custom editor wrapper we’ll give it our own value of “contenteditable”.&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;[EditorDescriptorRegistration(TargetType = &lt;span style=&quot;color: #0000ff;&quot;&gt;typeof&lt;/span&gt;(&lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt;), UIHint = &lt;span style=&quot;color: #006080;&quot;&gt;&quot;contenteditable&quot;&lt;/span&gt;)]&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;class&lt;/span&gt; ContentEditableEditorDescriptor : EditorDescriptor&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;void&lt;/span&gt; ModifyMetadata(ExtendedMetadata metadata, IEnumerable&amp;lt;Attribute&amp;gt; attributes)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #0000ff;&quot;&gt;base&lt;/span&gt;.ModifyMetadata(metadata, attributes);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        metadata.CustomEditorSettings[&lt;span style=&quot;color: #006080;&quot;&gt;&quot;uiWrapperType&quot;&lt;/span&gt;] = &lt;span style=&quot;color: #006080;&quot;&gt;&quot;contenteditable&quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You’ll also notice that I’ve given it a UIHint. This allows us to maintain the default functionality for strings and only use contenteditable where we specify. For example, in the Alloy templates I could change the UIHint for MetaDescription in SitePageData to be &quot;contenteditable&quot;.&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;[Display(GroupName = Global.GroupNames.MetaData, Order = 300)]&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;[CultureSpecific]&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;[UIHint(&lt;span style=&quot;color: #006080;&quot;&gt;&quot;contenteditable&quot;&lt;/span&gt;)]&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;virtual&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; MetaDescription { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Which means that MetaDescription will appear like this in on page edit.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/66e86eb68bde4ed09f4bad89dece6f2e.png&quot; alt=&quot;MetaDescription with contenteditable&quot; width=&quot;417&quot; height=&quot;141&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Initialization&lt;/h2&gt;
&lt;p&gt;Now in order to map the “contenteditable” key that we’ve specified as our uiWrapperType to our actual editor wrapper we need to register a new editor wrapper in the editor factory. Unfortunately this is easier said than done. I have a fairly simple solution (*cough* hack *cough*) that will wire everything up nicely and efficiently. It a bit advanced in terms of dojo concepts but it basically listen on the register method of dependency and when the editor factory is registered we add our custom editor wrapper then unhook ourselves.&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;require([&lt;span style=&quot;color: #006080;&quot;&gt;&#39;dojo/aspect&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;epi/dependency&#39;&lt;/span&gt;], &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;(aspect, dependency) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// summary:&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;//        Initialize the addon by registering the contenteditable wrapper in the editor factory.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;var&lt;/span&gt; handle,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        key = &lt;span style=&quot;color: #006080;&quot;&gt;&#39;epi.cms.contentediting.EditorFactory&#39;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        register = &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt;(identifier) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt; (identifier !== key) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;                &lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// When the EditorFactory is registered add our additional editor wrapper.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;var&lt;/span&gt; editorFactory = dependency.resolve(key);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            editorFactory.registerEditorWrapper(&lt;span style=&quot;color: #006080;&quot;&gt;&#39;contenteditable&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;&#39;addon.wrapper.ContentEditable&#39;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #008000;&quot;&gt;// Remove the aspect handle.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;            handle.remove();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        };&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #008000;&quot;&gt;// Listen for when the EditorFactory is registered in the dependency manager.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    handle = aspect.after(dependency, &lt;span style=&quot;color: #006080;&quot;&gt;&quot;register&quot;&lt;/span&gt;, register, &lt;span style=&quot;color: #0000ff;&quot;&gt;true&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;});&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Adding the following to your module.config will ensure that this script is run when the CMS module is started.&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 300px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;clientResources&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;add&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;epi.cms.widgets.base&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;ClientResources/addon/initialize.js&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;resourceType&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;Script&quot;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;clientResources&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Installing the ContentEditable add-on&lt;/h2&gt;
&lt;p&gt;To make your life easier, I’ve packaged this as an add-on which you can manually upload and install on your site if you want to try it out.&lt;/p&gt;
&lt;p&gt;&lt;a title=&quot;ContentEditable 1.0.0.0&quot; href=&quot;/link/c0f1f5cdbe4e4323bbf389beee6a1687.nupkg&quot; target=&quot;_blank&quot;&gt;Download&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After installing the add-on just set the UIHint for any of your string typed properties to “contenteditable” then build. After refreshing the site those properties will now use contenteditable.&lt;/p&gt;</id><updated>2012-11-22T15:38:00.0000000Z</updated><summary type="html">Blog post</summary></entry></feed>