Skip to content

Improve default createLink action edition#1494

Open
jgribonvald wants to merge 1 commit intotextAngular:masterfrom
GIP-RECIA:improveCreateLink
Open

Improve default createLink action edition#1494
jgribonvald wants to merge 1 commit intotextAngular:masterfrom
GIP-RECIA:improveCreateLink

Conversation

@jgribonvald
Copy link
Copy Markdown

@jgribonvald jgribonvald commented Apr 7, 2017

  • on selection we can edit the text link
  • on taDropHandler when calling insertAction we can provide an array contaning the url and optionally a text to show instead of the url and css class names as string
    example : insertAction('createLink', ['https://ex.edu.fr/files/document.odt', 'document.odt', 'fa fa-file-word-o fa-2x fa-lg' ], true)
    and it will create the html tag :
    <a href="proxy.php?url=https%3A%2F%2Fex.edu.fr%2Ffiles%2Fdocument.odt" target="_blank"><i class="fa fa-file-word-o fa-2x fa-lg"></i> <span>document.odt</span></a>

- on selection we can edit the text link
- on taDropHandler when calling insertAction we can provide an array contaning the url and optionally a text to show instead of the url and css class names as string
example : insertAction('createLink', ['https://ex.edu.fr/files/document.odt', 'document.odt', 'fa fa-file-word-o fa-2x fa-lg' ], true)
and it will create the html tag :
<a href="proxy.php?url=https%3A%2F%2Fwww.github.com%2F%3Ca+href%3D"https://ex.edu.fr/files/document.odt" rel="nofollow">https://ex.edu.fr/files/document.odt" target="_blank"><i class="fa fa-file-word-o fa-2x fa-lg"></i> <span>document.odt</span></a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant