Skip to content

Commit 36c286a

Browse files
author
Navneet Kumar
committed
Done #211
1 parent b32b0b1 commit 36c286a

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

demo/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
$scope.myTitle = '<span style="font-family: Verdana,Geneva,sans-serif; font-size: 30px;">My Document\'s Title</span><span style="font-size: 18px;"></span></span>';
3333
$scope.sample2Text = '';
34-
$scope.sample3Text = '';
34+
$scope.sample3Text = 'Check out the <a href="https://www.froala.com/wysiwyg-editor">Froala Editor</a>';
3535

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

demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ <h2>Sample 3: Manual Initialization</h2>
8484
<button class="manual" ng-click="initControls.initialize()">Initialize Editor</button>
8585
<button ng-click="initControls.destroy()" ng-show="initControls.getEditor() != null">Close Editor</button>
8686
<button ng-click="deleteAll()" ng-show="initControls.getEditor() != null">Delete All</button>
87-
<div id="froala-sample-3" froala froala-init="initialize(initControls)" ng-model="sample3Text">Check out the <a href="https://www.froala.com/wysiwyg-editor">Froala Editor</a></div>
87+
<div id="froala-sample-3" froala froala-init="initialize(initControls)" ng-model="sample3Text"></div>
8888
</div>
8989

9090
<div class="sample">

src/angular-froala.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
link: function(scope, element, attrs, ngModel) {
3333
// Create a blur event to update the data of ngModel
3434
element.on('blur', function () {
35-
ngModel.$setViewValue(element[0].innerHTML.text())
35+
ngModel.$setViewValue(element[0].innerHTML)
3636
});
3737

3838

@@ -116,9 +116,10 @@
116116
ctrl.editorInitialized = true;
117117
ngModel.$render()
118118
}
119-
119+
console.log('@@@@@@@@@@@@@@@', element[0].innerHTML);
120120
ctrl.froalaEditor = new FroalaEditor(element[0], ctrl.options);
121-
element[0].innerHTML = ctrl.froalaElement = ctrl.froalaEditor.$el[0];
121+
// ctrl.froalaElement = ctrl.froalaEditor.$el[0];
122+
// element[0].innerHTML = ctrl.froalaEditor.$el[0].innerHTML;
122123

123124
//assign the froala instance to the options object to make methods available in parent scope
124125
if (scope.froalaOptions) {

0 commit comments

Comments
 (0)