-
-
Notifications
You must be signed in to change notification settings - Fork 316
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
Paste content with styling issue #248
Comments
Hi <table style="color: rgb(0, 0, 0); font-family: sans-serif; font-size: medium; border-width: initial; border-style: none; border-color: initial;">
<tbody>
<tr style="height: 14pt;">
<td style="width: 198.45pt; border-top: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; height: 14pt;"> However, I noticed that "styles.css" is defined differently. body {
font-family: sans-serif;
}
.sun-editor-editable table td,
.sun-editor-editable table th {
border: none !important;
} non-NPM sandbox > styles.css body {
font-family: sans-serif;
}
.sun-editor-editable table td {
border: none;
}
.sun-editor-editable table td.se-table-selected-cell {
border: none;
} Try the test again. |
Hello, thank you for fast response. Yes, it's my mistake on the styles because I was disabling all borders for rows and cols. Right now styles are the same. But please take a look at the difference between source codes after pasting the tables (screen below). On non-NPM version we have full style I noticed that this behaviour is only on Google Chrome browser, because on Firefox this works fine. Styles on both versions (npm and non-npm) are applied to this element: While debugging this issue on NPM version I saw, that you are calling I will be thankfull for any help, because main target of my application is Google Chrome and this is very important feature. Kind regards, |
Hello, I have small question - do you think about some concrete date to release new version with this bug fixed? Because I need to make a decision what to do - wait for your release or make some temporary workaround for it :) I really appreciate your work, good job! Thanks, |
Hello, I'll update the version if only this issue is fixed. Thank you |
add: util-htmlRemoveWhiteSpace, update: functions-insertHTML
The 2.27.0 version has been updated. |
Hello, I am facing the same issue in the React version of the editor. Is the issue fixed for the same ? @JiHong88 |
@deveshlashkari This issue has been resolved. |
@JiHong88 Our project is also facing the same issue. Node version is: 16.19.1 The error we are getting is: vendor.js:2 Uncaught TypeError: Cannot read properties of null (reading '1')
at Object._cleanStyle (suneditor.js:1:450406)
at Object._cleanTags (suneditor.js:1:451352)
at String.replace (<anonymous>)
at Object.cleanHTML (suneditor.js:1:453242)
at Object.getContents (suneditor.js:1:447129)
at h (suneditor.js:1:463964)
at suneditor.js:1:464594
at i (vendor.js:2:150133)
_cleanStyle @ suneditor.js:1
_cleanTags @ suneditor.js:1
cleanHTML @ suneditor.js:1
getContents @ suneditor.js:1
h @ suneditor.js:1
(anonymous) @ suneditor.js:1
i @ vendor.js:2
setTimeout (async)
(anonymous) @ vendor.js:2
push @ suneditor.js:1
onInput_wysiwyg @ suneditor.js:1
i @ vendor.js:2
vendor.js:2 Uncaught TypeError: Cannot read properties of null (reading '1')
at Object._convertFontSize (suneditor.js:1:449226)
at Object.active (suneditor.js:1:76439)
at _applyTagEffects (suneditor.js:1:472796)
at i (vendor.js:2:150133) Our application has a form which has some text data in it. This is really critical for our application. |
@Arushi2012 I think it might be for the same reason as this issue. #1207 |
Ah yes! |
@Arushi2012 I will update the version once this issue is resolved. |
Awesom @JiHong88 ! |
@JiHong88 There seems to be one more problem, I'm not sure if this has been reported earlier so mentioning it here. When we make a change in the editor, the following problem is reported in the console: Uncaught TypeError: this._resourcesStateChange is not a function
at Object.<anonymous> (suneditor.js:1:470327)
at i (vendor.js:2:150133) |
@Arushi2012 Do you using suneditor-react? |
@Arushi2012 The 2.44.7 version has been updated. |
Yes @JiHong88 , we use Thank you so much for the release! |
Hello,
I want to thank you once again for this editor. Very good job!
After your newest release I used attributesWhitelist to keep style attribute while pasting following elements:
table, tbody, thead, tr, td
. I have following problem: some of styles are just missing. What is really strange, that this happens only when I have version from NPM. When I downloaded release version and added whole dist folder, then suneditor behaves as it should.In my case, the border-type style disappear (I noticed only this, maybe something else). Please check it on following codesandboxes - please select and copy table which is under text editor and try to paste it. For this example I disabled your custom CSS styles for tables.
NPM example: https://i.imgur.com/wb0cuzC.gifv
NPM sandbox: https://codesandbox.io/s/suneditor-paste-npm-9mwt9
non-NPM example: https://i.imgur.com/6en9YRp.gifv
non-NPM: https://codesandbox.io/s/suneditor-paste-no-npm-e7fs4
I will be thankful for any investigation in this case and fixing this bug, because this is one of most important functionality in my application (pasting every style).
Kind regards,
Adrian
The text was updated successfully, but these errors were encountered: