(choice, beforeState)
| 433 | scope.displayElements.html.addClass("ta-html ta-editor " + scope.classes.htmlEditor); |
| 434 | |
| 435 | var testAndSet = function(choice, beforeState) { |
| 436 | /* istanbul ignore next: this is only here because of a bug in rangy where rangy.saveSelection() has cleared the state */ |
| 437 | if (beforeState !== $document[0].queryCommandState(choice)) { |
| 438 | $document[0].execCommand(choice, false, null); |
| 439 | } |
| 440 | }; |
| 441 | // used in the toolbar actions |
| 442 | scope._actionRunning = false; |
| 443 | var _savedSelection = false; |