]> BookStack Code Mirror - bookstack/commitdiff
Changed direct attributes to prevent conflicts
authorDan Brown <redacted>
Wed, 9 Mar 2016 22:54:18 +0000 (22:54 +0000)
committerDan Brown <redacted>
Wed, 9 Mar 2016 22:54:18 +0000 (22:54 +0000)
resources/assets/js/directives.js
resources/views/pages/form.blade.php

index b6c41bb3cfadb332f4edf041b76c82f16182f736..dee02ab40a7deabbbc503184f29cf749fa0e30eb 100644 (file)
@@ -167,18 +167,19 @@ module.exports = function (ngApp, events) {
             restrict: 'A',
             scope: {
                 tinymce: '=',
-                ngModel: '=',
-                ngChange: '='
+                mceModel: '=',
+                mceChange: '='
             },
             link: function (scope, element, attrs) {
 
                 function tinyMceSetup(editor) {
                     editor.on('keyup', (e) => {
                         var content = editor.getContent();
+                        console.log(content);
                         scope.$apply(() => {
-                            scope.ngModel = content;
+                            scope.mceModel = content;
                         });
-                        scope.ngChange(content);
+                        scope.mceChange(content);
                     });
                 }
 
index e32ef537a110e206c0ba96c397f56512f61d6844..f406247d7bac89c20f2d8767b3fbf4e6ea2436b3 100644 (file)
@@ -31,7 +31,7 @@
         </div>
     </div>
     <div class="edit-area flex-fill flex">
-        <textarea id="html-editor" tinymce="editorOptions" ng-change="editorChange" ng-model="editorHtml" name="html" rows="5"
+        <textarea id="html-editor" tinymce="editorOptions" mce-change="editorChange" mce-model="editorHtml"  name="html" rows="5"
                   @if($errors->has('html')) class="neg" @endif>@if(isset($model) || old('html')){{htmlspecialchars( old('html') ? old('html') : $model->html)}}@endif</textarea>
         @if($errors->has('html'))
             <div class="text-neg text-small">{{ $errors->first('html') }}</div>