Quantcast

Need to allow users to type in link in CKEditor using double brackets [[link]]

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Need to allow users to type in link in CKEditor using double brackets [[link]]

wprussell
This post was updated on .
Currently, in CKeditor, Double left Brackets [[link]] are escaped to ~[~[link]]

This is a show stopper for my client, as they want the ability to type in a link manually without using the Link button.   Only CKEditor escapes these.  Any way to configure this to not escape


Any help would be appreciated.



Bill Russell
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need to allow users to type in link in CKEditor using double brackets [[link]]

Eduard Moraru
Hi, Bill,

The CKEditor is a WYSIWYG (What You See Is What You Get) editor, meaning
that if you type "[[something]]" when editing the page, you will get
"[[something]]" when viewing the page, not ("something" linking somewhere).

What you want is to use the "Source" button in order to edit in wiki syntax
mode, at which point you can start entering wiki syntax directly in the
editor (e.g. typing links, bold, lists, etc.). When you are done, you can
click "Source" again to go back to WYSIWYG mode.

Hope this helps,
Eduard

On Wed, Apr 5, 2017 at 10:22 PM, wprussell <[hidden email]> wrote:

> Currently, in CKeditor, Double left Brackets [[link]] are escaped to
> ~[~[link]]
>
> This is a show stopper for my client, as they ant the ability to type in a
> link manually without using the Link button.   Only CKEditor escapes these.
> Any way to configure this no not escape
>
>
> Any help would be appreciated.
>
>
>
> Bill Russell
>
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.
> com/Need-to-allow-users-to-type-in-link-in-CKEditor-
> using-double-brackets-link-tp7603393.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need to allow users to type in link in CKEditor using double brackets [[link]]

wprussell
In reply to this post by wprussell
Sorry - that doesn't help. CKEditor is a wysiwyg editor and syntax interpreter. Just like its possible to turn off HTML tagging with:

config.basicEntities : Boolean
Whether to escape basic HTML entities in the document, including:

 
>
<
&

See: http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_altRequired

The question is there a setting to turn off escaping [[



Bill Russell

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need to allow users to type in link in CKEditor using double brackets [[link]]

Eduard Moraru
Maybe you`re mixing things a bit. A WYSIWYG (in this case, CKEditor) exists
so that you don`t have to enter raw syntax (in this case, XWiki syntax,
i.e. link syntax) in the editor. Anything the user enters in the editor
needs to look the same it was entered, but, when it is saved, needs to be
safe and escaped so that the document structure will not break. If you
insist on entering raw syntax, I again direct you to use the "Source"
tab/button and do the needed change, assuming that you take responsibility
for the consequences (i.e. that your change does not break the underlying
document and that CKEditor will still be able to display it nicely in
WYSIWYG mode).

Now, what you might actually want, is a typing shortcut inside CK to be
able to start writing "[[" and then get an autosuggest dropdown with page
titles that you could quickly link to. Once you select a page, CK would
show the title of the selected page and it should be a link to the selected
page (but it should not display war syntax "[[page]]", since that`s what is
going on in the background and does not concern the user). The same idea
was for easily linking to users (i.e. referencing/mentioning) by typing "@"
and then getting an autosuggest to link to a user's profile. These usecases
are shortcuts that require some customization of XWIki`s CK in order to be
supported and have nothing to do with the default CKEditor`s features or
preferences. These usecases would be really nice to have, but
unfortunatelly are not yet supported by XWiki, even if we`ve discussed
about them in the past (I am unable to find the jira issue right now, not
sure there is one).

Note: After talking with Marius about this, he`s reminded me that the above
usecase is much more well suited for the wiki syntax editor (and for power
users), since regular users might have problems when actually trying to
type in "[[" or "@", so this should not be a WYSIWYG (CK) feature. I agree
with his point of view and kept the 2nd paragraph above, just for putting
things into perspective.

Thanks,
Eduard

On Thu, Apr 6, 2017 at 3:04 AM, wprussell <[hidden email]> wrote:

> Sorry - that doesn't help. CKEditor is a wysiwyg editor and syntax
> interpreter. Just like its possible to turn off HTML tagging with:
>
> config.basicEntities : Boolean
> Whether to escape basic HTML entities in the document, including:
>
> &nbsp;
> &gt;
> &lt;
> &amp;
>
> See: http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-
> image2_altRequired
>
> *The question is there a setting to turn off escaping [[*
>
>
>
> Bill Russell
>
>
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.
> com/Need-to-allow-users-to-type-in-link-in-CKEditor-
> using-double-brackets-link-tp7603393p7603397.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need to allow users to type in link in CKEditor using double brackets [[link]]

vmassol
Administrator

> On 6 Apr 2017, at 11:57, Eduard Moraru <[hidden email]> wrote:
>
> Maybe you`re mixing things a bit. A WYSIWYG (in this case, CKEditor) exists
> so that you don`t have to enter raw syntax (in this case, XWiki syntax,
> i.e. link syntax) in the editor. Anything the user enters in the editor
> needs to look the same it was entered, but, when it is saved, needs to be
> safe and escaped so that the document structure will not break. If you
> insist on entering raw syntax, I again direct you to use the "Source"
> tab/button and do the needed change, assuming that you take responsibility
> for the consequences (i.e. that your change does not break the underlying
> document and that CKEditor will still be able to display it nicely in
> WYSIWYG mode).
>
> Now, what you might actually want, is a typing shortcut inside CK to be
> able to start writing "[[" and then get an autosuggest dropdown with page
> titles that you could quickly link to. Once you select a page, CK would
> show the title of the selected page and it should be a link to the selected
> page (but it should not display war syntax "[[page]]", since that`s what is
> going on in the background and does not concern the user). The same idea
> was for easily linking to users (i.e. referencing/mentioning) by typing "@"
> and then getting an autosuggest to link to a user's profile. These usecases
> are shortcuts that require some customization of XWIki`s CK in order to be
> supported and have nothing to do with the default CKEditor`s features or
> preferences. These usecases would be really nice to have, but
> unfortunatelly are not yet supported by XWiki, even if we`ve discussed
> about them in the past (I am unable to find the jira issue right now, not
> sure there is one).
>
> Note: After talking with Marius about this, he`s reminded me that the above
> usecase is much more well suited for the wiki syntax editor (and for power
> users), since regular users might have problems when actually trying to
> type in "[[" or "@", so this should not be a WYSIWYG (CK) feature. I agree
> with his point of view and kept the 2nd paragraph above, just for putting
> things into perspective.

Haven’t followed the topic but it’s something that exists in Confluence and we have a very old issue related to this fromJan 2006:

http://jira.xwiki.org/browse/XWIKI-206

Thanks
-Vincent

>
> Thanks,
> Eduard
>
> On Thu, Apr 6, 2017 at 3:04 AM, wprussell <[hidden email]> wrote:
>
>> Sorry - that doesn't help. CKEditor is a wysiwyg editor and syntax
>> interpreter. Just like its possible to turn off HTML tagging with:
>>
>> config.basicEntities : Boolean
>> Whether to escape basic HTML entities in the document, including:
>>
>> &nbsp;
>> &gt;
>> &lt;
>> &amp;
>>
>> See: http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-
>> image2_altRequired
>>
>> *The question is there a setting to turn off escaping [[*
>>
>>
>>
>> Bill Russell
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://xwiki.475771.n2.nabble.
>> com/Need-to-allow-users-to-type-in-link-in-CKEditor-
>> using-double-brackets-link-tp7603393p7603397.html
>> Sent from the XWiki- Users mailing list archive at Nabble.com.
>>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need to allow users to type in link in CKEditor using double brackets [[link]]

Hamster
Maybe not what you are looking for...but maybe you can use WikiWords for links to other pages?

WikiWords Transformation
Loading...