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:
parent
327a0bd50a
commit
30e40b62d1
4 changed files with 34 additions and 21 deletions
|
@ -361,6 +361,12 @@ App.Config.set(
|
||||||
description: 'Removes the formatting'
|
description: 'Removes the formatting'
|
||||||
globalEvent: 'richtext-remove-formating'
|
globalEvent: 'richtext-remove-formating'
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
key: 'y'
|
||||||
|
hotkeys: true
|
||||||
|
description: '... of whole textarea'
|
||||||
|
globalEvent: 'richtext-remove-formating-textarea'
|
||||||
|
}
|
||||||
{
|
{
|
||||||
key: 'z'
|
key: 'z'
|
||||||
hotkeys: true,
|
hotkeys: true,
|
||||||
|
|
|
@ -111,6 +111,7 @@
|
||||||
// altKey + ctrlKey + i -> Toggles the current selection between italic and non-italic
|
// 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 + v -> Toggles the current selection between strike and non-strike
|
||||||
// altKey + ctrlKey + f -> Removes the formatting tags from the current selection
|
// 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 + z -> Inserts a Horizontal Rule
|
||||||
// altKey + ctrlKey + l -> Toggles the text selection between an unordered list and a normal block
|
// 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
|
// altKey + ctrlKey + k -> Toggles the text selection between an ordered list and a normal block
|
||||||
|
@ -125,7 +126,8 @@
|
||||||
|| e.keyCode == 76
|
|| e.keyCode == 76
|
||||||
|| e.keyCode == 75
|
|| e.keyCode == 75
|
||||||
|| e.keyCode == 86
|
|| e.keyCode == 86
|
||||||
|| e.keyCode == 87)) {
|
|| e.keyCode == 87
|
||||||
|
|| e.keyCode == 89)) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
||||||
// disable rich text b/u/i
|
// disable rich text b/u/i
|
||||||
|
@ -145,6 +147,9 @@
|
||||||
if (e.keyCode == 70) {
|
if (e.keyCode == 70) {
|
||||||
document.execCommand('RemoveFormat')
|
document.execCommand('RemoveFormat')
|
||||||
}
|
}
|
||||||
|
if (e.keyCode == 89) {
|
||||||
|
App.Utils.htmlRemoveRichtext(_this.$element)
|
||||||
|
}
|
||||||
if (e.keyCode == 90) {
|
if (e.keyCode == 90) {
|
||||||
document.execCommand('insertHorizontalRule')
|
document.execCommand('insertHorizontalRule')
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,6 +147,10 @@ blockquote {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.u-notAllowed {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
.zIndex-1,
|
.zIndex-1,
|
||||||
.zIndex-2,
|
.zIndex-2,
|
||||||
.zIndex-3,
|
.zIndex-3,
|
||||||
|
@ -6409,7 +6413,7 @@ label + .wizard-buttonList {
|
||||||
[data-toggle=dropdown] {
|
[data-toggle=dropdown] {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
@ -6426,10 +6430,10 @@ label + .wizard-buttonList {
|
||||||
margin: 0 32px 32px 0;
|
margin: 0 32px 32px 0;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
box-shadow: 0 0 0 4px white;
|
box-shadow: 0 0 0 4px white;
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
@extend .u-clickable;
|
@extend .u-clickable;
|
||||||
|
|
||||||
&.is-active {
|
&.is-active {
|
||||||
box-shadow: 0 0 0 4px hsl(200,71%,59%);
|
box-shadow: 0 0 0 4px hsl(200,71%,59%);
|
||||||
}
|
}
|
||||||
|
@ -6461,7 +6465,7 @@ label + .wizard-buttonList {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
fill: hsl(234,10%,19%);
|
fill: hsl(234,10%,19%);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover svg {
|
&:hover svg {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
@ -6499,13 +6503,13 @@ label + .wizard-buttonList {
|
||||||
}
|
}
|
||||||
|
|
||||||
.fileUpload input {
|
.fileUpload input {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
font-size: 118px;
|
font-size: 118px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7116,11 +7120,11 @@ output {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
padding-top: 11px;
|
padding-top: 11px;
|
||||||
padding-bottom: 9px;
|
padding-bottom: 9px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: hsl(60,1%,34%);
|
color: hsl(60,1%,34%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
@ -7131,7 +7135,7 @@ output {
|
||||||
|
|
||||||
.settings-list-controls {
|
.settings-list-controls {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
& > div {
|
& > div {
|
||||||
display: flex;
|
display: flex;
|
||||||
min-height: 40px;
|
min-height: 40px;
|
||||||
|
@ -7147,7 +7151,7 @@ output {
|
||||||
|
|
||||||
.settings-list-control-cell {
|
.settings-list-control-cell {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
|
||||||
& ~ .settings-list-row-control {
|
& ~ .settings-list-row-control {
|
||||||
padding-bottom: 7px;
|
padding-bottom: 7px;
|
||||||
}
|
}
|
||||||
|
@ -8120,10 +8124,9 @@ output {
|
||||||
}
|
}
|
||||||
|
|
||||||
.richtext-content {
|
.richtext-content {
|
||||||
p,
|
|
||||||
table,
|
table,
|
||||||
pre,
|
pre,
|
||||||
blockquote {
|
blockquote {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8147,7 +8150,7 @@ output {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
word-break: keep-all;
|
word-break: keep-all;
|
||||||
|
|
||||||
td, th {
|
td, th {
|
||||||
padding: 7px 12px;
|
padding: 7px 12px;
|
||||||
border: 1px solid hsl(0,0%,87%);
|
border: 1px solid hsl(0,0%,87%);
|
||||||
|
@ -8175,7 +8178,7 @@ output {
|
||||||
code {
|
code {
|
||||||
border: none;
|
border: none;
|
||||||
background: hsl(0,0%,97%);
|
background: hsl(0,0%,97%);
|
||||||
white-space: normal;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
|
|
|
@ -180,7 +180,6 @@ Check if string is a complete html document. If not, add head and css styles.
|
||||||
p, table, div, td {
|
p, table, div, td {
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
}
|
}
|
||||||
p,
|
|
||||||
table,
|
table,
|
||||||
pre,
|
pre,
|
||||||
blockquote {
|
blockquote {
|
||||||
|
@ -203,7 +202,7 @@ Check if string is a complete html document. If not, add head and css styles.
|
||||||
code {
|
code {
|
||||||
border: none;
|
border: none;
|
||||||
background: hsl(0,0%,97%);
|
background: hsl(0,0%,97%);
|
||||||
white-space: normal;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
blockquote {
|
blockquote {
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
|
|
Loading…
Reference in a new issue