Sha256: ec0ff83f8c1d025b8e819e03b7578e0740f1d4b34223766b411b0e6ab39531cd
Contents?: true
Size: 1.82 KB
Versions: 16
Compression:
Stored size: 1.82 KB
Contents
"use strict"; var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } scrivito.editors.HtmlEditor = (function () { _createClass(HtmlEditor, null, [{ key: "canEdit", value: function canEdit(_ref) { var type = _ref.type; return type == "html"; } }]); function HtmlEditor(_ref2) { var controller = _ref2.controller; _classCallCheck(this, HtmlEditor); this.controller = controller; } _createClass(HtmlEditor, [{ key: "editorWillBeActivated", value: function editorWillBeActivated() { this.controller.setDomMode('Replace'); } }, { key: "editorWillBeDeactivated", value: function editorWillBeDeactivated() { // empty } }, { key: "editorDomWasMounted", value: function editorDomWasMounted(domNode) { scrivito.editors._applyPlaceholderToElement(domNode); $(domNode).html(this.controller.content); var editorProxy = new scrivito.editors.ControllerContentProxy(domNode, this.controller); scrivito.editors.medium_editor._activateWithProxy(editorProxy); } }]); return HtmlEditor; })(); if (scrivito.registerEditor) { scrivito.registerEditor(scrivito.editors.HtmlEditor); }
Version data entries
16 entries across 16 versions & 1 rubygems