Hi again,
If a user types a url and it linkifies it, but then the user text-edits the written url, then the link becomes wrong:
User types:
becomes
<a href='http://yahoo.com'>http://yahoo.com</a>
User then edits it to be
<a href='http://yahoo.com'>http://google.com</a>
My users are not technical and I've found that the LINK dialog is too complex for them. My idea is to make typed urls become surrounded by a <span class='url'>
Then I can handle this, so that, for example, we can have a simpler google-style link changer, or make double-click go to the url or something.
For example I have this code which makes double-click open a link:
myckeditor=CKEDITOR.inline( editorinst,
{
on:
{
doubleclick: function(ev)
{
if(this.elementPath().contains( 'a' ))
{
sel = this.getSelection();
sel.selectElement(sel.getStartElement());
selagain = this.getSelection();
var selection = selagain.getNative();
if(isURL(selection))
{
window.open(selection, '_blank');
}
}
}
}
Anyway, would be nice to have options: linktag and linkattr to default to current
var attributes = {'data-cke-saved-href': href, href: href};
var style = new CKEDITOR.style({ element: 'a', attributes: attributes } );
but that I could use to make it a span class=url
Make sense?
Hi again,
If a user types a url and it linkifies it, but then the user text-edits the written url, then the link becomes wrong:
User types:
becomes
User then edits it to be
My users are not technical and I've found that the LINK dialog is too complex for them. My idea is to make typed urls become surrounded by a
<span class='url'>Then I can handle this, so that, for example, we can have a simpler google-style link changer, or make double-click go to the url or something.
For example I have this code which makes double-click open a link:
Anyway, would be nice to have options: linktag and linkattr to default to current
but that I could use to make it a
span class=urlMake sense?