Showing
2 changed files
with
6 additions
and
5 deletions
| ... | @@ -167,18 +167,19 @@ module.exports = function (ngApp, events) { | ... | @@ -167,18 +167,19 @@ module.exports = function (ngApp, events) { |
| 167 | restrict: 'A', | 167 | restrict: 'A', |
| 168 | scope: { | 168 | scope: { |
| 169 | tinymce: '=', | 169 | tinymce: '=', |
| 170 | - ngModel: '=', | 170 | + mceModel: '=', |
| 171 | - ngChange: '=' | 171 | + mceChange: '=' |
| 172 | }, | 172 | }, |
| 173 | link: function (scope, element, attrs) { | 173 | link: function (scope, element, attrs) { |
| 174 | 174 | ||
| 175 | function tinyMceSetup(editor) { | 175 | function tinyMceSetup(editor) { |
| 176 | editor.on('keyup', (e) => { | 176 | editor.on('keyup', (e) => { |
| 177 | var content = editor.getContent(); | 177 | var content = editor.getContent(); |
| 178 | + console.log(content); | ||
| 178 | scope.$apply(() => { | 179 | scope.$apply(() => { |
| 179 | - scope.ngModel = content; | 180 | + scope.mceModel = content; |
| 180 | }); | 181 | }); |
| 181 | - scope.ngChange(content); | 182 | + scope.mceChange(content); |
| 182 | }); | 183 | }); |
| 183 | } | 184 | } |
| 184 | 185 | ... | ... |
| ... | @@ -31,7 +31,7 @@ | ... | @@ -31,7 +31,7 @@ |
| 31 | </div> | 31 | </div> |
| 32 | </div> | 32 | </div> |
| 33 | <div class="edit-area flex-fill flex"> | 33 | <div class="edit-area flex-fill flex"> |
| 34 | - <textarea id="html-editor" tinymce="editorOptions" ng-change="editorChange" ng-model="editorHtml" name="html" rows="5" | 34 | + <textarea id="html-editor" tinymce="editorOptions" mce-change="editorChange" mce-model="editorHtml" name="html" rows="5" |
| 35 | @if($errors->has('html')) class="neg" @endif>@if(isset($model) || old('html')){{htmlspecialchars( old('html') ? old('html') : $model->html)}}@endif</textarea> | 35 | @if($errors->has('html')) class="neg" @endif>@if(isset($model) || old('html')){{htmlspecialchars( old('html') ? old('html') : $model->html)}}@endif</textarea> |
| 36 | @if($errors->has('html')) | 36 | @if($errors->has('html')) |
| 37 | <div class="text-neg text-small">{{ $errors->first('html') }}</div> | 37 | <div class="text-neg text-small">{{ $errors->first('html') }}</div> | ... | ... |
-
Please register or sign in to post a comment