Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tinymce-per-block/build/app.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tinymce-per-block/src/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import 'variables';
@import 'animations';
@import 'theme';
@import '~blocks/html-block/style';
@import '~blocks/image-block/style';
@import '~blocks/heading-block/style';
Expand Down
37 changes: 37 additions & 0 deletions tinymce-per-block/src/assets/stylesheets/theme.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.my-theme {
font-family: "Merriweather", serif;
font-size: 16px;
color: inherit;
font-weight: 300;

blockquote {
width: 100%;
font-weight: 300;
font-size: 20px;
border-left: 4px solid black;
margin-left: -20px;
padding-left: 20px;
font-style: italic;

footer {
font-weight: 300;
font-size: 14px;
color: $gray-dark-300;
}
}

figure {
padding: 0;
margin: 1em 0;

figcaption {
font-weight: 300;
font-size: 14px;
color: $gray-dark-300;
}
}

img {
max-width: 100%;
}
}
1 change: 0 additions & 1 deletion tinymce-per-block/src/blocks/embed-block/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export default class EmbedBlockForm extends Component {
};

const html = getEmbedHtmlFromUrl( block.url );
console.log( html );

return (
<div>
Expand Down
1 change: 0 additions & 1 deletion tinymce-per-block/src/blocks/embed-block/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ registerBlock( 'embed', {
form: form,
icon: VideoAlt3Icon,
parse: ( rawBlock ) => {
console.log( rawBlock );
return {
blockType: 'embed',
url: rawBlock.attrs.url,
Expand Down
2 changes: 1 addition & 1 deletion tinymce-per-block/src/blocks/html-block/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ registerBlock( 'html', {
serialize: ( block ) => {
return {
blockType: 'html',
attrs: { /* align: block.align */ },
attrs: { align: block.align },
rawContent: block.content
};
}
Expand Down
2 changes: 1 addition & 1 deletion tinymce-per-block/src/blocks/image-block/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ registerBlock( 'image', {

return {
blockType: 'image',
attrs: { /* caption: block.caption , align: block.align */ },
attrs: { /* caption: block.caption ,*/ align: block.align },
rawContent
};
}
Expand Down
2 changes: 1 addition & 1 deletion tinymce-per-block/src/blocks/text-block/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ registerBlock( 'text', {

return {
blockType: 'text',
attrs: { /* align: block.align */ },
attrs: { align: block.align },
rawContent
};
}
Expand Down
1 change: 0 additions & 1 deletion tinymce-per-block/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class App extends Component {
} );
return;
case 'html':
console.log( parsers.block.parse( nextContent ) );
this.setState( {
content: {
block: parsers.block.parse( nextContent )
Expand Down
2 changes: 1 addition & 1 deletion tinymce-per-block/src/renderers/raw/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import { createElement } from 'wp-elements';

export default function RawRenderer( { content } ) {
return (
<div dangerouslySetInnerHTML={ { __html: content } } />
<div className="my-theme" dangerouslySetInnerHTML={ { __html: content } } />
);
}