Merge branch 'dev' into cmskit-content-rendering

pull/17681/head
Enis Necipoglu 2 years ago
commit 3d8fda7016
No known key found for this signature in database
GPG Key ID: 1EC55E13241E1680

@ -529,6 +529,7 @@
"Colors": "Colors",
"RemoveColor": "Remove Color",
"MaxColorCountWarning": "You can add up to {0} colors",
"MinColorCountWarning": "You must add at least {0} colors"
"MinColorCountWarning": "You must add at least {0} colors",
"RaffleDeletionConfirmationMessage": "Are you sure you want to delete this raffle?"
}
}

@ -200,6 +200,7 @@
"Leave": "Leave",
"LoginToJoin": "Login to join",
"ToEnd:": "To end:",
"ToStart:": "To start:",
"days": "days",
"hrs": "hrs",
"min": "min",

@ -253,12 +253,13 @@ $(function () {
initEditor();
var editor;
var addWidgetButton;
function initEditor() {
var $editorContainer = $("#ContentEditor");
var inputName = $editorContainer.data('input-id');
var $editorInput = $('#' + inputName);
var initialValue = $editorInput.val();
addWidgetButton = createAddWidgetButton();
editor = new toastui.Editor({
el: $editorContainer[0],
@ -279,7 +280,7 @@ $(function () {
['code', 'codeblock'],
// Using Option: Customize the last button
[{
el: createAddWidgetButton(),
el: addWidgetButton,
command: 'bold',
tooltip: 'Add Widget'
}]
@ -334,20 +335,28 @@ $(function () {
editor.insertText(txt);
});
var $previewArea;
$('.tab-item').on('click', function () {
if ($(this).attr("aria-label") == 'Preview' && editor.isMarkdownMode()) {
if(!$previewArea){
$previewArea = $("#ContentEditor .toastui-editor-md-preview");
$previewArea.replaceWith("<iframe id='previewArea' style='height: 100%; width: 100%; border: 0px; display: inline;'></iframe>");
}
$previewArea.attr("srcdoc", '');
addWidgetButton.disabled = true;
let content = editor.getMarkdown();
localStorage.setItem('content', content);
$.post("/CmsKitCommonWidgets/ContentPreview", { content: content }, function (result) {
editor.setHTML(result);
var highllightedText = $('#ContentEditor').find('.toastui-editor-md-preview-highlight');
highllightedText.removeClass('toastui-editor-md-preview-highlight');
$previewArea = $("#previewArea");
$previewArea.attr("srcdoc", result);
});
}
else if ($(this).attr("aria-label") == 'Write') {
addWidgetButton.disabled = false;
var retrievedObject = localStorage.getItem('content');
editor.setMarkdown(retrievedObject);
}

@ -164,12 +164,15 @@ $(function () {
initEditor();
var editor;
var addWidgetButton;
function initEditor() {
var $editorContainer = $("#ContentEditor");
var inputName = $editorContainer.data('input-id');
var $editorInput = $('#' + inputName);
var initialValue = $editorInput.val();
addWidgetButton = createAddWidgetButton();
editor = new toastui.Editor({
el: $editorContainer[0],
usageStatistics: false,
@ -189,7 +192,7 @@ $(function () {
['code', 'codeblock'],
// Using Option: Customize the last button
[{
el: createAddWidgetButton(),
el: addWidgetButton,
command: 'bold',
tooltip: 'Add Widget'
}]
@ -255,20 +258,28 @@ $(function () {
editor.insertText(txt);
});
var $previewArea;
$('.tab-item').on('click', function () {
if ($(this).attr("aria-label") == 'Preview' && editor.isMarkdownMode()) {
if(!$previewArea){
$previewArea = $("#ContentEditor .toastui-editor-md-preview");
$previewArea.replaceWith("<iframe id='previewArea' style='height: 100%; width: 100%; border: 0px; display: inline;'></iframe>");
}
$previewArea.attr("srcdoc", '');
addWidgetButton.disabled = true;
let content = editor.getMarkdown();
localStorage.setItem('content', content);
$.post("/CmsKitCommonWidgets/ContentPreview", { content: content }, function (result) {
editor.setHTML(result);
var highllightedText = $('#ContentEditor').find('.toastui-editor-md-preview-highlight');
highllightedText.removeClass('toastui-editor-md-preview-highlight');
$previewArea = $("#previewArea");
$previewArea.attr("srcdoc", result);
});
}
else if ($(this).attr("aria-label") == 'Write') {
addWidgetButton.disabled = false;
var retrievedObject = localStorage.getItem('content');
editor.setMarkdown(retrievedObject);
}

@ -8,8 +8,5 @@
Layout = ThemeManager.CurrentTheme.GetEmptyLayout();
}
<abp-card>
<abp-card-body>
@await Component.InvokeAsync(typeof(ContentFragmentViewComponent), Model)
</abp-card-body>
</abp-card>
<div class="mt-3">@await Component.InvokeAsync(typeof(ContentFragmentViewComponent), Model)</div>

@ -20,7 +20,7 @@
"@abp/ng.setting-management": "~7.4.0-rc.3",
"@abp/ng.tenant-management": "~7.4.0-rc.3",
"@abp/ng.theme.shared": "~7.4.0-rc.3",
"@abp/ng.theme.lepton-x": "~2.4.0-rc.2",
"@abp/ng.theme.lepton-x": "~2.4.0-rc.3",
"@angular/animations": "~16.0.0",
"@angular/common": "~16.0.0",
"@angular/compiler": "~16.0.0",

@ -20,7 +20,7 @@
"@abp/ng.setting-management": "~7.4.0-rc.3",
"@abp/ng.tenant-management": "~7.4.0-rc.3",
"@abp/ng.theme.shared": "~7.4.0-rc.3",
"@abp/ng.theme.lepton-x": "~2.4.0-rc.2",
"@abp/ng.theme.lepton-x": "~2.4.0-rc.3",
"@angular/animations": "~16.0.0",
"@angular/common": "~16.0.0",
"@angular/compiler": "~16.0.0",

@ -36,9 +36,8 @@ public class Program
services.AddApplicationAsync<MyProjectNameModule>(options =>
{
options.Services.ReplaceConfiguration(services.GetConfiguration());
options.Services.AddLogging(loggingBuilder => loggingBuilder.AddSerilog());
});
}).AddAppSettingsSecretsJson().UseAutofac().UseConsoleLifetime();
}).AddAppSettingsSecretsJson().UseSerilog().UseAutofac().UseConsoleLifetime();
var host = builder.Build();
await host.Services.GetRequiredService<IAbpApplicationWithExternalServiceProvider>().InitializeAsync(host.Services);

Loading…
Cancel
Save