एक्सटेंशन:कोडसंपादक
![]() प्रकाशन की स्थिति: स्थिर |
|
---|---|
![]() |
|
विवरण | Provides a syntax-highlighting code editor for site & user JS, CSS and Lua pages, integrating with advanced edit toolbar |
लेखक |
|
संगतता नीति | मीडियाविकि के साथ प्रकाशित स्नैपशॉट्स। मास्टर में पीछे की तरफ से संगतता नहीं है। |
MediaWiki | 1.32+ |
डेटाबेस बदलता है | नहीं |
लाइसेंस | GPL-2.0-or-later AND BSD-3-Clause |
डाउनलोड करें | |
|
|
CodeEditor एक्सटेंशन को अनुवादित करें अगर यह translatewiki.net पर उपलब्ध है | |
मुद्दे | अधूरे कार्य · बग की रिपोर्ट करें |
The CodeEditor extension extends the WikiEditor advanced editing toolbar with an embedded Ace editor widget, providing some handy features for user/site JavaScript pages, CSS pages, JSON pages, and when extension Scribunto is also installed, for Lua pages, i.e. pages in the Module namespace. The code editor does not show on regular wiki pages, i.e. wiki pages with the "wikitext" content model. (See Extension:CodeMirror for syntax highlighting of wikitext when using the source editor.)
It provides the following features:
- जावास्क्रिप्ट, सीएसएस और लुआ के लिए वाक्य-विन्यास हाइलाइटिंग
- ऑटो-इंडेंट
- टैब कुंजी टैब इंडेंट्स (1.22 से) का उत्पादन करती है, इससे पहले सॉफ्ट इंडेंट।
- टैब/शिफ्ट-टैब के साथ इंडेंट/अनइंडेंट सलेक्शन
- जावास्क्रिप्ट के लिए वाक्यविन्यास वैधता की जाँच
- कोष्ठक, ब्रेसिज़ और चौकोर कोष्ठक के लिए जोड़ी-मिलान
स्थापना
- अगर आप Vagrant का उपयोग कर रहे हैं, तो
vagrant roles enable codeeditor --provision
के साथ स्थापित करें
- हस्तगत स्थापना
- फाइलों को डाउनलोड करें और अपने
extensions/
फोल्डर केCodeEditor
नामक डिरेक्ट्री में डालें। - अपनी LocalSettings.php के नीचे निम्नलिखित कोड जोड़ें:
wfLoadExtension( 'CodeEditor' ); $wgDefaultUserOptions['usebetatoolbar'] = 1; // user option provided by WikiEditor extension
- आवश्यकतानुसार कॉन्फ़िगर करें।
- पूर्ण – अपने विकि पर Special:Version पर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
विन्यास
$wgCodeEditorEnableCore
- To disable the editor on JavaScript and CSS pages in the MediaWiki, User and other core namespaces, set
$wgCodeEditorEnableCore = false;
(default is "true")
$wgScribuntoUseCodeEditor
- To disable this extension for Scribunto, i.e. in the module namespace set
$wgScribuntoUseCodeEditor = false;
(default is "true")
- JavaScript
It is possible to change the configuration of the ACE editor, by hooking into the MediaWiki JS hook (i.e. mw.hook( 'codeEditor.configure' ).add( ... )
).
The argument passed to your hook will be an ACE editor session.
WikiEditor एकीकरण
This page is outdated. |
I've been integrating CodeEditor into the pluggable portions of Extension:WikiEditor as prep for Future editor work, since we'll want to be able to extend it to edit things that aren't plain wikitext, which'll need some changes to the toolbar setup and whatnot. JS/CSS here still return plain text in the end, making it an easier intermediate project. --brion 00:26, 14 June 2011 (UTC)
अच्छा:
- विशेष char सम्मिलन काम करते हैं, जिसमें पाठ को घेरने के लिए उद्धरण जोड़े भी शामिल हैं
- basic formatting insertions work, including link dialogs
- खोज/बदलें संवाद काम करता है
- ace's built-in search/replace UI also triggers from keyboard commands, still need to disable them! (onCommandKey)
बुरा:
- multi-line formatting doesn't apply correctly (but really should that apply here? :)
करने के लिए:
- remove toolbar buttons that don't apply (formatting, syntax help?)
- टूलबार बटन जोड़ें जो अधिक सीधे उपयोगी हैं
- इंडेंट/आउटसेंट
- insertion helpers for common keywords or code bits
- help reference to MW JS API reference, JS & CSS specs/documentation
मुद्दे
This page is outdated. |
- accessibility: tab/shift-tab are overridden. Is there a consistent alternative for keyboard-reliant users?
- accessibility: access key on the original textarea needs to be moved over or otherwise handled
- scrollbar initializes too wide; need to trigger resize check after that's filled (maybe fixed?)
- cursor/scroll position not maintained over previews/show changes
लाइसेंस
While this extension is licensed GNU General Public License v2.0 or later (GPL-2.0+) it makes use of the Ace editor software which is licensed BSD 3-clause "New" or "Revised" License (BSD-3-Clause).
इस एक्सटेंशन का इस्तेमाल एक या अधिक विकिमीडिया परियोजनाओं पर किया जा रहा है। इसका शायद मतलब है कि एक्सटेंशन स्थिर है और इस तरह के अधिक दर्शकों वाले वेबसाइटों द्वारा उपयोग किए जाने के लिए पर्याप्त रूप से काम करता है। विकिमीडिया की CommonSettings.php और InitialiseSettings.php कॉन्फ़िगरेशन फ़ाइलों में इस एक्सटेंशन का नाम खोजें, और यह वहीं स्थापित होगा। किसी विशिष्ट विकि पर स्थापित एक्सटेंशन्स की पूरी सूची को विकि के Special:Version पृष्ठ पर देखा जा सकता है। |