Lines Matching refs:content
19 public function on_load(string $content): string
21 $content = utf8_encode($content);
22 $content = $this->add_outer_html($content);
23 $content = $this->remove_garbage($content);
24 $has_root_block = $this->has_root_block($content);
27 $content = $this->add_root_block($content);
29 $content = $this->remove_outer_html($content);
30 $content = mb_convert_encoding($content, 'html-entities', 'UTF-8');
31 $content = utf8_decode($content);
32 return $content;
35 private function has_root_block(string $content): bool
37 $return = $content;
38 $doc = $this->get_dom($content);
67 private function add_root_block(string $content): string
69 $return = $content;
70 $doc = $this->get_dom($content);
100 private function add_outer_html(string $content): string
102 …org/TR/html4/loose.dtd"><html><head><title>Tidy</title></head><body>' . $content . '</body></html>…
105 private function remove_root_block(string $content): string
107 return $this->remove_block($content, 'tinymce-generated-root-block');
110 private function remove_garbage(string $content): string
112 return $this->remove_block($content, 'tinymce-garbage-root-block');
155 private function remove_outer_html(string $content): string
157 $return = $content;
158 $doc = $this->get_dom($content);
197 …private function remove_block(string $content, string $class='tinymce-generated-root-block'): stri…
199 $return = $content;
200 $doc = $this->get_dom($content);