Example #1
0
        Step.sync(() => {
          const tree = EditorContent.getContent(editor, { format: 'tree' }) as Node;
          Assertions.assertHtml('Should be expected tree html', '<p>tree</p>', toHtml(tree));

          EditorContent.setContent(editor, '<p>new html</p>');
          Assertions.assertHtml('Should be expected html', '<p>new html</p>', EditorContent.getContent(editor));

          EditorContent.setContent(editor, tree);
          Assertions.assertHtml('Should be expected tree html', '<p>tree</p>', EditorContent.getContent(editor));
        })
Example #2
0
 Step.sync(() => {
   editor.setContent(getFontTree());
   Assertions.assertHtml('Should be expected filtered html', '<span style="font-size: 300%;">x</span>', EditorContent.getContent(editor));
 })
Example #3
0
 Step.sync(() => {
   EditorContent.setContent(editor, '<p><font size="7">x</font></p>', { format: 'raw' });
   const tree = EditorContent.getContent(editor, { format: 'tree' }) as Node;
   Assertions.assertHtml('Should be expected tree filtered html', '<p><span style="font-size: 300%;">x</span></p>', toHtml(tree));
 })
Example #4
0
 Step.sync(() => {
   const tree = editor.getContent({ format: 'tree'}) as Node;
   Assertions.assertHtml('Should be expected filtered html', '<p>html</p>', toHtml(tree));
 })
Example #5
0
 Step.sync(() => {
   const html = EditorContent.getContent(editor);
   Assertions.assertHtml('Should be expected html', '<p>html</p>', html);
 })