This repository was archived by the owner on Jul 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathprint.js
More file actions
44 lines (44 loc) · 3.52 KB
/
print.js
File metadata and controls
44 lines (44 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var ej2_react_richtexteditor_1 = require("@syncfusion/ej2-react-richtexteditor");
var sample_base_1 = require("../common/sample-base");
require("./print.css");
var Print = (function (_super) {
__extends(Print, _super);
function Print() {
var _this = _super !== null && _super.apply(this, arguments) || this;
// set the value to RichTextEditor
_this.template = "<p>The rich text editor component is WYSIWYG (\"what you see is what you get\") editor that provides the best user experience to create and update the content. \n Users can format their content using standard toolbar commands.</p>\n\n <p><b>Key features:</b></p>\n \n <ul><li><p>Provides <IFRAME> and <DIV> modes</p></li>\n <li><p>Capable of handling markdown editing.</p></li>\n <li><p>Contains a modular library to load the necessary functionality on demand.</p></li>\n <li><p>Provides a fully customizable toolbar.</p></li>\n <li><p>Provides HTML view to edit the source directly for developers.</p></li>\n <li><p>Supports third-party library integration.</p></li>\n <li><p>Allows preview of modified content before saving it.</p></li>\n <li><p>Handles images, hyperlinks, video, hyperlinks, uploads, etc.</p></li>\n <li><p>Contains undo/redo manager.</p></li>\n <li><p>Creates bulleted and numbered lists.</p></li>\n </ul>";
// RichTextEditor items list
_this.items = ['Bold', 'Italic', 'Underline', '|', 'Formats', 'Alignments',
'OrderedList', 'UnorderedList', '|', 'CreateLink', 'Image', '|', 'SourceCode', 'Undo', 'Redo', 'Print'];
//RichTextEditor ToolbarSettings
_this.toolbarSettings = {
items: _this.items
};
return _this;
}
Print.prototype.render = function () {
var _this = this;
return (React.createElement("div", { id: "dropdowndefault", className: 'control-pane' },
React.createElement("div", { className: 'control-section', id: "rtePrint" },
React.createElement("div", { className: "content-wrapper" },
React.createElement(ej2_react_richtexteditor_1.RichTextEditorComponent, { id: "defaultRTE", ref: function (richtexteditor) { _this.rteObj = richtexteditor; }, valueTemplate: this.template, toolbarSettings: this.toolbarSettings },
React.createElement(ej2_react_richtexteditor_1.Inject, { services: [ej2_react_richtexteditor_1.Link, ej2_react_richtexteditor_1.Image, ej2_react_richtexteditor_1.HtmlEditor, ej2_react_richtexteditor_1.Toolbar, ej2_react_richtexteditor_1.QuickToolbar] })))),
React.createElement("div", { id: "action-description" },
React.createElement("p", null, "This sample demonstrates how to print the content of the rich text editor. Click the print command which placed in toolbar of RTE to print the editor\u2019s content."))));
};
return Print;
}(sample_base_1.SampleBase));
exports.Print = Print;