ver lo mismo en la vista previa
This commit is contained in:
parent
bdaf3f1604
commit
c01284bb5e
3 changed files with 8 additions and 8 deletions
|
@ -479,6 +479,8 @@ function stringifyAllowedStyle (element) {
|
||||||
|
|
||||||
document.addEventListener("turbolinks:load", () => {
|
document.addEventListener("turbolinks:load", () => {
|
||||||
for (const editorEl of document.querySelectorAll(".editor")) {
|
for (const editorEl of document.querySelectorAll(".editor")) {
|
||||||
|
if (!editorEl.querySelector('.editor-toolbar')) continue
|
||||||
|
|
||||||
setupEditor(editorEl)
|
setupEditor(editorEl)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -50,14 +50,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-content {
|
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
div[data-align="left"] { text-align: left; }
|
div[data-align="left"] { text-align: left; }
|
||||||
div[data-align="center"] { text-align: center; }
|
div[data-align="center"] { text-align: center; }
|
||||||
div[data-align="right"] { text-align: right; }
|
div[data-align="right"] { text-align: right; }
|
||||||
|
|
||||||
min-height: 480px;
|
min-height: 480px;
|
||||||
}
|
|
||||||
|
|
||||||
*[data-editor-loading] {
|
*[data-editor-loading] {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
|
|
|
@ -33,5 +33,5 @@
|
||||||
- @post.attributes.each do |attr|
|
- @post.attributes.each do |attr|
|
||||||
- next if @post.send(attr).front_matter?
|
- next if @post.send(attr).front_matter?
|
||||||
|
|
||||||
%section{ id: attr, dir: dir }
|
%section.editor{ id: attr, dir: dir }
|
||||||
= @post.send(attr).to_s.html_safe
|
= @post.send(attr).to_s.html_safe
|
||||||
|
|
Loading…
Reference in a new issue