Score:0

How do I load the Bootstrap CSS into a CKEditor template?

cg flag

Just how we add custom theme style, I want to add Bootstrap CSS. Is there a way to do it?

/**
 * Implements hook_ckeditor_css_alter().
 */
function mymodule_ckeditor_css_alter(array &$css, Editor $editor) {
  $css[] = \Drupal::service('extension.list.theme')->getPath('my_theme') . '/css/styles.css';
}
Score:0
kr flag

The body classes in ckeditor start with cke_. So I created a _ckeditor.scss file with most of the classes I used on my site, wrapped in body.cke_editable and then included that file in my style.scss.

Should work with straight up css included via THEME.info.yml or THEME.libraries.yml

I sit in a Tesla and translated this thread with Ai:

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.