Skip to content

Commit

Permalink
Merge d28eaab into d8cf5cd
Browse files Browse the repository at this point in the history
  • Loading branch information
robgietema committed Jun 28, 2018
2 parents d8cf5cd + d28eaab commit a33f745
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* Refactor actions and reducers to match restapi docs naming @robgietema
* Fix site root api calls @robgietema
* Change visual editor to use the new tiles api @robgietema
* Fix bug with wrong order input @robgietema

## 0.5.0 (2018-03-23)

Expand Down
1 change: 1 addition & 0 deletions src/components/manage/Tiles/Description/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export default class Edit extends Component {
*/
componentWillReceiveProps(nextProps) {
if (
nextProps.properties.description &&
this.props.properties.description !== nextProps.properties.description &&
!this.props.selected
) {
Expand Down
4 changes: 3 additions & 1 deletion src/components/manage/Tiles/Text/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
} from 'draft-js-buttons';
import createBlockStyleButton from 'draft-js-buttons/lib/utils/createBlockStyleButton';
import createLinkPlugin from 'draft-js-anchor-plugin';
import createBlockBreakoutPlugin from 'draft-js-block-breakout-plugin';
import { defineMessages, injectIntl, intlShape } from 'react-intl';

const messages = defineMessages({
Expand All @@ -50,6 +51,7 @@ const CalloutButton = createBlockStyleButton({
children: <span>!</span>,
});
const linkPlugin = createLinkPlugin();
const blockBreakoutPlugin = createBlockBreakoutPlugin();
const inlineToolbarPlugin = createInlineToolbarPlugin({
structure: [
BoldButton,
Expand Down Expand Up @@ -179,7 +181,7 @@ export default class Edit extends Component {
<Editor
onChange={this.onChange}
editorState={this.state.editorState}
plugins={[inlineToolbarPlugin, linkPlugin]}
plugins={[inlineToolbarPlugin, linkPlugin, blockBreakoutPlugin]}
blockRenderMap={extendedBlockRenderMap}
blockStyleFn={contentBlock => {
const type = contentBlock.getType();
Expand Down
1 change: 1 addition & 0 deletions src/components/manage/Tiles/Title/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export default class Edit extends Component {
*/
componentWillReceiveProps(nextProps) {
if (
nextProps.properties.title &&
this.props.properties.title !== nextProps.properties.title &&
!this.props.selected
) {
Expand Down
31 changes: 30 additions & 1 deletion theme/themes/pastanaga/globals/site.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,38 @@ body {
outline-width: 1px;
}

.tile .public-DraftEditorPlaceholder-inner {
.DraftEditor-editorContainer,
.DraftEditor-root,
.public-DraftEditor-content {
height: inherit;
text-align: initial;
}

.public-DraftEditor-content[contenteditable='true'] {
-webkit-user-modify: read-write-plaintext-only;
}

.DraftEditor-root {
position: relative;
}

.DraftEditor-editorContainer {
position: relative;
z-index: 1;
}

.public-DraftEditor-block {
position: relative;
}

.public-DraftEditorPlaceholder-root {
position: absolute;
color: #aaaaaa;
z-index: 1;
}

.DraftEditorPlaceholder-hidden {
display: none;
}

.tile.align.left {
Expand Down

0 comments on commit a33f745

Please sign in to comment.