fixed language issue and added test #2

This commit is contained in:
Awais Jibran
2019-10-28 13:27:36 +05:00
parent a27bd563b4
commit 3ee5969f73
2 changed files with 9 additions and 0 deletions

View File

@@ -40,6 +40,14 @@ describe('HTMLEditingDescriptor', function() {
expect(visualEditorStub.getContent()).toEqual('text /c4x/foo/bar/asset/image.jpg');
});
it('Enables spellcheck', () => expect($('.html-editor iframe')[0].contentDocument.body.spellcheck).toBe(true));
it('Retains ascii characters', function() {
const editorData = '<a href="/static/Programación_Gas.pptx">fóó</a>';
const expectedData = '<p><a href="/static/Programación_Gas.pptx">fóó</a></p>'
this.descriptor.getVisualEditor().setContent(editorData)
const savedContent = this.descriptor.getVisualEditor().getContent()
expect(savedContent).toEqual(expectedData);
});
});
describe('Raw HTML Editor', function() {
beforeEach(function() {

View File

@@ -101,6 +101,7 @@
theme: "modern",
skin: 'studio-tmce4',
schema: "html5",
entity_encoding: "raw",
/*
Necessary to preserve relative URLs to our images.