1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-11-24 03:42:32 +01:00

Changed direct attributes to prevent conflicts

This commit is contained in:
Dan Brown 2016-03-09 22:54:18 +00:00
parent 59ce228c2e
commit 93ebdf724b
2 changed files with 6 additions and 5 deletions

View 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);
});
}

View 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>