Added RTE composite block and class formatting
Added "block.class" and "block#id" formatting to the Rich Text Editor. Example use include following formats: "p.lead" "h1#title" Without this only "p" or ".lead" will work, not composites.
This commit is contained in:
@@ -78,6 +78,16 @@ angular.module("umbraco")
|
||||
r.inline = "span";
|
||||
r.attributes = { id: rule.selector.substring(1) };
|
||||
}
|
||||
else if (rule.selector[0] != "." && rule.selector.indexOf(".") > -1) {
|
||||
var split = rule.selector.split(".");
|
||||
r.block = split[0];
|
||||
r.classes = rule.selector.substring(rule.selector.indexOf(".") + 1);
|
||||
}
|
||||
else if (rule.selector[0] != "#" && rule.selector.indexOf("#") > -1) {
|
||||
var split = rule.selector.split("#");
|
||||
r.block = split[0];
|
||||
r.classes = rule.selector.substring(rule.selector.indexOf("#") + 1);
|
||||
}
|
||||
else {
|
||||
r.block = rule.selector;
|
||||
}
|
||||
@@ -254,4 +264,4 @@ angular.module("umbraco")
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user