File tree Expand file tree Collapse file tree 3 files changed +109
-0
lines changed Expand file tree Collapse file tree 3 files changed +109
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * @file
3
+ * Basic styles to apply to editor content.
4
+ */
5
+ body {
6
+ font : 1 rem/1.6 verdana, sans-serif;
7
+ }
8
+ a {
9
+ text-decoration : none;
10
+ }
11
+ a : hover {
12
+ text-decoration : underline;
13
+ }
14
+ ol ,
15
+ ul {
16
+ margin : 1em 0 1em 1em ;
17
+ padding : 0 0 0 1.2em ;
18
+ }
19
+ blockquote {
20
+ margin : 1em 0 ;
21
+ padding : 0 0 0 1em ;
22
+ border-left : 4px solid # ddd ;
23
+ }
24
+ pre {
25
+ padding : 4px ;
26
+ max-width : 100% ;
27
+ overflow : auto;
28
+ border-radius : 3px ;
29
+ }
30
+ table {
31
+ border-collapse : collapse;
32
+ max-width : 100% ;
33
+ margin : 1em 0 1.5em ;
34
+ }
35
+ tr .even {
36
+ background-color : initial;
37
+ }
38
+ td , th {
39
+ padding : 4px 10px ;
40
+ vertical-align : top;
41
+ }
42
+ audio ,
43
+ video ,
44
+ iframe ,
45
+ form ,
46
+ button ,
47
+ input ,
48
+ optgroup ,
49
+ select ,
50
+ textarea {
51
+ max-width : 100% ;
52
+ }
53
+ h1 {
54
+ font-size : 2em ;
55
+ line-height : 1.4 ;
56
+ }
57
+ h2 {
58
+ font-size : 1.6em ;
59
+ line-height : 1.5 ;
60
+ }
61
+ h3 {
62
+ font-size : 1.5em ;
63
+ }
64
+ h4 {
65
+ font-size : 1.1em ;
66
+ }
67
+ h5 {
68
+ font-size : 1em ;
69
+ }
70
+ h6 {
71
+ font-size : 1em ;
72
+ }
73
+ @media screen and (min-width : 960px ) {
74
+ h1 {
75
+ font-size : 2.3em ;
76
+ }
77
+ h2 {
78
+ font-size : 1.7em ;
79
+ }
80
+ }
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ stylesheets[all][] = css/colors.css
9
9
stylesheets[screen][] = css/maintenance.css
10
10
11
11
scripts[] = js/helper.js
12
+ tinymce_content_css[] = css/editor.css
12
13
13
14
settings[header_position] = 'left'
14
15
settings[font] = 'opensans'
Original file line number Diff line number Diff line change @@ -110,3 +110,31 @@ function lateral_ckeditor_settings_alter(&$settings, $format) {
110
110
$ settings ['contentsCss ' ][] = $ path . '/css/colors.css ' ;
111
111
}
112
112
}
113
+
114
+ /**
115
+ * Implements hook_tinymce_options_alter().
116
+ */
117
+ function lateral_tinymce_options_alter (array &$ options , $ format ) {
118
+ global $ base_url , $ base_path ;
119
+ $ path = $ base_path . backdrop_get_path ('theme ' , 'lateral ' );
120
+ $ font_selected = theme_get_setting ('font ' );
121
+
122
+ if ($ font_selected == 'merriweather ' ) {
123
+ $ options ['tiny_options ' ]['content_css ' ][] = $ path . '/css/merriweather.css ' ;
124
+ }
125
+ elseif ($ font_selected == 'opensans ' ) {
126
+ $ options ['tiny_options ' ]['content_css ' ][] = $ path . '/css/use-opensans.css ' ;
127
+ }
128
+ $ color_uris = theme_get_setting ('color.files ' );
129
+ if ($ color_uris ) {
130
+ // We only have a single color css file.
131
+ $ color_uri = reset ($ color_uris );
132
+ $ url = file_create_url ($ color_uri );
133
+ $ color_css = substr ($ url , strlen ($ base_url ));
134
+ $ options ['tiny_options ' ]['content_css ' ][] = $ color_css ;
135
+ }
136
+ else {
137
+ // No color module setting, add the theme's default file.
138
+ $ options ['tiny_options ' ]['content_css ' ][] = $ path . '/css/colors.css ' ;
139
+ }
140
+ }
You can’t perform that action at this time.
0 commit comments