How to use widget code in BJ's visualeditor?

閲覧: 156 回
最初の未読メッセージにスキップ

armlet

未読、
2018/01/15 15:05:552018/01/15
To: 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

未読、
2018/01/15 19:01:232018/01/15
To: TiddlyWiki
Armlet,

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

Tony

Birthe C

未読、
2018/01/15 20:25:402018/01/15
To: 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

未読、
2018/01/16 11:38:282018/01/16
To: 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

未読、
2018/01/16 12:17:402018/01/16
To: 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

未読、
2018/01/16 12:37:512018/01/16
To: 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

未読、
2018/01/16 13:07:442018/01/16
To: 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.
メッセージは削除されました

BJ

未読、
2018/01/16 15:25:592018/01/16
To: TiddlyWiki
I don't know then...

armlet

未読、
2018/01/18 17:59:162018/01/18
To: 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

未読、
2018/01/18 19:13:332018/01/18
To: 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

未読、
2018/01/19 9:11:462018/01/19
To: 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.
全員に返信
投稿者に返信
転送
新着メール 0 件