MCPcopy Create free account
hub / github.com/TruthHun/BookStack / tokenStyles

Function tokenStyles

static/editor.md/lib/codemirror/mode/textile/textile.js:136–151  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

134 };
135
136 function tokenStyles(state) {
137 var disabled = textileDisabled(state);
138 if (disabled) return disabled;
139
140 var styles = [];
141 if (state.layoutType) styles.push(TOKEN_STYLES[state.layoutType]);
142
143 styles = styles.concat(activeStyles(
144 state, "addition", "bold", "cite", "code", "deletion", "em", "footCite",
145 "image", "italic", "link", "span", "strong", "sub", "sup", "table", "tableHeading"));
146
147 if (state.layoutType === "header")
148 styles.push(TOKEN_STYLES.header + "-" + state.header);
149
150 return styles.length ? styles.join(" ") : null;
151 }
152
153 function textileDisabled(state) {
154 var type = state.layoutType;

Callers 4

handlePhraseModifierFunction · 0.85
togglePhraseModifierFunction · 0.85
tokenStylesWithFunction · 0.85
textile.jsFile · 0.85

Calls 2

textileDisabledFunction · 0.85
activeStylesFunction · 0.85

Tested by

no test coverage detected