TINYMCE - Where do I place the target: '_blank' to make autolink open in new tab please? (not working) - autolink

Here's my tiny code. I'm usin it very basically, minimal features cosit;s for a small public forum:
<script src="tinymce/js/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
selector: '#myTextarea',
plugins:
'autolink image media emoticons lists',
toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | ' +
'bullist numlist | image | media | forecolor backcolor | emoticons',
menu: {
favs: {title: 'My Favorites', items: 'code visualaid | searchreplace'}
},
menubar: '',
content_css: 'content.css',
default_link_target: '_blank',
});
</script>
added autolinks still open in the same tab when the resulting auto-link is displayed at the posted output.
the exampels dont really make. it clear where I should position the command
help please!
cheers
i'm a noob... i tried it in various positions following the start guide, no luck

Related

code style for velocity template files in IntelliJ

Problem
The automatic indents in .vm files don't behave as I want them to. Below I add the auto formatted file and also the formatting I want.
The following code snippet is auto formatted by IntelliJ:
#styleTitle('sample-title')
##styleDescription()
A short description of the component
#end
##styleComponent('/components/molecules/sampleComponent/sampleComponent', {
"headline": 'A headline title',
"alertText": "Alert text example",
"link" : {
"href": "www.stackoverflow.com",
"text": "Click here!"
}
})#end
What I want:
#styleTitle('sample-title')
##styleDescription()
A short description of the component
#end
##styleComponent('/components/molecules/sampleComponent/sampleComponent', {
"headline": 'A headline title',
"alertText": "Alert text example",
"link" : {
"href": "www.stackoverflow.com",
"text": "Click here!"
}
})#end
Question
I couldn't find any additional configuration under IntelliJ IDEA | Preferences | Editor | Code Style | Velocity to adjust indention for different code blocks.
How can I configure the code style manually for a specific file type in IntelliJ and how does such a configuration file look like?

TinyMCE custom button VUE

I can't add custom button with other toolbars
This code work
tinyMCE.init({
selector: '#d1',
toolbar:'customButton',
setup(editor) {
editor.addButton('customButton', {
text: 'My button',
icon: false,
onclick() {
editor.insertContent(" <b>It's my button!</b> ")
},
})
},
})
But, if i add one more toolbar, it didn't work, why?
toolbar: 'forecolor backcolor' +
'customInsertButton',
If you want to use multiple toolbars in TinyMCE you can use either:
toolbar array: https://fiddle.tiny.cloud/TBhaab
toolbar: ['myCustomToolbarButton','forecolor backcolor'],
https://www.tiny.cloud/docs/configure/editor-appearance/#usingmultipletoolbars
toolbar(n): https://fiddle.tiny.cloud/VBhaab
toolbar1: 'myCustomToolbarButton',
toolbar2: 'forecolor backcolor',
https://www.tiny.cloud/docs/configure/editor-appearance/#toolbarn
Note, you are showing TinyMCE 4 button syntax. If you are using TinyMCE 5 (5.7.1 is the current version) the API for creating custom buttons has changed:
TinyMCE 4 version: https://fiddle.tiny.cloud/QBhaab
TinyMCE 5 version: https://fiddle.tiny.cloud/SBhaab
editor.ui.registry.addButton('myCustomToolbarButton', {
text: 'My Button',
onAction: function () {
editor.insertContent(" <b>It's my button!</b> ")
}
});
More info: https://www.tiny.cloud/docs/ui-components/toolbarbuttons/#howtocreatecustomtoolbarbuttons
This isn't so much a TinyMCE issue and is more so a JavaScript issue. The problem is with your concatenation logic in:
toolbar: 'forecolor backcolor' +
'customInsertButton',
This will end up becoming toolbar: 'forecolor backcolorcustomInsertButton' which as you can see is missing a space/separator between backcolor and customInsertButton. So to solve that, just make sure to add a space, such as:
toolbar: 'forecolor backcolor ' +
'customInsertButton',

How does one use the "Content" field type in KeystoneJS?

How does one use the Content field type in KeystoneJS? I've put the following in my index.js, following the example given in the link above:
keystone.createList('Todo', {
schemaDoc: 'A list of things which need to be done',
fields: {
name: {type: Text, schemaDoc: 'This is the thing you need to do'},
blip: {type: Text, schemaDoc: 'This is another thing'},
status: {type: Select, options: 'pending, processed'},
rating: { type: Stars, starCount: 5 }, body: {
type: Content,
blocks: [
Content.blocks.blockquote,
Content.blocks.image,
Content.blocks.link,
Content.blocks.orderedList,
Content.blocks.unorderedList,
Content.blocks.heading,
// CloudinaryImage.blocks.image,
],
},
},
But when I go to the front end and click on the '+' button there, it only offers me the option of inserting an image (see screenshot below)
What is it I'm supposed to be seeing? If I'm supposed to see more, what am I supposed to be doing? I don't see anything about 'blockquote', 'link', 'orderedList', etc....
Is this all superceded by the Wysiwyg editor? Or do they do different things?
you have to write some text and then select that text for text formatting items.
this is how it looks with all options on:
this is how it looks when I remove the extra formatting option (bare content field)

How to change bootstrap tour arrow

I use bootstrap tour but i dont no how to change the arrow to top.
Anyone can tech me to change the arrow to top?
As per screenshot below.
This is script for bootstrap tour.
var tour = new Tour({
placement: "top",
storage: false,
steps: [
{
element: "#revision",
title: "TEST",
content: "TEST. . . "
}
]});
tour.init();
tour.start();
change your div class to popover tour-tour fade bottom in,change your placement top to bottom
Just add the 'placement' property like that:
steps: [
{
element: "#revision",
title: "TEST",
content: "TEST. . . "
placement: top
}
]
This div gets created <div class="arrow"></div> try editing the CSS on that class in the bootstrap.css file.

Seaside - Reporting with submit buttons

Is something like the following valid?
TransactionReport := WATableReport new
rows: SpendingManager instance entriesForPosting asArray;
columns: (OrderedCollection new
add: (WAReportColumn
renderBlock: [ :each :html | (html submitButton
callback: [ SpendingManager removeTransaction: each. self renderReport ];
text: 'Backout Transaction')]
title: '');
It does actually render the submit button with each row, but clicking it doesn't appear to do anything.
I've been able to kinda of accomplish this, though it's not as pretty as a button:
add: (WAReportColumn new
title: '';
valueBlock: [:anEvent | 'delete'];
clickBlock: [ :each | SpendingManager instance removeTransaction: each]);
yourself);
Would still love some feedback.
Submit Buttons that do nothing are most likely not inside a form tag. So can you check if your report works if you embed it into a html form: [] block?
If a form is not an option, you can replace the submit buttons with anchors. You can use css to make anchors look like buttons if that aspect is important.