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
4a7104ec
Unverified
Commit
4a7104ec
authored
Apr 06, 2020
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎨
支持配置编辑器模式 #95
parent
c7158abd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
3 deletions
+13
-3
src/main/java/org/b3log/solo/processor/console/PreferenceConsole.java
...a/org/b3log/solo/processor/console/PreferenceConsole.java
+9
-1
src/main/resources/admin/admin-preference.ftl
src/main/resources/admin/admin-preference.ftl
+1
-1
src/main/resources/js/admin/admin.min.js
src/main/resources/js/admin/admin.min.js
+1
-1
src/main/resources/js/admin/preference.js
src/main/resources/js/admin/preference.js
+2
-0
No files found.
src/main/java/org/b3log/solo/processor/console/PreferenceConsole.java
View file @
4a7104ec
...
@@ -40,7 +40,7 @@ import org.json.JSONObject;
...
@@ -40,7 +40,7 @@ import org.json.JSONObject;
*
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="https://hacpai.com/member/hzchendou">hzchendou</a>
* @author <a href="https://hacpai.com/member/hzchendou">hzchendou</a>
* @version 2.0.0.
0, Feb 9
, 2020
* @version 2.0.0.
1, Apr 6
, 2020
* @since 0.4.0
* @since 0.4.0
*/
*/
@Singleton
@Singleton
...
@@ -164,6 +164,14 @@ public class PreferenceConsole {
...
@@ -164,6 +164,14 @@ public class PreferenceConsole {
* "syncGitHub": boolean,
* "syncGitHub": boolean,
* "pullGitHub": boolean,
* "pullGitHub": boolean,
* "customVars" "", // 支持配置自定义参数 https://github.com/b3log/solo/issues/12535
* "customVars" "", // 支持配置自定义参数 https://github.com/b3log/solo/issues/12535
* "showCodeBlockLn": boolean, // 支持代码块行号显示 https://github.com/88250/solo/issues/4
* "footnotes": boolean, // Markdown 支持改进 https://github.com/88250/solo/issues/54
* "showToC": boolean, // Markdown 支持改进 https://github.com/88250/solo/issues/54
* "autoSpace": boolean, // Markdown 支持改进 https://github.com/88250/solo/issues/54
* "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>
* </pre>
...
...
src/main/resources/admin/admin-preference.ftl
View file @
4a7104ec
...
@@ -250,7 +250,7 @@
...
@@ -250,7 +250,7 @@
</div>
</div>
<div id="tabPreferencePanel_markdown" class="fn__none form">
<div id="tabPreferencePanel_markdown" class="fn__none form">
${editorModeLabel}
${editorModeLabel}
<label><input name="editorMode" type="radio" value="wysiwyg"> ${editorModeWYSIWYGLabel} </label>
<label><input name="editorMode" type="radio" value="wysiwyg"
checked
> ${editorModeWYSIWYGLabel} </label>
<label><input name="editorMode" type="radio" value="ir"> ${editorModeIRLabel} </label>
<label><input name="editorMode" type="radio" value="ir"> ${editorModeIRLabel} </label>
<label><input name="editorMode" type="radio" value="sv"> ${editorModeSVLabel} </label>
<label><input name="editorMode" type="radio" value="sv"> ${editorModeSVLabel} </label>
...
...
src/main/resources/js/admin/admin.min.js
View file @
4a7104ec
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/main/resources/js/admin/preference.js
View file @
4a7104ec
...
@@ -79,6 +79,8 @@ admin.preference = {
...
@@ -79,6 +79,8 @@ admin.preference = {
'
true
'
===
preference
.
chinesePunct
?
$
(
'
#chinesePunct
'
).
attr
(
'
checked
'
,
'
checked
'
)
:
$
(
'
#chinesePunct
'
).
removeAttr
(
'
checked
'
)
'
true
'
===
preference
.
chinesePunct
?
$
(
'
#chinesePunct
'
).
attr
(
'
checked
'
,
'
checked
'
)
:
$
(
'
#chinesePunct
'
).
removeAttr
(
'
checked
'
)
'
true
'
===
preference
.
inlineMathAllowDigitAfterOpenMarker
?
$
(
'
#inlineMathAllowDigitAfterOpenMarker
'
).
attr
(
'
checked
'
,
'
checked
'
)
:
$
(
'
#inlineMathAllowDigitAfterOpenMarker
'
).
removeAttr
(
'
checked
'
)
'
true
'
===
preference
.
inlineMathAllowDigitAfterOpenMarker
?
$
(
'
#inlineMathAllowDigitAfterOpenMarker
'
).
attr
(
'
checked
'
,
'
checked
'
)
:
$
(
'
#inlineMathAllowDigitAfterOpenMarker
'
).
removeAttr
(
'
checked
'
)
$
(
"
input:radio[value='
"
+
preference
.
editorMode
+
"
']
"
).
attr
(
'
checked
'
,
'
true
'
);
admin
.
preference
.
locale
=
preference
.
localeString
admin
.
preference
.
locale
=
preference
.
localeString
// sign
// sign
...
...
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