git ssb

2+

mixmix / ticktack



Commit 35b74ae2d81cf0619ba5864d5875785f83255ef3

custom h2/h3 buttons

mix irving committed on 4/10/2018, 10:06:11 PM
Parent: fc257fd3b75785431205902b7f48764d220ef8ca

Files changed

app/page/blogNew.jschanged
app/page/blogNew.mcsschanged
styles/global.mcsschanged
app/page/blogNew.jsView
@@ -172,15 +172,36 @@
172172 })
173173 }
174174
175175 function initialiseMedium ({ page, el, meta }) {
176 + // el.addEventListener('keyup', ev => {
177 + // debugger
178 + // })
176179 var editor = new MediumEditor(el, {
177180 elementsContainer: page,
181 + // autoLink: true,
182 + buttonLabels: 'fontawesome',
183 + imageDragging: true,
178184 toolbar: {
179185 allowMultiParagraphSelection: true,
180- buttons: ['bold', 'italic', 'underline', 'anchor', 'h2', 'h3', 'quote'],
186 + buttons: [
187 + 'bold',
188 + 'italic',
189 + 'anchor',
190 + {
191 + name: 'h2',
192 + contentFA: '<i class="fa fa-header" />',
193 + classList: ['custom-button-h2']
194 + },
195 + {
196 + name: 'h3',
197 + contentFA: '<i class="fa fa-header" />',
198 + classList: ['custom-button-h3']
199 + },
200 + 'quote'
201 + ],
181202 diffLeft: 0,
182- diffTop: -10,
203 + diffTop: 10,
183204 firstButtonClass: 'medium-editor-button-first',
184205 lastButtonClass: 'medium-editor-button-last',
185206 relativeContainer: null,
186207 standardizeSelectionStart: false,
app/page/blogNew.mcssView
@@ -8,9 +8,8 @@
88 flex-basis: 100%
99 $maxWidth
1010 margin: 0 auto
1111
12-
1312 div.field {
1413 margin-bottom: .5rem
1514 $maxWidth
1615
@@ -44,9 +43,8 @@
4443 border: none
4544 border-radius: 0
4645
4746 -empty {
48- font-weight: normal
4947 font-style: italic
5048 }
5149 }
5250 }
@@ -93,8 +91,14 @@
9391 background-color: #fff
9492 padding: 1rem
9593 min-height: 30rem
9694 outline: none
95 +
96 + p, h2, h3 {
97 + :first-child {
98 + margin-top: 0
99 + }
100 + }
97101 }
98102
99103 div.Compose {
100104 textarea {
styles/global.mcssView
@@ -22,4 +22,12 @@
2222 img {
2323 max-width: 100%
2424 }
2525
26 +ul.medium-editor-toolbar-actions {
27 + li {
28 + button.custom-button-h2 {
29 + font-size: 20px
30 + padding-top: 10px
31 + }
32 + }
33 +}

Built with git-ssb-web