Skip to content

Commit

Permalink
Merge pull request #24 from techdivision/bugfix/multipleInlineClasses
Browse files Browse the repository at this point in the history
[bugfix] Fix issues with multiple inline classes
  • Loading branch information
calcalid authored Jul 22, 2021
2 parents 115155b + bbea640 commit a9d1681
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Example: [Configuration/Settings.yaml](Configuration/Settings.yaml)
**What values are allowed for cssClass?**
- **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.
- You can add **multiple classes** by separating them with a whitespace. e.g. "btn btn-primary"
-- *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.
**Activate the preset for your inline editable NodeType property:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ export default (presetIdentifier, presetConfiguration) =>
// View configuration
Object.keys(presetConfiguration.options).forEach(optionIdentifier => {

const classes = presetConfiguration.options[optionIdentifier].cssClass.split(' ');
const classes = presetConfiguration.options[optionIdentifier].cssClass;

config.view[optionIdentifier] = {
name: 'span',
classes: classes
attributes: { 'class': classes }
}
});

Expand Down
4 changes: 2 additions & 2 deletions Resources/Public/JavaScript/CkStyles/Plugin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Resources/Public/JavaScript/CkStyles/Plugin.js.map

Large diffs are not rendered by default.

0 comments on commit a9d1681

Please sign in to comment.