-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
554 additions
and
4,995 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.autoComplete { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
z-index: 10000; | ||
border-radius: 15px; | ||
background-color: #5500ff; | ||
width: 200px; | ||
min-height: 100px; | ||
} | ||
|
||
.code{ | ||
border: 1px solid lightgray; | ||
border-radius: 20px; | ||
overflow: hidden; | ||
} | ||
|
||
.ͼ1.cm-focused { | ||
outline: 0 !important; | ||
} | ||
|
||
.ͼ1 .cm-lineNumbers .cm-gutterElement{ | ||
display: flex; | ||
justify-content: center; | ||
align-content: center; | ||
padding: 0 15px 0 5px; | ||
color: #ff5c00; | ||
} | ||
|
||
.ͼ2 .cm-activeLineGutter, | ||
.ͼ2 .cm-gutters{ | ||
background: #ffeded; | ||
} | ||
|
||
.cm-activeLine{ | ||
background-color: #fff0e6 !important; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<!DOCTYPE html> | ||
<html lang="fa"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>ادیتور زبان فارسی</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
direction: rtl; | ||
} | ||
#editor-container { | ||
width: 100%; | ||
height: 90vh; | ||
border: 1px solid #ccc; | ||
} | ||
</style> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.43.0/min/vs/loader.min.js"></script> | ||
</head> | ||
<body> | ||
<h2 style="text-align: center;">ادیتور پیشرفته زبان فارسی</h2> | ||
<div id="editor-container"></div> | ||
|
||
<script> | ||
// بارگذاری Monaco Editor | ||
require.config({ paths: { 'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.43.0/min/vs' } }); | ||
require(['vs/editor/editor.main'], function () { | ||
// تعریف زبان فارسی | ||
monaco.languages.register({ id: 'persianLang' }); | ||
|
||
// تعریف هایلایت سینتکس | ||
monaco.languages.setMonarchTokensProvider('persianLang', { | ||
tokenizer: { | ||
root: [ | ||
[/صفحه|جعبه|رنگ|تمام/, "keyword"], | ||
[/«.*?»/, "string"], | ||
[/\d+/, "number"] | ||
] | ||
} | ||
}); | ||
|
||
// تعریف پیشنهادات اوتوکامپلیت | ||
monaco.languages.registerCompletionItemProvider('persianLang', { | ||
provideCompletionItems: () => { | ||
const suggestions = [ | ||
{ label: 'صفحه', kind: monaco.languages.CompletionItemKind.Keyword, insertText: 'صفحه:' }, | ||
{ label: 'جعبه', kind: monaco.languages.CompletionItemKind.Keyword, insertText: 'جعبه:' }, | ||
{ label: 'رنگ', kind: monaco.languages.CompletionItemKind.Keyword, insertText: 'رنگ=«»', insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet }, | ||
{ label: 'تمام', kind: monaco.languages.CompletionItemKind.Keyword, insertText: 'تمام' } | ||
]; | ||
return { suggestions: suggestions }; | ||
} | ||
}); | ||
|
||
// ساخت ادیتور | ||
monaco.editor.create(document.getElementById('editor-container'), { | ||
value: "صفحه:\n جعبه:\n رنگ=«آبی»\n تمام\nتمام", | ||
language: 'persianLang', | ||
theme: 'vs-dark', | ||
rtl: true, | ||
automaticLayout: true | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.