Score:0

Custom styled tables

ck flag

I am trying to figure out a way for a content editor (with little to no coding experience) to add and style tables within their content. I was planning on creating a paragraph type where the editor could choose the various options to style their table and then add the table content via CKEditor.

Where I'm running into trouble is figuring out how to add classes to <table> that gets generated by CKEditor. Is there a way to do this? Or, alternatively, is there a different way I should be following to create and style tables within the content?

Score:0
ck flag

I was able to solve this issue by using the "Styles" dropdown.

Using the "Full HTML" text format (Configuration > Content authoring > Text formats and editors) you can drag the "Styles" dropdown from the available tools into the toolbar. You'll then have the option to add classes under CKEditor plugin settings > Styles dropdown.

When a user is editing content (using a text format that has this enabled), they'll be able to click on a table and choose a class from the Styles dropdown.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.