Updated to support lang attribute and styles in editor

This commit is contained in:
Cheng-Han, Wu 2016-02-15 19:13:17 -06:00
parent 6967dac0ff
commit 880f6bcf02
4 changed files with 20 additions and 4 deletions

View file

@ -66,7 +66,7 @@ function slugifyWithUTF8(text) {
}
//parse meta
function parseMeta(md, view, toc, tocAffix) {
function parseMeta(md, edit, view, toc, tocAffix) {
var robots = null;
var lang = null;
var dir = null;
@ -93,10 +93,14 @@ function parseMeta(md, view, toc, tocAffix) {
view.attr('lang', lang);
toc.attr('lang', lang);
tocAffix.attr('lang', lang);
if (edit)
edit.attr('lang', lang);
} else {
view.removeAttr('lang');
toc.removeAttr('lang');
tocAffix.removeAttr('lang');
if (edit)
edit.removeAttr('lang', lang);
}
//text direction
if (dir) {