Просмотр исходного кода

replace table icon of .CodeMirror-cursor

Yuki Takei 7 лет назад
Родитель
Сommit
c1b02dcbd3

+ 0 - 0
public/images/icons/navbar-editor/table.svg → public/images/icons/editor/table.svg


+ 1 - 1
src/client/js/components/PageEditor/CodeMirrorEditor.js

@@ -650,7 +650,7 @@ export default class CodeMirrorEditor extends AbstractEditor {
   }
 
   getNavbarItems() {
-    return <Button bsSize="small" onClick={ this.showHandsonTableHandler }><img src="/images/icons/navbar-editor/table.svg" width="14" /></Button>;
+    return <Button bsSize="small" onClick={ this.showHandsonTableHandler }><img src="/images/icons/editor/table.svg" width="14" /></Button>;
   }
 
   render() {

+ 9 - 2
src/client/styles/scss/_on-edit.scss

@@ -169,8 +169,15 @@ body.on-edit {
       // add icon on cursor
       .autoformat-markdown-table-activated .CodeMirror-cursor {
         &:after {
-          font-family: 'FontAwesome';
-          content: '\f0ce';
+          display: block;
+          content: ' ';
+          background-image: url(/images/icons/editor/table.svg);
+
+          position: relative;
+          width: 14px;
+          height: 14px;
+          top: -16px;
+          left: 5px;
         }
       }