Ok. Tips...

... The standard parsers dynamically create HTML. The render level is 
accessible and save able.
Both Mark S. & Jed Carty have used that to create savers of HTML-ised vers 
of tids in past.

... Its possible to create parsers made of raw regexes that run prior to 
the standard parsers. Its useful for ad-hoc needs. 
BJ did most work on this. See, for instance, 
http://flexibility.tiddlyspot.com/

BJ's Flexitype plugin helps understand parsers too: 
http://bjtools.tiddlyspot.com/#Flexitype%20Demos

HTH
TT

On Tuesday, 12 May 2020 15:03:58 UTC+2, Tony K wrote:
>
> no sir, it is just a test to learn how to do it i am not looking to 
> replace by html code or change format 
>
> thank you 
>
> On Tuesday, May 12, 2020 at 3:15:00 PM UTC+3, TiddlyTweeter wrote:
>>
>> Is the aim to have these tiddlers be, basically, at end, in HTML. I.e you 
>> use WikiText to write but on edit save you want the HTML render to be saved 
>> not the WikiText?
>>
>> Or is it a more complex mix?
>>
>> On Tuesday, 12 May 2020 11:33:44 UTC+2, Tony K wrote:
>>>
>>> yes sir
>>>
>>> On Tuesday, May 12, 2020 at 12:31:26 PM UTC+3, TiddlyTweeter wrote:
>>>>
>>>> You mean "a one way ticket"? Where the content of a tiddler is 
>>>> permanently changed, Once, forever?
>>>>
>>>> Yes?
>>>>
>>>> On Tuesday, 12 May 2020 10:51:59 UTC+2, Tony K wrote:
>>>>>
>>>>>
>>>>> (function(){
>>>>>
>>>>> /*jslint node: true, browser: true */
>>>>> /*global $tw: false */
>>>>> "use strict";
>>>>>
>>>>> exports.name = "myrule";
>>>>> exports.types = {block: true};
>>>>>
>>>>> exports.init = function(parser) {
>>>>>     this.parser = parser;
>>>>>     // Regexp to match
>>>>>     this.matchRegExp = /-{3,}\r?(?:\n|$)/mg;
>>>>> };
>>>>>
>>>>> exports.parse = function() {
>>>>>     // Move past the match
>>>>>     this.parser.pos = this.matchRegExp.lastIndex;
>>>>>     return [{type: "element", tag: "hr"}];
>>>>> };
>>>>>
>>>>> })();
>>>>>
>>>>> this is the code of horiz rule of TW parser
>>>>>
>>>>> I am using it to try to learn.
>>>>>
>>>>> anyway when you enter --- it substitute that with hr but not in the 
>>>>> original tiddler
>>>>>
>>>>> how can i modify the code so that the actual --- is replaced by hr in 
>>>>> the tiddler??
>>>>>
>>>>> thank you 
>>>>>
>>>>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3d7c8423-074c-48cf-9afc-fef78a9a238e%40googlegroups.com.

Reply via email to