Merge pull request #334 from Skookum/selected-links
Grab selected text and use it as the default text when creating links.
This commit is contained in:
@@ -47,7 +47,8 @@ var ASCIIDoc = {
|
|||||||
id: 'text',
|
id: 'text',
|
||||||
name: 'Link Text',
|
name: 'Link Text',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
help: 'The text to display to the user.'
|
help: 'The text to display to the user.',
|
||||||
|
defaultValue: selText
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'href',
|
id: 'href',
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ var Creole = {
|
|||||||
id: 'text',
|
id: 'text',
|
||||||
name: 'Link Text',
|
name: 'Link Text',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
help: 'The text to display to the user.'
|
help: 'The text to display to the user.',
|
||||||
|
defaultValue: selText
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'href',
|
id: 'href',
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ var MarkDown = {
|
|||||||
{
|
{
|
||||||
id: 'text',
|
id: 'text',
|
||||||
name: 'Link Text',
|
name: 'Link Text',
|
||||||
type: 'text'
|
type: 'text',
|
||||||
|
defaultValue: selText
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'href',
|
id: 'href',
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ var OrgMode = {
|
|||||||
{
|
{
|
||||||
id: 'text',
|
id: 'text',
|
||||||
name: 'Link Text',
|
name: 'Link Text',
|
||||||
type: 'text'
|
type: 'text',
|
||||||
|
defaultValue: selText
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'href',
|
id: 'href',
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ var Pod = {
|
|||||||
{
|
{
|
||||||
id: 'text',
|
id: 'text',
|
||||||
name: 'Link Text',
|
name: 'Link Text',
|
||||||
type: 'text'
|
type: 'text',
|
||||||
|
defaultValue: selText
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'href',
|
id: 'href',
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ var Textile = {
|
|||||||
id: 'text',
|
id: 'text',
|
||||||
name: 'Link Text',
|
name: 'Link Text',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
help: 'The text to display to the user.'
|
help: 'The text to display to the user.',
|
||||||
|
defaultValue: selText
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'href',
|
id: 'href',
|
||||||
|
|||||||
@@ -72,6 +72,9 @@
|
|||||||
if ( fieldAttributes.type == 'code' ) {
|
if ( fieldAttributes.type == 'code' ) {
|
||||||
html+= ' class="code"';
|
html+= ' class="code"';
|
||||||
}
|
}
|
||||||
|
if ( fieldAttributes.defaultValue ) {
|
||||||
|
html+= ' value="' + fieldAttributes.defaultValue.split('"').join('"') + '"';
|
||||||
|
}
|
||||||
html += ' id="gollum-dialog-dialog-generated-field-' +
|
html += ' id="gollum-dialog-dialog-generated-field-' +
|
||||||
fieldAttributes.id + '">';
|
fieldAttributes.id + '">';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user