1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-05 08:18:06 +00:00

Add default settings for styled inline SPANs (#6877)

* add default settings for styled inline SPANs

* change color names in palettes and vanilla-base

* change parser behaviour if custom class is used

* tc-inline-style will only be set if no other custom setting is appliead

* Add tests for inline-styles

* add one more test

* remove space after if
This commit is contained in:
Mario Pietsch
2022-10-07 19:05:49 +02:00
committed by GitHub
parent f33c7e2aef
commit 23e0eeb556
23 changed files with 62 additions and 5 deletions

View File

@@ -41,9 +41,6 @@ exports.parse = function() {
var node = {
type: "element",
tag: "span",
attributes: {
"class": {type: "string", value: "tc-inline-style"}
},
children: tree
};
if(classString) {
@@ -52,6 +49,9 @@ exports.parse = function() {
if(stylesString) {
$tw.utils.addAttributeToParseTreeNode(node,"style",stylesString);
}
if(!classString && !stylesString) {
$tw.utils.addClassToParseTreeNode(node,"tc-inline-style");
}
return [node];
};