Skip to content

Commit a9d1681

Browse files
authored
Merge pull request #24 from techdivision/bugfix/multipleInlineClasses
[bugfix] Fix issues with multiple inline classes
2 parents 115155b + bbea640 commit a9d1681

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Example: [Configuration/Settings.yaml](Configuration/Settings.yaml)
8181
**What values are allowed for cssClass?**
8282
- **Not null** Using an empty class (cssClass: null) to unset the value might cause errors during rendering in the backend. The select boxes of this package contain an "x" button for resetting the value.
8383
- You can add **multiple classes** by separating them with a whitespace. e.g. "btn btn-primary"
84+
-- *Caution* There is a known issue for block styles when using two options when one contains the other. e.g. "color-red" and "color-red bold". Please try to avoid this for block styles.
8485
8586
**Activate the preset for your inline editable NodeType property:**
8687

Resources/Private/JavaScript/CkStyles/src/InlineStylesEditing.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ export default (presetIdentifier, presetConfiguration) =>
2525
// View configuration
2626
Object.keys(presetConfiguration.options).forEach(optionIdentifier => {
2727

28-
const classes = presetConfiguration.options[optionIdentifier].cssClass.split(' ');
28+
const classes = presetConfiguration.options[optionIdentifier].cssClass;
2929

3030
config.view[optionIdentifier] = {
3131
name: 'span',
32-
classes: classes
32+
attributes: { 'class': classes }
3333
}
3434
});
3535

Resources/Public/JavaScript/CkStyles/Plugin.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Resources/Public/JavaScript/CkStyles/Plugin.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)