Grab selected text and use it as the default text when creating links.

This commit is contained in:
Mark Rickert
2012-05-10 13:16:52 -04:00
parent cfb75abeed
commit 8e5d17c907
7 changed files with 15 additions and 6 deletions
@@ -47,7 +47,8 @@ var ASCIIDoc = {
id: 'text',
name: 'Link Text',
type: 'text',
help: 'The text to display to the user.'
help: 'The text to display to the user.',
defaultValue: selText
},
{
id: 'href',
@@ -46,7 +46,8 @@ var Creole = {
id: 'text',
name: 'Link Text',
type: 'text',
help: 'The text to display to the user.'
help: 'The text to display to the user.',
defaultValue: selText
},
{
id: 'href',
@@ -80,7 +80,8 @@ var MarkDown = {
{
id: 'text',
name: 'Link Text',
type: 'text'
type: 'text',
defaultValue: selText
},
{
id: 'href',
@@ -60,7 +60,8 @@ var OrgMode = {
{
id: 'text',
name: 'Link Text',
type: 'text'
type: 'text',
defaultValue: selText
},
{
id: 'href',
@@ -44,7 +44,8 @@ var Pod = {
{
id: 'text',
name: 'Link Text',
type: 'text'
type: 'text',
defaultValue: selText
},
{
id: 'href',
@@ -49,7 +49,8 @@ var Textile = {
id: 'text',
name: 'Link Text',
type: 'text',
help: 'The text to display to the user.'
help: 'The text to display to the user.',
defaultValue: selText
},
{
id: 'href',
@@ -72,6 +72,9 @@
if ( fieldAttributes.type == 'code' ) {
html+= ' class="code"';
}
if ( fieldAttributes.defaultValue ) {
html+= ' value="' + fieldAttributes.defaultValue.split('"').join('"') + '"';
}
html += ' id="gollum-dialog-dialog-generated-field-' +
fieldAttributes.id + '">';
}