зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1790725 - Allow useCss for mail editor. r=masayuki
After this change, it's possible to set the pref, or use editor.document.execCommand("styleWithCSS", false, "true") to enable css in mail compose. Differential Revision: https://phabricator.services.mozilla.com/D157276
This commit is contained in:
Родитель
adea50e5d0
Коммит
a4024058a5
|
@ -359,7 +359,7 @@ class HTMLEditor final : public EditorBase,
|
|||
* with "font style elements" like <b>, <i>, etc, and <blockquote> to indent,
|
||||
* align attribute to align contents, returns false.
|
||||
*/
|
||||
bool IsCSSEnabled() const { return !IsMailEditor() && mIsCSSPrefChecked; }
|
||||
bool IsCSSEnabled() const { return mIsCSSPrefChecked; }
|
||||
|
||||
/**
|
||||
* Enable/disable object resizers for <img> elements, <table> elements,
|
||||
|
|
|
@ -3176,9 +3176,8 @@ nsresult HTMLEditor::GetFontColorState(bool* aMixed, nsAString& aOutColor) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// the return value is true only if the instance of the HTML editor we created
|
||||
// can handle CSS styles (for instance, Composer can, Messenger can't) and if
|
||||
// the CSS preference is checked
|
||||
// The return value is true only if the instance of the HTML editor we created
|
||||
// can handle CSS styles and if the CSS preference is checked.
|
||||
NS_IMETHODIMP HTMLEditor::GetIsCSSEnabled(bool* aIsCSSEnabled) {
|
||||
*aIsCSSEnabled = IsCSSEnabled();
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче