document's People
document's Issues
Alphabetize Keys.js
There is a file src/editor/Keys.js
that contains a list of key-value pairs. We generally try to keep things in alphabetical order, since it keeps things consistent and makes things easier to find. Please alphabetize the keys in the json object.
Fix placeholder text
- Placeholder text for draft js is not clickable (must click below placeholder text for editor to work)
- Placeholder text should be slightly faded out
Break up Content Header component
The ContentHeader
react component is a component that displays at the top of the text editor. It includes options for modifying the text, such as bold, italics, header, etc...
You can find this component in src/main-content/ContentHeader.react.js
This component has a lot of redundant react code that is doing the same thing over and over. We want to break this component up into smaller react components.
The goal is to create the following new react components:
ContentIconButtonGroup.react.js
- This will be a set of icon buttons that are grouped together in the content header
ContentIconButton.react.js
- This will be an individual icon button that is displayed in the content header
NOTE: Make sure you are working off of your own git branch. Submit a pull request for that branch once you're done.
Please do the following:
- Create a new folder:
src/content-header
- Move the
ContentHeader.react.js
component into this folder. Make sure all the modules that are trying to import this component are referencing the correct location. Also make sure thatContentHeader.react.js
's imports are changed to reflect its new path - Create a new
styles.css
file insrc/content-header
. Move all the styles insrc/main-content/styles.css
that start with the prefixcontentHeader
into the newstyles.css
file. Make sure to change theContentHeader.react.js
file so it is using the newstyles.css
file. - Create a
ContentIconButton.react.js
component. Replace all the code in theContentHeader.react.js
file that is rendering icons (look forstyles.contentHeaderIconContainer
) to render aContentIconButton
component instead. Move the relevant styles and imports into this react component. This new component takes the following props:
iconName
: This is the name of the font-awesome icon to use, such asfa-underline
- Create a
ContentIconButtonGroup
component. Replace all the code in theContentHeader.react.js
file that is rendering icon groups (look forstyles.contentHeaderIconGroup
). Move the relevant styles and imports into this react component. This new component takes the following props:
children
: A list of child icon components to render inside the group.
When you are done modifying the code, the ContentHeader.react.js
component should look something like this:
export default class ContentHeader extends React.Component<Props> {
render() {
return (
<div ...>
<ContentHeaderIconGroup>
<ContentHeaderIcon iconName="fas fa-bold" />
<ContentHeaderIcon iconName="fas fa-underline" />
<ContentHeaderIcon iconName="fas fa-italic" />
</ContentHeaderIconGroup>
...
</div>
);
}
}
Implement main editor features for text component
- Bold with keybindings
- Underline with keybindings
- Italics with keybindings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.