zhangchao 4 years ago
parent
commit
fd50d73a59
2 changed files with 7 additions and 16 deletions
  1. 1
    1
      src/RichTextEditor.js
  2. 6
    15
      src/editor.html

+ 1
- 1
src/RichTextEditor.js View File

146
           this.setTitleHTML(this.props.initialTitleHTML || '');
146
           this.setTitleHTML(this.props.initialTitleHTML || '');
147
           this.setContentHTML(this.props.initialContentHTML || '');
147
           this.setContentHTML(this.props.initialContentHTML || '');
148
 
148
 
149
-          this.props.hiddenTitle && this.hideTitle();
149
+          !this.props.hiddenTitle && this.showTitle();
150
           this.props.enableOnChange && this.enableOnChange();
150
           this.props.enableOnChange && this.enableOnChange();
151
 
151
 
152
           this.props.editorInitializedCallback && this.props.editorInitializedCallback();
152
           this.props.editorInitializedCallback && this.props.editorInitializedCallback();

+ 6
- 15
src/editor.html View File

1670
 				height: 100%;
1670
 				height: 100%;
1671
 			}
1671
 			}
1672
 
1672
 
1673
-			img.zs_active {
1674
-				/*border: 2px dashed #000;*/
1675
-			}
1676
-
1677
 			img {
1673
 			img {
1678
 				max-width: 98%;
1674
 				max-width: 98%;
1679
 				margin-left:auto;
1675
 				margin-left:auto;
1685
 				padding: 20px 0;
1681
 				padding: 20px 0;
1686
 			}
1682
 			}
1687
 
1683
 
1688
-			div.zss_editor_content {
1684
+			#zss_editor_content {
1689
 				font-family: Arial, Helvetica, sans-serif;
1685
 				font-family: Arial, Helvetica, sans-serif;
1690
 				color: #000;
1686
 				color: #000;
1691
 				width: 100%;
1687
 				width: 100%;
1692
 				height: 100%;
1688
 				height: 100%;
1693
 				-webkit-overflow-scrolling: touch;
1689
 				-webkit-overflow-scrolling: touch;
1694
 				overflow:auto;
1690
 				overflow:auto;
1695
-
1696
-			}
1697
-
1698
-			#zss_editor_content {
1699
 				padding-left: 10px;
1691
 				padding-left: 10px;
1700
 				padding-right: 10px;
1692
 				padding-right: 10px;
1701
 			}
1693
 			}
1702
 
1694
 
1703
-			div.zss_editor_title {
1695
+			#zss_editor_title {
1696
+				padding-left: 10px;
1697
+				padding-right: 10px;
1704
 				font-family: 'Helvetica Neue Light', sans-serif;
1698
 				font-family: 'Helvetica Neue Light', sans-serif;
1705
 				font-size: 23px;
1699
 				font-size: 23px;
1706
 				line-height: 31px;
1700
 				line-height: 31px;
1707
 				color: #2d4150;
1701
 				color: #2d4150;
1708
-			}
1709
-
1710
-			#zss_editor_title {
1711
-				padding-left: 10px;
1712
-				padding-right: 10px;
1702
+				display: none;
1713
 			}
1703
 			}
1714
 
1704
 
1715
 			[placeholder]:empty:before {
1705
 			[placeholder]:empty:before {
1732
 				-webkit-user-select: none;
1722
 				-webkit-user-select: none;
1733
 				padding-left: 10px;
1723
 				padding-left: 10px;
1734
 				padding-right: 10px;
1724
 				padding-right: 10px;
1725
+				display: none;
1735
 			}
1726
 			}
1736
 		</style>
1727
 		</style>
1737
 
1728