1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-18 04:22:10 +02:00

Fix issue processwire/processwire-issues#1098 - Correct issue where CKEditor was not keeping formatting when linking bold, italic, or other formatted text

This commit is contained in:
Ryan Cramer
2021-07-30 15:43:45 -04:00
parent e1d190eea7
commit adaf22352c
3 changed files with 4 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ class InputfieldCKEditor extends InputfieldTextarea implements ConfigModule {
public static function getModuleInfo() {
return array(
'title' => 'CKEditor',
'version' => 165,
'version' => 166,
'summary' => __('CKEditor textarea rich text editor.', __FILE__),
'installs' => array('MarkupHTMLPurifier'),
);

View File

@@ -196,7 +196,8 @@
$a.html(selectionText);
}
var html = jQuery("<div />").append($a).html();
editor.insertHtml(html);
var el = CKEDITOR.dom.element.createFromHtml(html);
editor.insertElement(el); // was: editor.insertHtml(html);
}
$iframe.dialog("close");

File diff suppressed because one or more lines are too long