Skip to content

Commit f79aaf7

Browse files
committed
Youtube video button added, insert link fixed
1 parent eadd353 commit f79aaf7

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

Blogifier.sln

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ VisualStudioVersion = 15.0.27428.2011
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4E0164ED-2249-4973-B3FD-180172EBCD0A}"
77
ProjectSection(SolutionItems) = preProject
8+
azure-pipelines.yml = azure-pipelines.yml
89
README.md = README.md
910
EndProjectSection
1011
EndProject
@@ -25,6 +26,7 @@ EndProject
2526
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{6015AFDB-988C-4A2A-8B86-EB0895E0732E}"
2627
ProjectSection(SolutionItems) = preProject
2728
docs\AppSettings.md = docs\AppSettings.md
29+
docs\Build.md = docs\Build.md
2830
docs\CustomThemes.md = docs\CustomThemes.md
2931
docs\Disqus.md = docs\Disqus.md
3032
docs\Import.md = docs\Import.md

docs/Build.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Run command:
88
Build should clear `/build/publish` directory (if exists), compile and build projects, run tests
99
and publish output to `/build/publish`.
1010

11+
### Testing
1112
Published output is ready to be copied to host server. To verify, open command line (cmd utility),
1213
navigate to `/build/publish` and run:
1314

@@ -16,4 +17,12 @@ dotnet App.dll
1617
```
1718

1819
This should start application at `http://localhost:5000/` so it can be tested locally
19-
before uploading to host server.
20+
before uploading to host server.
21+
22+
### Demo option
23+
Running build with `demo` flag will publish output with demo option turned on
24+
(password updates disabled).
25+
26+
```cmd
27+
.\build.ps1 -ScriptArgs '-demo="true"'
28+
```

src/App/wwwroot/admin/js/app/editorController.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ function getEditor() {
8585
className: "fa fa-folder-open",
8686
title: "File Manager"
8787
},
88+
{
89+
name: "insertYoutube",
90+
action: insertYoutube,
91+
className: "fa fa-youtube",
92+
title: "Insert Youtube Video"
93+
},
8894
"|", "preview", "|", "guide"
8995
],
9096
blockStyles: {
@@ -96,7 +102,7 @@ function getEditor() {
96102
insertTexts: {
97103
horizontalRule: ["", "\n\n-----\n\n"],
98104
image: ["![](http://", ")"],
99-
link: ["[", "](http://)"],
105+
link: ["[", "](#url#)"],
100106
table: ["", "\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"]
101107
},
102108
lineWrapping: true,
@@ -140,6 +146,17 @@ function openFileMgr(editor) {
140146
fileManagerController.open(insertImageCallback);
141147
}
142148

149+
function insertYoutube(editor) {
150+
_editor = editor;
151+
var id = prompt("Please enter video ID", "");
152+
153+
if (id !== null && id !== "") {
154+
var tag = '<iframe width="640" height="480" src="http://www.youtube.com/embed/' + id + '" frameborder="0" allowfullscreen></iframe>';
155+
var cm = _editor.codemirror;
156+
cm.replaceSelection(tag);
157+
}
158+
}
159+
143160
// Create the measurement node for scrollbar
144161
var scrollDiv = document.createElement("div");
145162
scrollDiv.className = "scrollbar-measure";

src/Core/Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp2.1</TargetFramework>
5-
<Version>2.0.1.8</Version>
5+
<Version>2.0.1.9</Version>
66
</PropertyGroup>
77

88
<ItemGroup>

0 commit comments

Comments
 (0)