mirror of
https://github.com/LinkStackOrg/LinkStack.git
synced 2025-04-24 23:18:45 +02:00
Added option to open links in new tab for text fields
This commit is contained in:
parent
c36aed5a09
commit
078f750c41
@ -5,49 +5,59 @@
|
|||||||
<script>
|
<script>
|
||||||
ClassicEditor
|
ClassicEditor
|
||||||
.create(document.querySelector('.ckeditor'), {
|
.create(document.querySelector('.ckeditor'), {
|
||||||
|
|
||||||
toolbar: {
|
toolbar: {
|
||||||
items: [
|
items: [
|
||||||
'exportPDF', 'exportWord', '|'
|
'exportPDF', 'exportWord', '|',
|
||||||
, 'findAndReplace', 'selectAll', '|'
|
'findAndReplace', 'selectAll', '|',
|
||||||
, 'heading', '|'
|
'heading', '|',
|
||||||
, 'bold', 'italic', 'strikethrough', 'underline', 'code', 'subscript', 'superscript', 'removeFormat', '|'
|
'bold', 'italic', 'strikethrough', 'underline', 'code', 'subscript', 'superscript', 'removeFormat', '|',
|
||||||
, 'bulletedList', 'numberedList', 'todoList', '|'
|
'bulletedList', 'numberedList', 'todoList', '|',
|
||||||
, 'outdent', 'indent', '|'
|
'outdent', 'indent', '|',
|
||||||
, 'undo', 'redo'
|
'undo', 'redo',
|
||||||
|
'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor', 'highlight', '|',
|
||||||
, 'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor', 'highlight', '|'
|
'alignment', '|',
|
||||||
, 'alignment', '|'
|
'link', 'blockQuote', '|',
|
||||||
, 'link', 'blockQuote', '|'
|
'specialCharacters', 'horizontalLine', '|',
|
||||||
, 'specialCharacters', 'horizontalLine', '|'
|
'textPartLanguage', '|',
|
||||||
, 'textPartLanguage', '|'
|
],
|
||||||
]
|
shouldNotGroupWhenFull: true
|
||||||
, shouldNotGroupWhenFull: true
|
},
|
||||||
}
|
fontFamily: {
|
||||||
, fontFamily: {
|
|
||||||
options: [
|
options: [
|
||||||
'default'
|
'default',
|
||||||
, 'Arial, Helvetica, sans-serif'
|
'Arial, Helvetica, sans-serif',
|
||||||
, 'Courier New, Courier, monospace'
|
'Courier New, Courier, monospace',
|
||||||
, 'Georgia, serif'
|
'Georgia, serif',
|
||||||
, 'Lucida Sans Unicode, Lucida Grande, sans-serif'
|
'Lucida Sans Unicode, Lucida Grande, sans-serif',
|
||||||
, 'Tahoma, Geneva, sans-serif'
|
'Tahoma, Geneva, sans-serif',
|
||||||
, 'Times New Roman, Times, serif'
|
'Times New Roman, Times, serif',
|
||||||
, 'Trebuchet MS, Helvetica, sans-serif'
|
'Trebuchet MS, Helvetica, sans-serif',
|
||||||
, 'Verdana, Geneva, sans-serif'
|
'Verdana, Geneva, sans-serif'
|
||||||
]
|
],
|
||||||
, supportAllValues: true
|
supportAllValues: true
|
||||||
},
|
},
|
||||||
fontSize: {
|
fontSize: {
|
||||||
options: [10, 12, 14, 'default', 18, 20, 22],
|
options: [10, 12, 14, 'default', 18, 20, 22],
|
||||||
supportAllValues: true
|
supportAllValues: true
|
||||||
},
|
},
|
||||||
|
link: {
|
||||||
|
addTargetToExternalLinks: true, // Add this option to open external links in a new tab
|
||||||
|
defaultProtocol: 'http://',
|
||||||
|
decorators: {
|
||||||
|
addTargetToExternalLinks: {
|
||||||
|
mode: 'manual',
|
||||||
|
label: 'Open in new tab',
|
||||||
|
attributes: {
|
||||||
|
target: '_blank',
|
||||||
|
rel: 'noopener noreferrer'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
@ -268,49 +268,59 @@
|
|||||||
<script>
|
<script>
|
||||||
ClassicEditor
|
ClassicEditor
|
||||||
.create(document.querySelector('.ckeditor'), {
|
.create(document.querySelector('.ckeditor'), {
|
||||||
|
|
||||||
toolbar: {
|
toolbar: {
|
||||||
items: [
|
items: [
|
||||||
'exportPDF', 'exportWord', '|'
|
'exportPDF', 'exportWord', '|',
|
||||||
, 'findAndReplace', 'selectAll', '|'
|
'findAndReplace', 'selectAll', '|',
|
||||||
, 'heading', '|'
|
'heading', '|',
|
||||||
, 'bold', 'italic', 'strikethrough', 'underline', 'code', 'subscript', 'superscript', 'removeFormat', '|'
|
'bold', 'italic', 'strikethrough', 'underline', 'code', 'subscript', 'superscript', 'removeFormat', '|',
|
||||||
, 'bulletedList', 'numberedList', 'todoList', '|'
|
'bulletedList', 'numberedList', 'todoList', '|',
|
||||||
, 'outdent', 'indent', '|'
|
'outdent', 'indent', '|',
|
||||||
, 'undo', 'redo'
|
'undo', 'redo',
|
||||||
|
'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor', 'highlight', '|',
|
||||||
, 'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor', 'highlight', '|'
|
'alignment', '|',
|
||||||
, 'alignment', '|'
|
'link', 'blockQuote', '|',
|
||||||
, 'link', 'blockQuote', '|'
|
'specialCharacters', 'horizontalLine', '|',
|
||||||
, 'specialCharacters', 'horizontalLine', '|'
|
'textPartLanguage', '|',
|
||||||
, 'textPartLanguage', '|'
|
],
|
||||||
]
|
shouldNotGroupWhenFull: true
|
||||||
, shouldNotGroupWhenFull: true
|
},
|
||||||
}
|
fontFamily: {
|
||||||
, fontFamily: {
|
|
||||||
options: [
|
options: [
|
||||||
'default'
|
'default',
|
||||||
, 'Arial, Helvetica, sans-serif'
|
'Arial, Helvetica, sans-serif',
|
||||||
, 'Courier New, Courier, monospace'
|
'Courier New, Courier, monospace',
|
||||||
, 'Georgia, serif'
|
'Georgia, serif',
|
||||||
, 'Lucida Sans Unicode, Lucida Grande, sans-serif'
|
'Lucida Sans Unicode, Lucida Grande, sans-serif',
|
||||||
, 'Tahoma, Geneva, sans-serif'
|
'Tahoma, Geneva, sans-serif',
|
||||||
, 'Times New Roman, Times, serif'
|
'Times New Roman, Times, serif',
|
||||||
, 'Trebuchet MS, Helvetica, sans-serif'
|
'Trebuchet MS, Helvetica, sans-serif',
|
||||||
, 'Verdana, Geneva, sans-serif'
|
'Verdana, Geneva, sans-serif'
|
||||||
]
|
],
|
||||||
, supportAllValues: true
|
supportAllValues: true
|
||||||
},
|
},
|
||||||
fontSize: {
|
fontSize: {
|
||||||
options: [10, 12, 14, 'default', 18, 20, 22],
|
options: [10, 12, 14, 'default', 18, 20, 22],
|
||||||
supportAllValues: true
|
supportAllValues: true
|
||||||
},
|
},
|
||||||
|
link: {
|
||||||
|
addTargetToExternalLinks: true, // Add this option to open external links in a new tab
|
||||||
|
defaultProtocol: 'http://',
|
||||||
|
decorators: {
|
||||||
|
addTargetToExternalLinks: {
|
||||||
|
mode: 'manual',
|
||||||
|
label: 'Open in new tab',
|
||||||
|
attributes: {
|
||||||
|
target: '_blank',
|
||||||
|
rel: 'noopener noreferrer'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user