mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 22:56:21 +00:00
editor: WIP: <small>
This commit is contained in:
parent
102cd0abd3
commit
117fa84cc4
7 changed files with 9 additions and 3 deletions
|
@ -61,7 +61,7 @@
|
|||
.editor-content {
|
||||
min-height: 480px;
|
||||
p, h1, h2, h3, h4, h5, h6, ul, li, figcaption { outline: #ccc solid thin; }
|
||||
strong, em, del, u, sub, sup { background: #0002; }
|
||||
strong, em, del, u, sub, sup, small { background: #0002; }
|
||||
a { background: #13fefe50; }
|
||||
[data-editor-selected] { outline: #f206f9 solid thick; }
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ export const marks: { [propName: string]: EditorNode } = {
|
|||
super: makeMark('super', 'sup'),
|
||||
mark,
|
||||
link,
|
||||
small: makeMark('small', 'small'),
|
||||
}
|
||||
|
||||
function recursiveFilterSelection (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Editor } from 'editor/editor'
|
||||
|
||||
export const blockNames = ['paragraph', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'unordered_list', 'ordered_list']
|
||||
export const markNames = ['bold', 'italic', 'deleted', 'underline', 'sub', 'super', 'mark', 'link']
|
||||
export const markNames = ['bold', 'italic', 'deleted', 'underline', 'sub', 'super', 'mark', 'link', 'small']
|
||||
export const parentBlockNames = ['left', 'center', 'right']
|
||||
|
||||
export function moveChildren (from: Element, to: Element, toRef: Node | null) {
|
||||
|
|
|
@ -178,7 +178,7 @@ MetadataTemplate = Struct.new(:site, :document, :name, :label, :type,
|
|||
|
||||
def allowed_tags
|
||||
@allowed_tags ||= %w[strong em del u mark p h1 h2 h3 h4 h5 h6 ul ol li img iframe audio video div figure
|
||||
figcaption a].freeze
|
||||
figcaption a small].freeze
|
||||
end
|
||||
|
||||
# Decifra el valor
|
||||
|
|
|
@ -47,6 +47,9 @@
|
|||
%button.btn{ type: 'button', title: t('editor.sub'), data: { editor_button: 'mark-sub' } }>
|
||||
%i.fa.fa-fw.fa-subscript>
|
||||
%span.sr-only>= t('editor.sub')
|
||||
%button.btn{ type: 'button', title: t('editor.small'), data: { editor_button: 'mark-small' } }>
|
||||
%i.fa.fa-fw.fa-subscript>
|
||||
%span.sr-only>= t('editor.small')
|
||||
%button.btn.mr-0{ type: 'button', title: t('editor.h1'), data: { editor_button: 'block-h1' } }>
|
||||
%i.fa.fa-fw.fa-heading>
|
||||
1
|
||||
|
|
|
@ -584,6 +584,7 @@ en:
|
|||
link: Link
|
||||
super: Superscript
|
||||
sub: Subscript
|
||||
small: Small
|
||||
h1: Heading 1
|
||||
h2: Heading 2
|
||||
h3: Heading 3
|
||||
|
|
|
@ -596,6 +596,7 @@ es:
|
|||
mark: Resaltado
|
||||
super: Índice
|
||||
sub: Subíndice
|
||||
small: Chico
|
||||
link: Vínculo
|
||||
h1: Título 1
|
||||
h2: Título 2
|
||||
|
|
Loading…
Reference in a new issue