PHP Classes

File: public/js/tinymce/src/plugins/code/src/main/js/core/Content.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/code/src/main/js/core/Content.js   Download  
File: public/js/tinymce/src/plugins/code/src/main/js/core/Content.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: GoLavaCMS
Publish content on Web pages with SEO support
Author: By
Last change:
Date: 6 years ago
Size: 930 bytes
 

Contents

Class file image Download
/** * Content.js * * Released under LGPL License. * Copyright (c) 1999-2017 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ define( 'tinymce.plugins.code.core.Content', [ ], function () { var setContent = function (editor, html) { // We get a lovely "Wrong document" error in IE 11 if we // don't move the focus to the editor before creating an undo // transation since it tries to make a bookmark for the current selection editor.focus(); editor.undoManager.transact(function () { editor.setContent(html); }); editor.selection.setCursorLocation(); editor.nodeChanged(); }; var getContent = function (editor) { return editor.getContent({ source_view: true }); }; return { setContent: setContent, getContent: getContent }; } );