diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js
index 3af8ce85c..bc439ffc2 100644
--- a/apps/common/main/lib/controller/Plugins.js
+++ b/apps/common/main/lib/controller/Plugins.js
@@ -205,7 +205,7 @@ define([
plugin.set_Name(item.get('name'));
plugin.set_Guid(item.get('guid'));
plugin.set_BaseUrl(item.get('baseUrl'));
- plugin.set_MinVersion(item.get('minVersion'));
+ plugin.set_MinVersion && plugin.set_MinVersion(item.get('minVersion'));
var variations = item.get('variations'),
variationsArr = [];
@@ -513,7 +513,7 @@ define([
var pluginStore = this.getApplication().getCollection('Common.Collections.Plugins'),
isEdit = me.appOptions.isEdit,
editor = me.editor,
- apiVersion = me.api.GetVersion();
+ apiVersion = me.api.GetVersion ? me.api.GetVersion() : null;
if ( pluginsdata instanceof Array ) {
var arr = [], arrUI = [],
lang = me.appOptions.lang.split(/[\-_]/)[0];
diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js
index c64ec0b3b..f55c19cdd 100644
--- a/apps/documenteditor/main/app/controller/Toolbar.js
+++ b/apps/documenteditor/main/app/controller/Toolbar.js
@@ -60,7 +60,8 @@ define([
'documenteditor/main/app/view/WatermarkSettingsDialog',
'documenteditor/main/app/view/ListSettingsDialog',
'documenteditor/main/app/view/DateTimeDialog',
- 'documenteditor/main/app/view/LineNumbersDialog'
+ 'documenteditor/main/app/view/LineNumbersDialog',
+ 'documenteditor/main/app/view/TextToTableDialog'
], function () {
'use strict';
@@ -1511,9 +1512,8 @@ define([
},
onInsertTableClick: function(menu, item, e) {
+ var me = this;
if (item.value === 'custom') {
- var me = this;
-
(new Common.Views.InsertTableDialog({
handler: function(result, value) {
if (result == 'ok') {
@@ -1534,6 +1534,16 @@ define([
} else if (item.value == 'erase') {
item.isChecked() && menu.items[2].setChecked(false, true);
this.api.SetTableEraseMode(item.isChecked());
+ } else if (item.value == 'convert') {
+ (new DE.Views.TextToTableDialog({
+ props: this.api.asc_PreConvertTextToTable(),
+ handler: function(result, value) {
+ if (result == 'ok' && me.api) {
+ me.api.asc_ConvertTextToTable(value);
+ }
+ Common.NotificationCenter.trigger('edit:complete', me.toolbar);
+ }
+ })).show();
}
},
diff --git a/apps/documenteditor/main/app/view/TextToTableDialog.js b/apps/documenteditor/main/app/view/TextToTableDialog.js
new file mode 100644
index 000000000..7d5cdebbb
--- /dev/null
+++ b/apps/documenteditor/main/app/view/TextToTableDialog.js
@@ -0,0 +1,406 @@
+/*
+ *
+ * (c) Copyright Ascensio System SIA 2010-2021
+ *
+ * This program is a free software product. You can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License (AGPL)
+ * version 3 as published by the Free Software Foundation. In accordance with
+ * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement
+ * of any third-party rights.
+ *
+ * This program is distributed WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
+ * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+ *
+ * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * The interactive user interfaces in modified source and object code versions
+ * of the Program must display Appropriate Legal Notices, as required under
+ * Section 5 of the GNU AGPL version 3.
+ *
+ * Pursuant to Section 7(b) of the License you must retain the original Product
+ * logo when distributing the program. Pursuant to Section 7(e) we decline to
+ * grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as
+ * well as technical writing content are licensed under the terms of the
+ * Creative Commons Attribution-ShareAlike 4.0 International. See the License
+ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+ *
+ */
+/**
+ * TextToTableDialog.js
+ *
+ * Created by Julia Radzhabova on 15/04/21
+ * Copyright (c) 2021 Ascensio System SIA. All rights reserved.
+ *
+ */
+
+define([
+ 'common/main/lib/view/AdvancedSettingsWindow',
+ 'common/main/lib/component/CheckBox',
+ 'common/main/lib/component/MetricSpinner'
+], function () { 'use strict';
+
+ DE.Views.TextToTableDialog = Common.Views.AdvancedSettingsWindow.extend(_.extend({
+ options: {
+ contentWidth: 300,
+ height: 405,
+ buttons: ['ok', 'cancel']
+ },
+
+ initialize : function(options) {
+ var me = this;
+
+ _.extend(this.options, {
+ title: this.textTitle,
+ template: [
+ '