How to use widget code in BJ's visualeditor?

156 visualizações
Ir para a primeira mensagem não lida

armlet

não lida,
15/01/2018, 15:05:5515/01/18
para tiddl...@googlegroups.com
I've been using BJ's ckeditor adapter plugin, but have problem using normal TiddlyWiki inside a ckeditor Tiddler anymore. For example,


<$link to="HelloThere" tooltip="Custom tooltip">link1</$link>


<$set name="tv-wikilink-tooltip" value="I'm a link to Loads">
<$link to="HelloThere">Link 2</$link>
</$set>



This doesn't rendered as links, but displays the code.


Is there a way to let ckeditor Tiddler still be able to use widget, or other TiddlyWiki codes?

TonyM

não lida,
15/01/2018, 19:01:2315/01/18
para TiddlyWiki
Armlet,

I am not using that plugin but has you toddler being set to another type such as text/plain ?

Tony

Birthe C

não lida,
15/01/2018, 20:25:4015/01/18
para TiddlyWiki

When you create a new tiddler, you select from the dropdown type menu text/x-htmlp.


http://bjtools.tiddlyspot.com/ we are told:


"Also be aware that the editor strips newline characters, this means it cannot  be used with some wiki text (it is probably a bad idea to try and mix wiki text with text produced in the visualeditor)."



Birthe

BJ

não lida,
16/01/2018, 11:38:2816/01/18
para TiddlyWiki
unfortunately ckeditor does not preserve whitespace (new lines tabs etc), this is not a problem with html as they are ingnored in html. With tiddlytext these do have meaning so, in general it is a bad idea to try and insert wikitext in text produced in the ckeditor. However transclusions are possible  as a links.

armlet

não lida,
16/01/2018, 12:17:4016/01/18
para tiddl...@googlegroups.com
I have a workaround after reading your reply from another post.

What I do is,
I create a "text/vnd.tiddlywiki" tiddler and put any wikitext code, widgets, macros I like. then put this code at where I want the WYSIWYG area to be:

<$edit-html tiddler="My HelloWorld Tiddler #ckeditor" field="text"/>

The Tiddler titled as "My HelloWorld Tiddler #ckeditor" is a ckeditor usage (text/x-htmlp) type.
Also I can put multiple edit sections in one Tiddler, and this is exactly what I wanted.
I am having another question though: while I am doing this way, is it possible to make the ckeditor area as an inline editor instead of a classic one which has the toolbar displayed all the time? How can I do that?

Thanks BJ. I love this plugin!

BJ

não lida,
16/01/2018, 12:37:5116/01/18
para TiddlyWiki
you can add the style
     <style>
          .cke_top { display: none !important }
     </style>

On Tuesday, January 16, 2018 at 6:17:40 PM UTC+1, armlet wrote:
I have a workaround after reading your post from another post.

What I do is,
I create a "text/vnd.tiddlywiki" tiddler and put any wikitext code, widgets, macros I like. then put this code where teh WYSIWYG area: Also I can put multiple edit sections in one Tiddler.
And this is exactly what I wanted.

<$edit-html tiddler="My HelloWorld Tiddler #ckeditor" field="text"/>

armlet

não lida,
16/01/2018, 13:07:4416/01/18
para tiddl...@googlegroups.com
Where do I add the style?

<$edit-html tiddler="My HelloWorld Tiddler #ckeditor" field="text"/>

     
<style>
         
.cke_top { display: none !important }
     
</style>

When I put it like this, the top toolbar turns invisible. but there is no inline toolbar either.
A mensagem foi eliminada

BJ

não lida,
16/01/2018, 15:25:5916/01/18
para TiddlyWiki
I don't know then...

armlet

não lida,
18/01/2018, 17:59:1618/01/18
para TiddlyWiki
Would it be possible to change some codes in $:/bj/modules/widgets/edit.js to make all text/x-htmlp type of Tiddlers inline editor?
Where would that be?

BJ

não lida,
18/01/2018, 19:13:3318/01/18
para TiddlyWiki
what do you mean by an inline editor?

If you mean editing the html in place then it is not possible with text/x-htmlp because of the support of transclusions, and to a lessor extent, other wikitext, such as wikilinks.

armlet

não lida,
19/01/2018, 09:11:4619/01/18
para tiddl...@googlegroups.com

By inline editor, I mean the toolbar appears only when you click inside the edit area. Currently, as soon as you edit a text/x-htmlp Tiddler, the toolbar is always showing.

Since now I am using a text/vnd.tiddlywiki Tiddler to contain text/x-htmlp Tiddlers by this:
<$edit-html tiddler="HelloWorld #ckeditor" field="text"/>
The toolbar is showing all the time even not in edit mode. and I don't need to use edit mode, because in edit mode it will only show the code not the content of the Tiddler "HelloWorld #cdeditor".
In this case, I want it to be an Inline Editor, so that the toolbar shows only when I click inside the edit area.
Responder a todos
Responder ao autor
Reencaminhar
0 mensagens novas