ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

How to change default value of ckeditor

Open khanhthanhdev opened this issue 2 years ago • 6 comments

📝 Provide detailed reproduction steps (if any)

When i run locally, it works very well But when deploy, it has background color in here,

image

in my css:

.ck.ck-editor__main>.ck-editor__editable {
  background: transparent;
  border: none;
  outline: none;
}

✔️ Expected result

image

What is the expected result of the above steps?

❓ Possible solution

I want to overwrite code but it doesn't work

📃 Other details

  • Browser: Microsoft edge
  • OS: window 11
  • "@ckeditor/ckeditor5-build-classic": "^34.2.0", "@ckeditor/ckeditor5-react": "^5.0.2",

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

khanhthanhdev avatar Jun 22 '23 09:06 khanhthanhdev

image It runs well on local with css property

khanhthanhdev avatar Jun 22 '23 09:06 khanhthanhdev

Please share more about what the deploy means, and how do you bundle your code and styles. Right now it's hard to pinpoint where the issue is.

Witoso avatar Jun 22 '23 11:06 Witoso

.ck.ck-editor__main>.ck-editor__editable {
  background: transparent;
  border: none;
  outline: none;
}


.ck.ck-editor__main>.ck-editor__editable.ck-focused {
  border: none;
}

.ck.ck-toolbar .ck.ck-toolbar__separator {
  background-color: transparent;
}

.ck.ck-toolbar.ck-toolbar_grouping {
  background-color: transparent;
  border: none;
}

.ck.ck-button,
.ck.ck-button.ck-on {
  color: white;
  background-color: transparent;
}

.ck.ck-button:hover,
.ck.ck-button.ck-off:hover,
.ck.ck-button.ck-on:hover {
  background-color: transparent !important;
  cursor: pointer;
  color: gray;
}

.ck-dropdown__panel .ck.ck-button.ck-off.ck-button__with-text {
  background-color: black !important;
}

.ck.ck-list__item {
  background-color: black !important;
}

.ck-dropdown__panel .ck-dropdown__panel-visible {
  border: none;
}

.ck-editor__top {
  position: sticky !important;
  top: 0 !important;
  background: #121212 !important;
}

My css file You can visit : flowboard. vercel. app

khanhthanhdev avatar Jun 22 '23 14:06 khanhthanhdev

I have fix by using: !important

khanhthanhdev avatar Jun 22 '23 14:06 khanhthanhdev

I still don't know what setup do you have, in which framework, etc. I can't help unfortunately without an understanding of how you build your code. Most likely your stylesheets are loaded before the stylesheets of the editor.

Witoso avatar Jun 23 '23 07:06 Witoso

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Jun 23 '24 03:06 CKEditorBot

We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

CKEditorBot avatar Jul 24 '24 03:07 CKEditorBot