On Saturday, June 8, 2013 2:39:01 AM UTC+2, Yakov wrote:
>
> So, the next thing that would improve experience much is making
>>> typeChooser a toolbar command (this will make installation to many
>>> microreps, including via SharedTiddlersPlugin much simpler).
>>>
>> Would be possible.
>> But to be honest. I don't want to rewrite this stuff. I'd rather put the
>> energy into a V3 compatible version because of:
>> http://codemirror.net/demo/variableheight.html and some other cool
>> features there.
>>
>> Ok, I'll try to handle this. Does it really require much rewriting?
>
At the moment, <<typeChooser>> is a plugin. Toolbar commands are ... well
... commands :) The mechanism, the core handls this stuff is different. I'm
sure much stuff can be reused but to be honest, I don't know how much work
it will be at the end. There is a speech: "The devil is in the detail" :)
> There is a shadow tiddler "StyleSheetCodeMirror" that is there for this
>> reason. adjust this one.
>> You should _not_ mess with tiddlywiki.css for compatibility reasons. It
>> comes from codemirror.net. use StyleSheetCodeMirror.
>>
> Actually, I didn't get how to apply Arial fonts only for
> "text/x-tiddlywiki" content. I can't see any difference between DOM of
> tiddlers with different content-type. What selector should I use instead of
> just
>
> .CodeMirror-lines { font-family: Arial; }
>
> to get this working for certain content-type?
>
OK. Now I understand, what you want. I think, there is no possibility at
the moment. As I wrote, for my editor I have been using a "monospace" font
since I discovered MPTW (Monky Pirate TW) and it probably will allways be a
monospace settings.
I'm not sure if it is possible that every editor has its own theme. I think
this need is new even to the cm library folks.
as you can see, there is a global section, that defines the default.
> Every mime section will overwrite the default setting.
>
Right, this solved the issue. What are MIMEs and what are modes?
The internal library config structure accepts both. ...
A mode is something that is stored in the git repo dir:
https://github.com/marijnh/CodeMirror/tree/master/mode
One mode can be responsible for different MIME types
(http://en.wikipedia.org/wiki/MIME and
http://en.wikipedia.org/wiki/Internet_media_type). File TW doesn't make use
of MIME types at the moment but TiddlyWeb/Space can use it per tiddler.
I've heard of MIMEs, but I mean the values: <<cmModes>> sais "null, ...",
> <<cmMimes>> sais "text/plain, ..."; in CodeMirrorConfig:
>
!!! null
>default mode has an unlucky name
{{{
tags:
*mode: text/plain <- should this be null? is this a mime or a mode?* (and
what about the section's name?)
That's why I wrote the "default mode has an unlucky name" comment. The mode
imo should be "default" or something like this. If you create a new
tiddler, it doesn't have a "custom filed" named: content-type. So it uses
the default settings, with the unlucky name "null"
!!! tiddlywiki
{{{
tags:
*mode: tiddlywiki <- this makes me think that in the "null" section,
there's a mistake..*
nope. The library takes / needs to be able to use both values.
eg the js mode: http://codemirror.net//mode/javascript/index.html
defines: text/javascript, application/json, text/typescript,
application/typescript MIMEs
If you don't tell the "mode library" which MIME it should use for
highlighting, it'll use "text/javascript" which most likely is what the
user wants. _But_ since the mode can also handle "text/typescript" which is
very similar but different, you'll need to initialize the mode in the right
way.
http://codemirror.net/2/doc/manual.html contains the docs for all possible
> parameters.
> See the "/2/" there!!
>
> Is it ok that CodeMirrorConfig contains the
> http://codemirror.net/manual.html link, than?
>
good catch - fixed
BTW
> If you are in edit mode and hit <F11> the edit area will be adjusted to
> the browser viewport height.
> <F11> toggle height. The toggle status will be saved with the tiddler.
>
Hmm.. in both Opera and FireFox on pressing F11 I get browser's "full
> screen toggling" and the height is not changed.
>
If the cursor is inside the edit area <F11> is handled by ExtraKeysAddOn
hope this helps
mario
see:
https://groups.google.com/forum/?fromgroups#!topic/tiddlywikidev/HyxefoCToLg
it may answer some more question about update handling.
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.