Skip to content

Commit

Permalink
Fixes #33:
Browse files Browse the repository at this point in the history
* No longer using `editor.setParagraphFormat()` - have switched to `document.execCommand("defaultparagraphseparator", etc etc)`.
  • Loading branch information
Eyal Rozenberg committed Sep 5, 2020
1 parent 677eaa0 commit cf202b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/chrome/content/bidimailui-composer.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ BiDiMailUI.Composition = {
dump('setParagraphMode failed to acquire editor object.');
return;
}
editor.setParagraphFormat(modeStr);
editor.document.execCommand("defaultparagraphseparator", true, modeStr);
// as we don't use doStatefulCommand, we need to update the command
// state attribute...
document.getElementById("cmd_paragraphState").setAttribute("state", modeStr);
Expand Down Expand Up @@ -1375,7 +1375,8 @@ BiDiMailUI.Composition = {
catch(ex) { }
// -- "Remember old style"

editor.setParagraphFormat("p");
editor.document.execCommand("defaultparagraphseparator", true, "p");

var par = BiDiMailUI.Composition.findClosestBlockElement(editor.selection.focusNode);
var prevPar = par.previousSibling;

Expand Down

0 comments on commit cf202b2

Please sign in to comment.