Added shortcut "y" to remove formatting of whole text area. Streamline of common css behaviour for p and code in mail clients.

This commit is contained in:
Martin Edenhofer 2016-05-17 13:51:20 +02:00
parent 327a0bd50a
commit 30e40b62d1
4 changed files with 34 additions and 21 deletions

View file

@ -361,6 +361,12 @@ App.Config.set(
description: 'Removes the formatting'
globalEvent: 'richtext-remove-formating'
}
{
key: 'y'
hotkeys: true
description: '... of whole textarea'
globalEvent: 'richtext-remove-formating-textarea'
}
{
key: 'z'
hotkeys: true,

View file

@ -111,6 +111,7 @@
// altKey + ctrlKey + i -> Toggles the current selection between italic and non-italic
// altKey + ctrlKey + v -> Toggles the current selection between strike and non-strike
// altKey + ctrlKey + f -> Removes the formatting tags from the current selection
// altKey + ctrlKey + y -> Removes the formatting from while textarea
// altKey + ctrlKey + z -> Inserts a Horizontal Rule
// altKey + ctrlKey + l -> Toggles the text selection between an unordered list and a normal block
// altKey + ctrlKey + k -> Toggles the text selection between an ordered list and a normal block
@ -125,7 +126,8 @@
|| e.keyCode == 76
|| e.keyCode == 75
|| e.keyCode == 86
|| e.keyCode == 87)) {
|| e.keyCode == 87
|| e.keyCode == 89)) {
e.preventDefault()
// disable rich text b/u/i
@ -145,6 +147,9 @@
if (e.keyCode == 70) {
document.execCommand('RemoveFormat')
}
if (e.keyCode == 89) {
App.Utils.htmlRemoveRichtext(_this.$element)
}
if (e.keyCode == 90) {
document.execCommand('insertHorizontalRule')
}

View file

@ -147,6 +147,10 @@ blockquote {
display: inline-block;
}
.u-notAllowed {
cursor: not-allowed;
}
.zIndex-1,
.zIndex-2,
.zIndex-3,
@ -6409,7 +6413,7 @@ label + .wizard-buttonList {
[data-toggle=dropdown] {
position: relative;
}
.icon {
opacity: 0.8;
}
@ -6426,10 +6430,10 @@ label + .wizard-buttonList {
margin: 0 32px 32px 0;
border-radius: 100%;
box-shadow: 0 0 0 4px white;
.avatar {
@extend .u-clickable;
&.is-active {
box-shadow: 0 0 0 4px hsl(200,71%,59%);
}
@ -6461,7 +6465,7 @@ label + .wizard-buttonList {
opacity: 0.5;
fill: hsl(234,10%,19%);
}
&:hover svg {
opacity: 1;
}
@ -6499,13 +6503,13 @@ label + .wizard-buttonList {
}
.fileUpload input {
position: absolute;
right: 0;
position: absolute;
right: 0;
top: 0;
font-size: 118px;
margin: 0;
padding: 0;
cursor: pointer;
font-size: 118px;
margin: 0;
padding: 0;
cursor: pointer;
opacity: 0;
}
@ -7116,11 +7120,11 @@ output {
line-height: 1;
padding-top: 11px;
padding-bottom: 9px;
&:hover {
color: hsl(60,1%,34%);
}
.icon {
fill: currentColor;
vertical-align: top;
@ -7131,7 +7135,7 @@ output {
.settings-list-controls {
padding: 0;
& > div {
display: flex;
min-height: 40px;
@ -7147,7 +7151,7 @@ output {
.settings-list-control-cell {
padding: 5px;
& ~ .settings-list-row-control {
padding-bottom: 7px;
}
@ -8120,10 +8124,9 @@ output {
}
.richtext-content {
p,
table,
pre,
blockquote {
blockquote {
margin-bottom: 16px;
}
@ -8147,7 +8150,7 @@ output {
width: 100%;
overflow: auto;
word-break: keep-all;
td, th {
padding: 7px 12px;
border: 1px solid hsl(0,0%,87%);
@ -8175,7 +8178,7 @@ output {
code {
border: none;
background: hsl(0,0%,97%);
white-space: normal;
white-space: pre-wrap;
}
pre {

View file

@ -180,7 +180,6 @@ Check if string is a complete html document. If not, add head and css styles.
p, table, div, td {
max-width: 600px;
}
p,
table,
pre,
blockquote {
@ -203,7 +202,7 @@ Check if string is a complete html document. If not, add head and css styles.
code {
border: none;
background: hsl(0,0%,97%);
white-space: normal;
white-space: pre-wrap;
}
blockquote {
padding: 8px 12px;