Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions demo/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
$scope.sample2Text = '';
$scope.sample3Text = 'Check out the <a href="https://www.froala.com/wysiwyg-editor">Froala Editor</a>';


$scope.imgModel = {src: 'image.jpg'};

$scope.buttonModel = {innerHTML: 'Click Me'};
Expand All @@ -42,6 +43,12 @@
angularIgnoreAttrs: ['class', 'ng-model', 'id', 'froala']
}

$scope.sample8Text = '<p><b>Hello</b>, world!</p>';
$scope.sample8Options = {
initOnClick: true,
placeholderText: "",
}

$scope.initializeLink = function(linkInitControls) {
$scope.linkInitControls = linkInitControls;
};
Expand Down
5 changes: 5 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ <h4>Model Obj:</h4>
<div>{{linkModel}}</div>
</div>

<div class="sample">
<h2>Sample 8: Init on click</h2>
<textarea id="froala-sample-2" froala="sample8Options" ng-model="sample8Text"></textarea>
</div>

</body>

</html>
3 changes: 3 additions & 0 deletions src/angular-froala.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
ctrl.froalaEditor.undo.reset();
ctrl.froalaEditor.undo.saveStep();
}
else if (ctrl.froalaEditor) {
ctrl.froalaEditor.el.innerHTML = ngModel.$viewValue || '';
}
}
};

Expand Down