-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support merging of table cells (#899)
* parse attributes in shortcodes * add support for colspan and rowspan attributes in tables * remove errant logging statements * fix issue with attributes in turndown rule * add some comments to explain the new ckeditor constants * add tests for rowspan, colspan and attribute whitelist
- Loading branch information
Showing
5 changed files
with
136 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { TABLE_ALLOWED_ATTRS } from "./constants" | ||
|
||
export function buildAttrsString(attrs: RegExpMatchArray | null): string { | ||
return attrs ? | ||
attrs | ||
.map(attr => | ||
TABLE_ALLOWED_ATTRS.some(allowedAttr => attr.includes(allowedAttr)) ? | ||
` ${attr}` : | ||
"" | ||
) | ||
.join("") : | ||
"" | ||
} |