Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

181
Visualizações
How to remove leading and trailing whitespace in ckeditor5

I'm using CKeditor for a text editor and it won't remove extra whitespace.

it will look like this when i publish

here is my code

var ready = (callback) => {
        if (document.readyState != "loading") callback();
        else document.addEventListener("DOMContentLoaded", callback);
    }

    ready(() => {
        ClassicEditor.create(document.querySelector(".wysiwyg"), {
                toolbar: {
                    items: [
                        "heading",
                        "|",
                        "bold",
                        "italic",
                        "link",
                        "bulletedList",
                        "numberedList",
                        "|",
                        "indent",
                        "outdent",
                        "|",
                        "imageUpload",
                        "blockQuote",
                        "mediaEmbed",
                        "undo",
                        "redo",
                    ],
                },
                language: "es",
                image: {
                    toolbar: ["imageTextAlternative", "imageStyle:full", "imageStyle:side"],
                },
                licenseKey: "",
            })
            .then((editor) => {
                window.editor = editor;
                editor.ui.view.editable.element.style.height = '300px';
            })
            .catch((error) => {
                console.error(error);
            });
    });

I don't know of any other way to remove whitespace from here. Any ideas?

Thanks

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda