Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bold is not pasted from Google Docs #2495

Closed
msamsel opened this issue Jul 30, 2019 · 0 comments · Fixed by ckeditor/ckeditor5-basic-styles#96
Closed

Bold is not pasted from Google Docs #2495

msamsel opened this issue Jul 30, 2019 · 0 comments · Fixed by ckeditor/ckeditor5-basic-styles#96
Assignees
Labels
package:paste-from-office type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@msamsel
Copy link
Contributor

msamsel commented Jul 30, 2019

Issue created to give reference to the place where the problem will be fixed: https://github.com/ckeditor/ckeditor5-basic-styles/issues/94

As mentioned fixed in basic-styles might not be so trivial, here you can have a simple workaround. You need to define a new converter which will start to support pasting bold content from google docs (which marks bold as font-weight: 700). Below you can find an example implementation.

ClassicEditor
	.create( document.querySelector( '#editor' ), {
		// config
	} )
	.then( editor => {
		editor.conversion.for( 'upcast' ).elementToAttribute( {
			view: {
				name: 'span',
				styles: {
					'font-weight': '700'
				}
			},
			model: 'bold'
		} );
	} )
jodator referenced this issue in ckeditor/ckeditor5-basic-styles Aug 29, 2019
Feature: Provided support for numeric values for the `font-weight` attribute. Closes #94. Closes ckeditor/ckeditor5-paste-from-office#74.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-paste-from-office Oct 9, 2019
@mlewand mlewand added this to the iteration 27 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:improvement This issue reports a possible enhancement of an existing feature. package:paste-from-office labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:paste-from-office type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants