Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo-1
Commits
c7158abd
Unverified
Commit
c7158abd
authored
Apr 06, 2020
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎨
支持配置编辑器模式 #95
parent
dcb10a17
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
5 deletions
+19
-5
src/main/java/org/b3log/solo/processor/console/PreferenceConsole.java
...a/org/b3log/solo/processor/console/PreferenceConsole.java
+1
-0
src/main/resources/admin/admin-preference.ftl
src/main/resources/admin/admin-preference.ftl
+5
-0
src/main/resources/js/admin/preference.js
src/main/resources/js/admin/preference.js
+3
-3
src/main/resources/lang_en_US.properties
src/main/resources/lang_en_US.properties
+5
-1
src/main/resources/lang_zh_CN.properties
src/main/resources/lang_zh_CN.properties
+5
-1
No files found.
src/main/java/org/b3log/solo/processor/console/PreferenceConsole.java
View file @
c7158abd
...
...
@@ -249,6 +249,7 @@ public class PreferenceConsole {
* "fixTermTypo": boolean, // Markdown 支持改进 https://github.com/88250/solo/issues/54
* "chinesePunct": boolean, // Markdown 支持改进 https://github.com/88250/solo/issues/54
* "inlineMathAllowDigitAfterOpenMarker": boolean, // Markdown 支持改进 https://github.com/88250/solo/issues/54
* "editorMode": "", // 支持配置编辑器模式 https://github.com/88250/solo/issues/95
* }
* }
* </pre>
...
...
src/main/resources/admin/admin-preference.ftl
View file @
c7158abd
...
...
@@ -249,6 +249,11 @@
<div class="fn__clear"></div>
</div>
<div id="tabPreferencePanel_markdown" class="fn__none form">
${editorModeLabel}
<label><input name="editorMode" type="radio" value="wysiwyg"> ${editorModeWYSIWYGLabel} </label>
<label><input name="editorMode" type="radio" value="ir"> ${editorModeIRLabel} </label>
<label><input name="editorMode" type="radio" value="sv"> ${editorModeSVLabel} </label>
<#if !luteAvailable>
<div class="fn__clear">
${luteHTTPLabel}
...
...
src/main/resources/js/admin/preference.js
View file @
c7158abd
...
...
@@ -20,7 +20,7 @@
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.3.0.
4, Jan 24
, 2020
* @version 1.3.0.
5, Apr 6
, 2020
*/
/* preference 相关操作 */
...
...
@@ -200,8 +200,7 @@ admin.preference = {
'
noticeBoard
'
:
$
(
'
#noticeBoard
'
).
val
(),
'
footerContent
'
:
$
(
'
#footerContent
'
).
val
(),
'
htmlHead
'
:
$
(
'
#htmlHead
'
).
val
(),
'
externalRelevantArticlesDisplayCount
'
:
$
(
'
#externalRelevantArticlesDisplayCount
'
).
val
(),
'
externalRelevantArticlesDisplayCount
'
:
$
(
'
#externalRelevantArticlesDisplayCount
'
).
val
(),
'
relevantArticlesDisplayCount
'
:
$
(
'
#relevantArticlesDisplayCount
'
).
val
(),
'
randomArticlesDisplayCount
'
:
$
(
'
#randomArticlesDisplayCount
'
).
val
(),
'
enableArticleUpdateHint
'
:
$
(
'
#enableArticleUpdateHint
'
).
prop
(
'
checked
'
),
...
...
@@ -223,6 +222,7 @@ admin.preference = {
'
fixTermTypo
'
:
$
(
'
#fixTermTypo
'
).
prop
(
'
checked
'
),
'
chinesePunct
'
:
$
(
'
#chinesePunct
'
).
prop
(
'
checked
'
),
'
inlineMathAllowDigitAfterOpenMarker
'
:
$
(
'
#inlineMathAllowDigitAfterOpenMarker
'
).
prop
(
'
checked
'
),
'
editorMode
'
:
$
(
"
input[name='editorMode']:checked
"
).
val
(),
},
}
...
...
src/main/resources/lang_en_US.properties
View file @
c7158abd
...
...
@@ -18,12 +18,16 @@
#
# Description: Solo language configurations(en_US).
# Version: 2.4
1.0.0, Apr 2
, 2020
# Version: 2.4
2.0.0, Apr 6
, 2020
# Author: Liang Ding
# Author: Liyuan Li
# Author: Dongxu Wang
#
editorModeSVLabel
=
Split View
editorModeIRLabel
=
Instant Rendering
editorModeWYSIWYGLabel
=
WYSIWYG
editorModeLabel
=
Editor Mode
viewLogLabel
=
View Log
categoryURIMustBeASCIILabel
=
Category URI only must be English char, digit or symbol, for example: programming-life
inlineMathAllowDigitAfterOpenMarkerLabel
=
Whether inline math formulas allow a starting $ followed by a number
...
...
src/main/resources/lang_zh_CN.properties
View file @
c7158abd
...
...
@@ -18,12 +18,16 @@
#
# Description: Solo default language configurations(zh_CN).
# Version: 2.4
1.0.0, Apr 2
, 2020
# Version: 2.4
2.0.0, Apr 6
, 2020
# Author: Liang Ding
# Author: Liyuan Li
# Author: Dongxu Wang
#
editorModeSVLabel
=
\u5206\u
5C4F
\u9884\u
89C8
editorModeIRLabel
=
\u5373\u
65F6
\u
6E32
\u
67D3
editorModeWYSIWYGLabel
=
\u6240\u
89C1
\u5373\u6240\u
5F97
editorModeLabel
=
\u
7F16
\u
8F91
\u5668\u
6A21
\u
5F0F
viewLogLabel
=
\u
65E5
\u
5FD7
\u
6D4F
\u
89C8
categoryURIMustBeASCIILabel
=
\u5206\u
7C7B URI
\u
53EA
\u
80FD
\u
4F7F
\u7528\u
82F1
\u6587\u
5B57
\u
6BCD
\u3001\u6570\u
5B57
\u
548C
\u
7B26
\u
53F7
\u
FF0C
\u
4F8B
\u5982\u
FF1Aprogramming-life
inlineMathAllowDigitAfterOpenMarkerLabel
=
\u5185\u8054\u6570\u
5B66
\u
516C
\u
5F0F
\u
662F
\u5426\u5141\u
8BB8
\u
8D77
\u
59CB $
\u
540E
\u
7D27
\u
8DDF
\u6570\u
5B57
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment