1 <?php
2
3 /*
4 * This file is part of the Icybee package.
5 *
6 * (c) Olivier Laviale <olivier.laviale@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Icybee\Modules\Editor;
13
14 /**
15 * "Text" editor.
16 */
17 class TextEditor implements Editor
18 {
19 /**
20 * Returns content as is.
21 *
22 * @see Icybee\Modules\Editor.Editor::serialize()
23 */
24 public function serialize($content)
25 {
26 return $content;
27 }
28
29 /**
30 * Returns serialized content as is.
31 *
32 * @see Icybee\Modules\Editor.Editor::unserialize()
33 */
34 public function unserialize($serialized_content)
35 {
36 return $serialized_content;
37 }
38 /**
39 * @return TextEditorElement
40 *
41 * @see Icybee\Modules\Editor.Editor::from()
42 */
43 public function from(array $attributes)
44 {
45 return new TextEditorElement($attributes);
46 }
47
48 /**
49 * Returns content as is.
50 *
51 * @see Icybee\Modules\Editor.Editor::render()
52 */
53 public function render($content)
54 {
55 return $content;
56 }
57 }