File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,19 @@ myAppModule.controller('MyController', function($scope) {
125
125
</form >
126
126
```
127
127
128
+ ## Testing your Application (Protractor)
129
+
130
+ If you are testing your application using Protractor and you wish to be able to automate the
131
+ contribution of rich text content as part of the tests, use the TinyMCE API method ` insertContent `
132
+ in conjunction with the WebDriver's ` executeScript ` method, like this:
133
+
134
+ ``` javascript
135
+ browser .driver .executeScript (" tinyMCE.activeEditor.insertContent('This is <em>RICH</em> content')" );
136
+ ```
137
+
138
+ Note that if you use the TinyMCE API method ` setContent ` , this will fail to update the Angular model
139
+ with the entered content, so use ` insertContent ` instead.
140
+
128
141
----
129
142
130
143
You can’t perform that action at this time.
0 commit comments