Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Classes/Service/HtmlParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ public function buildHtml(array $processedValue): string
$domResult = new DOMDocument('1.0', 'UTF-8');

$this->addToDomRecursive($domResult, $result);
$generatedHtml = $domResult->saveHTML();
/**
* Get the Template tag from the DOMDocument
* This helps to return only this content without the XML annotation on the top
* of the document.
* @see https://www.php.net/manual/en/domdocument.savexml.php section node parameter
*/
$template = $domResult->firstChild;
$generatedHtml = $domResult->saveXML($template);
return str_replace(['<template>', '</template>'], '', $generatedHtml);
}

Expand Down
1 change: 0 additions & 1 deletion Resources/Public/JavaScript/Ckeditor/deeplwrite-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export class Deeplwrite extends Plugin {
const format = content.querySelector('input[name="format"]:checked');
let style = '';
let tone = '';
console.log(format);
if (format !== null) {
if (format.classList.contains('style')) {
style = format.value;
Expand Down