summaryrefslogtreecommitdiff
path: root/assets/js/components/text-editor.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/components/text-editor.js')
-rw-r--r--assets/js/components/text-editor.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/assets/js/components/text-editor.js b/assets/js/components/text-editor.js
index 5268bc4d..2bf8109e 100644
--- a/assets/js/components/text-editor.js
+++ b/assets/js/components/text-editor.js
@@ -51,8 +51,8 @@ KB.component('text-editor', function (containerElement, options) {
.attr('tabindex', options.tabindex || '-1')
.attr('required', options.required || false)
.attr('autofocus', options.autofocus || null)
- .attr('placeholder', options.placeholder || '')
- .text(options.text)
+ .text(options.text) // Order is important for IE11
+ .attr('placeholder', options.placeholder || null)
.build();
return KB.dom('div')
@@ -124,7 +124,7 @@ KB.component('text-editor', function (containerElement, options) {
document.execCommand('ms-beginUndoUnit');
} catch (error) {}
- textarea.value = replaceTextRange(text, textarea.selectionStart, textarea.selectionEnd, replacedText);
+ textarea.value = replaceTextRange(textarea.value, textarea.selectionStart, textarea.selectionEnd, replacedText);
try {
document.execCommand('ms-endUndoUnit');