forked from relax/relax
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
html input type component fix relax#29
- Loading branch information
1 parent
0e01da3
commit 73e3e20
Showing
5 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.html-area { | ||
.html-editor { | ||
outline: 0px; | ||
border: 0px; | ||
border: 1px solid #cccccc; | ||
color: #333333; | ||
padding: 5px 20px; | ||
.roundedCorners(2px); | ||
|
||
&[data-medium-focused="true"] { | ||
border-color: @adminPrimary; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import {Component} from 'relax-framework'; | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
|
||
import Editor from './medium-editor'; | ||
|
||
export default class HtmlArea extends Component { | ||
render () { | ||
return ( | ||
<div className={classNames('html-area', this.props.className)}> | ||
<Editor | ||
tag='div' | ||
className='html-editor' | ||
value={this.props.value} | ||
onChange={this.props.onChange} | ||
options={{ | ||
toolbar: { | ||
buttons: ['bold', 'italic', 'underline', 'anchor'] | ||
}, | ||
placeholder: false, | ||
buttonLabels: 'fontawesome', | ||
imageDragging: false | ||
}} | ||
/> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
HtmlArea.propTypes = { | ||
value: React.PropTypes.string.isRequired, | ||
onChange: React.PropTypes.func.isRequired, | ||
className: React.PropTypes.string | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters