-
Notifications
You must be signed in to change notification settings - Fork 2
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
Issue while showing saved data on a page with sanitize or html_safe method. #19
Comments
@Mati365 When rendering the data its not the same on the page just like it comes in editor. |
@dil-bparihar What's the input and the output HTML produced by the editor? |
Above is the html produced by the editor when using Heading1 @Mati365 |
@dil-bparihar Looks like it's CSS issue in your CSS stylesheets. If you pass element with classes to your editor, you have to enable https://ckeditor.com/docs/ckeditor5/latest/features/html/general-html-support.html plugin |
the above is being provided by the ckeditor to the backend when using heading1 from the toolbar. I have not added it manually. @Mati365 |
@dil-bparihar You need to verify |
I am sorry that was not heading. It was font size. But that i have fixed by adding a wrapper class see the difference. @Mati365 |
@dil-bparihar I don't think it's editor issue itself. imho, you should avoid defining your own |
Thanks @Mati365 I had to |
@dil-bparihar Cool! |
One thing i am not able to see table contextual toolbar for table. I have already added both the plugin and toolbar. ![]() |
@dil-bparihar Dunno, check if |
@dil-bparihar what was the cause? |
@Mati365 Actually when i added this it works:
|
@Mati365 Where to add should_group_when_full: false to show all toolbar at once ? |
Thanks @Mati365 |
@Mati365 our application uses |
@dil-bparihar Implicit fallbacks used to be harder to debug for the user |
So what can we do editor is breaking? @Mati365 ![]() |
@dil-bparihar I see where the issue is. |
It would be very hard to change |
yep, I'll release patch later this day |
@dil-bparihar Please upgrade to |
@Mati365 I am trying to use the latest version of ckeditor5 but it throws error in the console. I am using the correct key. ![]() ![]() |
@dil-bparihar You need to regenerate your license key. There was breaking change in 44.x version of CKEditor itself. Take a look: https://ckeditor.com/docs/ckeditor5/latest/updating/guides/update-to-44.html#new-license-key-format |
Thanks @Mati365 |
@Mati365 Another issue that i am facing currently when i am selecting background color from color picker using font plugin it is adding wrong color to the text. When second time i am again selecting than it is giving the correct color. ![]() ![]() ![]() |
Looks like it may be related to ckeditor/ckeditor5#17109, unfortunately it's not merged. |
@Mati365 Any other solution to fix it for now ? |
@dil-bparihar For issue with color picker? Dunno, add thumb up emoji to issue specified in PR above. |
And also how can we add a file upload progress for simple_upload_adapter. https://ckeditor.com/docs/ckeditor5/latest/features/images/image-upload/simple-upload-adapter.html#upload-progress |
@dil-bparihar It'd be faster to copy & paste content of this plugin: https://github.com/Mati365/ckeditor5-rails/blob/main/lib/ckeditor5/rails/plugins/simple_upload_adapter.rb, and add your custom UI progress |
Can you please elaborate ? @Mati365 |
@dil-bparihar https://github.com/Mati365/ckeditor5-rails/blob/main/lib/ckeditor5/rails/plugins/simple_upload_adapter.rb#L37 , If you want to use simple upload adapter from ckeditor, you can attach observer on this plugin: https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-upload/src/filerepository.ts#L341, using |
@Mati365 Getting this error in console and editor is breaking when using simple_upload_adapter. |
It looks like you downgraded version of the Gem. |
using this: if i will upgrade the gem my custom plugin not working. Using window object. @Mati365 Anyway i have updated my csp rules to make it work. |
Why? Inline plugins in this gem are just wrapper for this piece of code: <<~JS
window.addEventListener('ckeditor:request-cjs-plugin:#{@plugin.name}', () => {
window['#{@plugin.name}'] = #{code.html_safe};
}, { once: true });
JS so if you add that listener somewhere in your window, and then use: plugin :YourPlugin, window_name: :YourWindowName It has to work, without failing. If you use |
can you please elaborate and update the documentation for using the event listner ? @Mati365 |
@Mati365 license key is visible in console.
|
@dil-bparihar Yep, it's. The license-key is domain limited so it's useless on other domains than your one. |
@dil-bparihar I did not have any time to do this. |
@Mati365 Any hint on this error. Getting after gem upgrade to 1.24.9. ![]() |
dunno, can you show configuration? |
@Mati365 My plugin js looks like this:
![]() |
pretty weird, after commenting the |
Confirmed, I'll patch it this day. |
@dil-bparihar Please bump to |
@dil-bparihar I adjusted docs in plugins https://github.com/Mati365/ckeditor5-rails?tab=readme-ov-file#pluginname-premium-import_name-method. Please report new issues, as this one became too large to follow. |
PR is approved by someone. |
@dil-bparihar I have no power there. Regardless of approval from the one reviewer, it cannot be merged, as the solution is not perfect and may be problematic for other integrations. I'm thinking about patching it using an external plugin that intercepts the problematic event. Can you open a separate issue in this report to track this issue? I'll take a look if there is potential workaround. |
@dil-bparihar Consider upgrade to |
🐛 Bug Report
After saving the editor's data into a text column when representing the data on a page its not coming in same format.
🔍 Bug Description
A clear and concise description of what the bug is.
📝 Steps to Reproduce
✅ Expected Behavior
A clear and concise description of what you expected to happen.
❌ Actual Behavior
A clear and concise description of what actually happened.
📸 Screenshots
If applicable, add screenshots to help explain your problem.
📋 Additional Context
The text was updated successfully, but these errors were encountered: