Comments (8)
Hi @linonetwo! good idea! I will add some snippets!
just let me to find some free time! I added this to todo list!
from tw-shiraz.
Maybe should have both
So it can be in both cme / menu and official snippet menu.
from tw-shiraz.
CME can read system snippets, too. If you write both types of them, snippets may appear twice. So should just write system snippets.
from tw-shiraz.
We can use snippets like this, using /
command.
from tw-shiraz.
@Gk0Wk can we let 3rd party snippet have preview (usage demo) field too?
from tw-shiraz.
@linonetwo yes, but the CME plugin missing a lot of documents. That is the problem.
@kookma If you would like to add some snippets, just add a tiddler with the type of application/json
and the tag of $:/CodeMirrorEnhanced/SnippetsList
in your plugin, then the CME plugin will find it. The format of this tiddler can be found here:
- The
id
is the unique identifier of the snippet, entering/<id>
will display the corresponding snippet; name
is the name and title of the snippet, not necessarily unique;preview
is the preview effect of the snippet, when the snippet is selected in the hint of the CME plugin, it will be rendered in the preview box on the right.- Note that both
name
andpreview
can support i18n (multi-language), thei18n
property is the multi-language function switch, if needed, I will write the usage in the future document, if not, please set it to false for now. snippet
is the native content of the snippet. In the hint function of the CME plugin, the selected snippet will write thesnippet
content to the editor, where$x
is a placeholder and will be directly replaced by the cursor. The current cursor will only move to$1
, and may move to all$1
in the future.
Another way is to use TW's native snippet system. And the snippet-description
field is equal to preview
attribute. And placeholders $x
can also work.
from tw-shiraz.
@Gk0Wk - Thank you for the instruction! I will add both!
from tw-shiraz.
@Gk0Wk I think tiddler with fields for both system and cme, and tag for both, can work in both side.
from tw-shiraz.
Related Issues (17)
- Expand stylesheets to cover th header cells HOT 2
- Double click on table cell to edit that cell. HOT 7
- Allow DTable store field in tiddler instead of JSON HOT 7
- [IDEA] add the list-pages features to list-search macro HOT 1
- Suggestion: Package the Tutorial for easy import HOT 3
- link overrideClass HOT 5
- tbl-expand doesn't work for tiddlers which have '/' in their titles HOT 3
- DatePicker, Dates and Timezones. HOT 3
- WikiText in dynamic table HOT 1
- ControlPanel/Settings wrong tag. not in controlpanel HOT 3
- [Feature Request] Clickable image card HOT 3
- shiraz demo is down HOT 1
- [dynamic table][contrebution] only show expand arrow if text is not empty HOT 2
- URL in readme plugin HOT 2
- [SOLVED] Transposed tables HOT 7
- What does stateTiddler mean? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tw-shiraz.