Fantastic! I'll apply this tweak to my core... And I guess it's time I got 
into real plugin development after all. Thank you, Arc!

четверг, 24 октября 2013 г., 1:59:42 UTC+4 пользователь Arc Acorn написал:
>
> It should be possible to make a plugin that would give you more options.
>
> I don't really know how to make plugins very well myself, so hopefully 
> someone better suited to the task will help you out, but as proof of 
> concept here is a sample core edit that adds more cell style options:
>
> // Cell
> w.nextMatch++;
> var styles = config.formatterHelpers.inlineCssHelper(w);
> var spaceLeft = false;
> var chr = w.source.substr(w.nextMatch,4);
> while(chr == " ") {
> spaceLeft = true;
> w.nextMatch++;
> chr = w.source.substr(w.nextMatch,1);
> }
> var cell;
> if(chr == "!!!!") {
> cell = createTiddlyElement(e,"th");
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> } 
> else if(chr == "#f00") {
> cell = 
> createTiddlyElement(e,"td",null,"CellMarkedRed",null,{style:"background-color:
>  
> #f00;"});
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> }
> else if(chr == "#0f0") {
> cell = 
> createTiddlyElement(e,"td",null,"CellMarkedGreen",null,{style:"background-color:
>  
> #0f0;"});
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> }
> else if(chr == "#00f") {
> cell = 
> createTiddlyElement(e,"td",null,"CellMarkedBlue",null,{style:"background-color:
>  
> #00f;"});
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> }
> else if(chr == "#ff0") {
> cell = 
> createTiddlyElement(e,"td",null,"CellMarkedYellow",null,{style:"background-color:
>  
> #ff0;"});
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> }
> else if(chr == "#f0f") {
> cell = 
> createTiddlyElement(e,"td",null,"CellMarkedPurple",null,{style:"background-color:
>  
> #f0f;"});
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> }
> else if(chr == "#0ff") {
> cell = 
> createTiddlyElement(e,"td",null,"CellMarkedLightBlue",null,{style:"background-color:
>  
> #0ff;"});
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> }
> else if(chr == "###0") {
> cell = createTiddlyElement(e,"td",null,"CellMarked0");
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> }
> else if(chr == "###1") {
> cell = createTiddlyElement(e,"td",null,"CellMarked1");
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> w.nextMatch++;
> }
> else {
> cell = createTiddlyElement(e,"td");
> }
>
>
> Results:
>
> <https://lh3.googleusercontent.com/-zKGsVx3mSEI/UmhF8XMdRFI/AAAAAAAAALw/iZVBiqIMJfI/s1600/2013-10-23_145535.png>
>
>
>
>
>
>
> <https://lh6.googleusercontent.com/-GTtD9zz3aVY/UmhGIHQhUlI/AAAAAAAAAL4/obo9AWa-uBc/s1600/2013-10-23_145458.png>
>
>
>
>
>
>
>
> On Wednesday, October 23, 2013 2:00:03 PM UTC-7, Chad wrote:
>>
>> Yes, that's exactly what I meant... I didn't express it clearly enough, I 
>> guess.
>> Well, even this one highlighting found so far helps a lot. Thank you!
>>
>> четверг, 24 октября 2013 г., 0:35:07 UTC+4 пользователь Stephan Hradek 
>> написал:
>>>
>>> No...
>>>
>>> You mark a cell as header by putting ! at the beginning.
>>>
>>> With the trick you are able to highlight a non-header cell by putting a 
>>> ! at the beginning.
>>>
>>> The only difference is: If the cell is either in the first row of a 
>>> table or the first cell of any row, it's considered a real header. Is it 
>>> somewhere else, it is highlighted.
>>>
>>> But you only have one kind of highlight available.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to