Answer the question
In order to leave comments, you need to log in
Ckeditor when copying a table, how to leave colspan and rowspan?
Hello.
When copying text or a form, I made sure that the styles are cleared, but how can I make sure that in the table, some styles are left, important ones that are responsible for lines, etc.
We are talking about colspan and rowspan , they are also cleaned.
My config:
//Ckeditor удаляет (чистит) javascript
config.protectedSource.push( /<script[\s\S]*?script>/g ); /* script tags */
// данная функция удаляет ссылки и стили при копирвоании с другого сайта.
config.forcePasteAsPlainText = false;
// настройки работают с модулем pastefromword форматирвоание текста если вставляем с ворда
config.pasteFromWordPromptCleanup = false;
config.pasteFromWordCleanupFile = false;
config.pasteFromWordRemoveFontStyles = true;
config.pasteFromWordNumberedHeadingToList = true;
config.pasteFromWordRemoveStyles = true;
// для контента
config.allowedContent = false;
// какие теги разрешает при вставке
config.extraAllowedContent = 'table tr td th colgroup col b strong i u ul li';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question