Sha256: cd9f2dd6251c809e56be4986c60dbe017e8a49359892c7725ae7bf1a4ebd5e13
Contents?: true
Size: 1.82 KB
Versions: 13
Compression:
Stored size: 1.82 KB
Contents
<script type="text/ng-template" id="promethee/components/text"> <div ng-controller="TextController" class="promethee-editor__component promethee-editor__component--text"> <div class="promethee-editor__toolbar"> Text <%= render 'promethee/partials/toolbar_buttons' %> </div> <div ng-show="editing"> <summernote config="options" ng-model="component.attributes.body"></summernote> </div> <div ng-hide="editing"> <div class="promethee-editor__wrapper" ng-bind-html="component.attributes.body | htmlSafe" ng-click="edit()"></div> </div> </div> </script> <script type="text/ng-template" id="promethee/components/text/move"> <div ng-bind-html="component.attributes.body | htmlSafe"></div> </script> <script type="text/ng-template" id="promethee/components/text/localize"> <div class="row"> <div class="col-md-6"> <summernote config="options" ng-model="component.attributes.body"></summernote> </div> <div class="col-md-6"> <b>Master</b> <div class="promethee-editor__wrapper" ng-bind-html="component.master.attributes.body | htmlSafe"></div> </div> </div> </script> <script> angular.injector(['ng', 'Promethee']).get('definitions').push({ name: 'Text', thumb: 'http://via.placeholder.com/300x200', data: { type: 'text', attributes: { body: 'Edit me' } } }); promethee.controller('TextController', ['$scope', function($scope) { $scope.editing = false; $scope.edit = function() { this.editing = true; }; $scope.complete = function() { this.editing = false; }; $scope.options = { toolbar: [ ['headline', ['style']], ['style', ['bold', 'italic']], ['alignment', ['ul', 'ol', 'paragraph']], ['code', ['codeview']] ] }; }]); </script>
Version data entries
13 entries across 13 versions & 1 rubygems