mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-14 18:46:19 +02:00
show indentation size value besides the range slider
This commit is contained in:
@ -311,6 +311,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<label class="line">
|
<label class="line">
|
||||||
Indentation Size <input type="range" class="va-m ml-1" value="2" min="1" max="7" list="indentationSizeList" data-setting="indentSize" d-change="updateSetting">
|
Indentation Size <input type="range" class="va-m ml-1" value="2" min="1" max="7" list="indentationSizeList" data-setting="indentSize" d-change="updateSetting">
|
||||||
|
<span id="indentationSizeValueEl"></span>
|
||||||
<datalist id="indentationSizeList">
|
<datalist id="indentationSizeList">
|
||||||
<option>1</option>
|
<option>1</option>
|
||||||
<option>2</option>
|
<option>2</option>
|
||||||
|
@ -4,7 +4,7 @@ onboardModal, layoutBtn1, layoutBtn2, layoutBtn3, layoutBtn4, helpBtn, onboardMo
|
|||||||
addLibraryModal, addLibraryModal, notificationsBtn, notificationsModal, notificationsModal,
|
addLibraryModal, addLibraryModal, notificationsBtn, notificationsModal, notificationsModal,
|
||||||
notificationsModal, notificationsBtn, codepenBtn, saveHtmlBtn, saveBtn, settingsBtn,
|
notificationsModal, notificationsBtn, codepenBtn, saveHtmlBtn, saveBtn, settingsBtn,
|
||||||
onboardModal, settingsModal, notificationsBtn, onboardShowInTabOptionBtn, editorThemeLinkTag,
|
onboardModal, settingsModal, notificationsBtn, onboardShowInTabOptionBtn, editorThemeLinkTag,
|
||||||
onboardDontShowInTabOptionBtn, TextareaAutoComplete, savedItemCountEl */
|
onboardDontShowInTabOptionBtn, TextareaAutoComplete, savedItemCountEl, indentationSizeValueEl */
|
||||||
/* eslint-disable no-extra-semi */
|
/* eslint-disable no-extra-semi */
|
||||||
;(function (alertsService) {
|
;(function (alertsService) {
|
||||||
|
|
||||||
@ -1189,6 +1189,7 @@ onboardDontShowInTabOptionBtn, TextareaAutoComplete, savedItemCountEl */
|
|||||||
$('[data-setting=cssMode]').value = prefs.cssMode;
|
$('[data-setting=cssMode]').value = prefs.cssMode;
|
||||||
$('[data-setting=jsMode]').value = prefs.jsMode;
|
$('[data-setting=jsMode]').value = prefs.jsMode;
|
||||||
$('[data-setting=indentSize]').value = prefs.indentSize;
|
$('[data-setting=indentSize]').value = prefs.indentSize;
|
||||||
|
indentationSizeValueEl.textContent = prefs.indentSize;
|
||||||
$('[data-setting=indentWith][value=' + (prefs.indentWith || 'spaces') + ']').checked = true;
|
$('[data-setting=indentWith][value=' + (prefs.indentWith || 'spaces') + ']').checked = true;
|
||||||
$('[data-setting=isCodeBlastOn]').checked = prefs.isCodeBlastOn;
|
$('[data-setting=isCodeBlastOn]').checked = prefs.isCodeBlastOn;
|
||||||
$('[data-setting=editorTheme]').value = prefs.editorTheme;
|
$('[data-setting=editorTheme]').value = prefs.editorTheme;
|
||||||
@ -1217,6 +1218,10 @@ onboardDontShowInTabOptionBtn, TextareaAutoComplete, savedItemCountEl */
|
|||||||
htmlCode.querySelector('.CodeMirror').style.fontSize = prefs.fontSize;
|
htmlCode.querySelector('.CodeMirror').style.fontSize = prefs.fontSize;
|
||||||
cssCode.querySelector('.CodeMirror').style.fontSize = prefs.fontSize;
|
cssCode.querySelector('.CodeMirror').style.fontSize = prefs.fontSize;
|
||||||
jsCode.querySelector('.CodeMirror').style.fontSize = prefs.fontSize;
|
jsCode.querySelector('.CodeMirror').style.fontSize = prefs.fontSize;
|
||||||
|
|
||||||
|
// Update indentation count when slider is updated
|
||||||
|
indentationSizeValueEl.textContent = $('[data-setting=indentSize]').value;
|
||||||
|
|
||||||
['html', 'js', 'css'].forEach((type) => {
|
['html', 'js', 'css'].forEach((type) => {
|
||||||
scope.cm[type].setOption(
|
scope.cm[type].setOption(
|
||||||
'indentWithTabs',
|
'indentWithTabs',
|
||||||
|
Reference in New Issue
Block a user