This repository was archived by the owner on Jun 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +6
-0
lines changed
Expand file tree Collapse file tree 4 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ export default class BoldEngine extends Plugin {
3333
3434 // Allow bold attribute on all inline nodes.
3535 editor . document . schema . allow ( { name : '$inline' , attributes : [ BOLD ] , inside : '$block' } ) ;
36+ // Temporary workaround. See https://github.com/ckeditor/ckeditor5/issues/477.
37+ editor . document . schema . allow ( { name : '$inline' , attributes : [ BOLD ] , inside : '$clipboardHolder' } ) ;
3638
3739 // Build converter from model to view for data and editing pipelines.
3840 buildModelConverter ( ) . for ( data . modelToView , editing . modelToView )
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ export default class ItalicEngine extends Plugin {
3333
3434 // Allow italic attribute on all inline nodes.
3535 editor . document . schema . allow ( { name : '$inline' , attributes : [ ITALIC ] , inside : '$block' } ) ;
36+ // Temporary workaround. See https://github.com/ckeditor/ckeditor5/issues/477.
37+ editor . document . schema . allow ( { name : '$inline' , attributes : [ ITALIC ] , inside : '$clipboardHolder' } ) ;
3638
3739 // Build converter from model to view for data and editing pipelines.
3840 buildModelConverter ( ) . for ( data . modelToView , editing . modelToView )
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ describe( 'BoldEngine', () => {
3333 it ( 'should set proper schema rules' , ( ) => {
3434 expect ( doc . schema . check ( { name : '$inline' , attributes : [ 'bold' ] , inside : '$root' } ) ) . to . be . false ;
3535 expect ( doc . schema . check ( { name : '$inline' , attributes : [ 'bold' ] , inside : '$block' } ) ) . to . be . true ;
36+ expect ( doc . schema . check ( { name : '$inline' , attributes : [ 'bold' ] , inside : '$clipboardHolder' } ) ) . to . be . true ;
3637 } ) ;
3738
3839 describe ( 'command' , ( ) => {
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ describe( 'ItalicEngine', () => {
3737 it ( 'should set proper schema rules' , ( ) => {
3838 expect ( doc . schema . check ( { name : '$inline' , attributes : [ 'italic' ] , inside : '$root' } ) ) . to . be . false ;
3939 expect ( doc . schema . check ( { name : '$inline' , attributes : [ 'italic' ] , inside : '$block' } ) ) . to . be . true ;
40+ expect ( doc . schema . check ( { name : '$inline' , attributes : [ 'italic' ] , inside : '$clipboardHolder' } ) ) . to . be . true ;
4041 } ) ;
4142
4243 describe ( 'command' , ( ) => {
You can’t perform that action at this time.
0 commit comments