From 242c2761fea08ef2c185a69432ce40073d7bdd70 Mon Sep 17 00:00:00 2001 From: Jason Chen Date: Mon, 9 May 2016 14:32:22 -0700 Subject: [PATCH] fix #651 --- assets/snow/toolbar.styl | 9 +++++++++ themes/base.js | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/assets/snow/toolbar.styl b/assets/snow/toolbar.styl index dc4dcd5fe5..6b0fe59d29 100644 --- a/assets/snow/toolbar.styl +++ b/assets/snow/toolbar.styl @@ -34,6 +34,15 @@ colorItemsPerRow = 7 .ql-fill, .ql-stroke.ql-fill fill: inactiveColor + .ql-direction + svg:first-child + display: none + .ql-direction.ql-active + svg:first-child + display: inline + svg:last-child + display: none + .ql-picker // background-color: yellow // TODO remove color: inactiveColor diff --git a/themes/base.js b/themes/base.js index 29e880c791..0fe4687ef6 100644 --- a/themes/base.js +++ b/themes/base.js @@ -20,7 +20,9 @@ class BaseTheme extends Theme { if (!name.startsWith('ql-')) return; name = name.slice('ql-'.length); if (icons[name] == null) return; - if (typeof icons[name] === 'string') { + if (name === 'direction') { + button.innerHTML = icons[name][''] + icons[name]['rtl']; + } else if (typeof icons[name] === 'string') { button.innerHTML = icons[name]; } else { let value = button.value || '';