When I customize the YouTube subscribe button code to reflect my channel, the code changes when I try pasting it into the html space in my wordpress blog.
I try copying this:
<script src="https://apis.google.com/js/platform.js"></script>
<div class="g-ytsubscribe" data-channel="TheAtheistsNextDoor" data-layout="full" data-count="default"></div>
and then when it pastes, it always ends up like this:
<div class="g-ytsubscribe"></div>
I should add that when I copy the html from the code box, it changes the preview from what is correct, to: These aren't the XSS vulnerabilities you're looking for.
How is the simple act of copying the code changing it somehow? Why would it paste as something completely different?
Hey #Bridget Ludwa O'Hanlon, I am not too familiar with Wordpress. With that being said to answer your first question, not sure why the code is changing may be the client your using or you. To using the subscribe button here is the code***Note I am using my channel as you did not say yours***:
Default:
<script src="https://apis.google.com/js/platform.js"></script>
Full:
<script src="https://apis.google.com/js/platform.js"></script>
There are many different combinations you can do i would highly suggest checking out the first source posted below as google is a programmers friend (remember this) Thankfully google helps you out by telling you how to create this button and even gives you a generator for it.
sources: https://developers.google.com/youtube/youtube_subscribe_button
sources:http://www.wpbeginner.com/wp-tutorials/how-to-add-youtube-subscribe-button-in-wordpress/
Wordpress has this thing where it modifies you code if you jump between visual and text tab. But a rule of thumb, goto text tab -> paste your code and click the update button. Dont go to the visual tab unless the code is pasted and updated.
OR
You can try using. You can try replacing the existing editor with https://wordpress.org/plugins/foliopress-wysiwyg/
Related
I stumbled across this, when I tried solving this: Searching for Live Template in PhpStorm, from abbreviation (wrong expansion?).
TL;DR
In PhpStorm, in a markdown-file, when I write 3 back-ticks and press enter, it expands to this:
```angular2html
```
And I would like PhpStorm to stop helping me here, and just type what I typed:
```
```
Detailed description and solution attempts
In a Markdown-file (readme.md), I use it often to write a code block with three ticks:
```
But when I do so, PhpStorm suggest a bunch of stuff:
So if I press Enter here, then it expands to:
```angular2html
```
So how do I change this behaviour?
Solution attempt 1: Deactivate the bundled Angular-plugin
There is a (bundled) plugin called: 'Angular and AngularJS'. If I deactivate that, then it looks like this:
and expands to this:
```apacheconf
```
Solution attempt 2: Ensure Markdown is supported
I'm really baffled why this happens. Does PhpStorm not realize that I'm in an .md-file?
And/or is this the usual desired behaviour, when people write three backticks in a and .md-file?
I can confirm that I have an active (bundled) plugin called: 'Markdown' (version 222.3739.61).
Solution attempt 3: Add a new Live Template
This actually works, by making a new Live Template, to be this:
```
$END$
Remember the blank line underneath. This is since I would like to press Enter, and that replaces the first 3 ticks with this, but not the ones PhpStorm automatically adds dues to auto-closing of brackets and backticks.
This solution attempt seems quite hacky, though. :-/
From https://youtrack.jetbrains.com/issue/IDEA-266239
The pop up was created to make specification of code fence language easier and to enable automatic code injection. We can’t disable it since it would affect a lot of users using it for fast code injection.
angular2html is the first entry in your case. Somebody else may have another language ID (e.g. aidl).
Right now it cannot be disabled or customized. So you will have to either use your own workaround (with Live Template) or press Esc before hitting Enter.
Other than that: watch that IDEA-266239 ticket (star/vote/comment) to get notified with any progress. No better suggestions right now.
I've been trying to get Code Completion to work on the current version of WebStorm (2017.3), but to no avail.
Specifically when working with HTML code completion seems to only work when I press the shortcut ctrl+space. As far as I can tell I should be able to get the Code Completion look up table to pop-up automatically when I start typing by going to Preferences > Editor > General > Code Completion and checking the box for Autopopup code completion the thing is... I DON'T SEE THAT BOX!!!
This is driving me insane. I've looked under Code Completion in WebStorm 2017.3 Help and there are discrepancies between what the instructions say I should see, and what I actually see.
This is a picture of my Code Completion window in WebStorm 2017.3:
but it should look more like this (IntelliJ IDE 2017.3):
The Basic Completion box is missing in WebStorm. Not sure if that has something to do with it.
I've looked around and it seems like other people's Code Completion window looks like it's supposed to. For example in this Community Forum there is a post in 2015 and another in 2016 where the users show their Code Completion preferences and they look like they're supposed to.
I've tried re-installing WebStorm, deleting all preferences and the .plist but it hasn't worked.
I would like to note, that this issue seems to be affecting only my HTML documents, since the Autocomplete pop-up table for JavaScript works well.
Any ideas on what might be going on? Is there something on my end I can do to fix this?
In short: it works as intended.
Thing is: it's HTML context ... where everything is a plain text with HTML tags inside (despite the fact that whole HTML document starts with <html> tag and stuff).
In this regard HTML context is not that strict/obvious as JavaScript/PHP/etc is. There is no way to guess if you are trying to write a word strong or a HTML tag <strong> .. hence you see no completion popup when you just typing any word. But .. if you type < before starting typing strong it will be a hint for IDE that you are typing a HTML tag (which means HTML context)... and completion popup will appear as usual (no need to invoke it manually).
If it would work as you are expecting/proposing (having completion popup for each word) then I would see it for every word in Any ideas on what might be going on? sentence. It will be supper annoying to see that popup appearing/disappearing for no reason for each word (when I'm clearly typing a plain text). Some people get mad even for much smaller things (like highlighting a matching brace or tag when you move caret left/right)...
Related subject: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000719050-Autopopup-completion-works-inside-php-tag-but-doesn-t-work-outside-of-it-Is-there-any-fix-
If typing < is a problem (not convenient or any other "religious" reasons (e.g. "why should I type it -- IDE should do that for me" etc)) -- consider speed up even more with Emmet (IDE supports basic abbreviations as well as expanding sequences) or Live Templates (basic Emmet abbreviations are handled with Live Template under the hood anyway).
https://www.jetbrains.com/help/webstorm/emmet.html
https://www.jetbrains.com/help/webstorm/live-templates.html
Okay, my english is not the greatest so I apologize in advance. Question is really stupid and I dont know how that is called but I will try to explain it here better. So I am making a template for one restourant and menus are changing every week. So is it possible to write paragraphs somewhere else ( in separated place (external or internal)) and then "call them" somewhere in .html.
Example. making methods in C# and then calling them anywhere when we want to
In my opinion the simplest method will be to use php.
Then in place with menu you can only use something like this:
<?php inlcude('menus/file.php');
And on server create a folder menus where you wil put php files with html.
All files can be simple html. There is no need to learn php just in place you want to call a file use code i placed earlier.
HTML doesn't have a good way to achieve this (although iframe exists).
This sort of thing is generally handled by software that generates the HTML, either when the page is requested (via something like the very basic SSI support in some webservers to full on server side programming (which you could use C# for)) or at publication time (via a build tool such as Gulp).
You could use jQuery to achieve it (if it is a simple website and simple menu), read more the related function on http://api.jquery.com/load/
You may also read a simple here: HTML File including another HTML file
I may also include a very basic example for you
main.html
<body>
<header>Some header</header>
<content>
<main class="the-menu"></main>
</content>
<script>
$(".the-menu").load("menu.html");
</script>
</body>
i'm making a small website and i need whoever takes over to add some content, stored in three tables which by sep '13 will have at most 500 records (small stuff). right now i'm using phpmyadmin, but adding text (one of the tables is a mini blog) requires basic html skills, which i'm sure "whoever takes over" doesn't have. do you know, alternatively:
a) a way to integrate a wysiwyg editor with phpmyadmin (at least for the TEXT fields)
b) an essential frontend to mysql which supports editing tables (just the content, not the structure) – in which i might embed an editor myself?
edit: thanks for the editor suggestions, but that's a secondary problem: at the moment i'd need a way to embed any such editor to phpmyadmin (otherwise i'd have to write the frontend myself)...
I think CK editor is what you are looking for, you can see for yourself here: http://ckeditor.com/
Here is a solution for you, I have to say that doing this is completely wrong, but if you really need it, then here is the way:
Get TinyMCE from here:
http://www.tinymce.com/
Extract the package in your phpmyadmin folder, for example in my case I put the main contents here: D:\Program Files\Wamp\apps\phpmyadmin\tiny_mce so the tiny_mce.js file is located at this patch D:\Program Files\Wamp\apps\phpmyadmin\tiny_mce\tiny_mce.js
Then open the file tbl_change.php in your phpmyadmin folder and add the flowing code after <?php:
echo '<script type="text/javascript" language="javascript" src="tiny_mce/tiny_mce.js"></script>'
.'<script language="javascript" type="text/javascript">'
.'tinyMCE.init({'
.'theme : "advanced",'
.'mode : "textareas",'
.'language : "en"'
.'});'
.'</script>';
This will add the TinyMCE in all textareas of editing a record in phpmyadmin, if you needed it somewhere else, just take a look at what file is being loaded in phpmyadmin right iframe, and add that code to that file too.
I repeat that doing this is completely wrong, just do it if you really need it.
I am using jHtmlArea, a jQuery plugin, as a very simple and quick way to implement a solution for a case just like yours: http://jhtmlarea.codeplex.com/
It is really really simple to use it, in the front-end. But I have not used phpMyAdmin nor any other "essential frontend". I have coded a simple back-end PHP script to save the contents into the database.
In the back-end, I am also using HTML Purifier to clean the HTML, and HTML Tidy to prettify it.
This is also useful TinyMCE "www.tinymce.com" , this WYSIWYG is seen in wordpress
I have seen on few websites that when you copy some text from there, and paste anywhere, it will add the URL of the page from where I copied the text.
For example:
This is text I copied.
and when I paste, I get:
This is text I copied.
Read more: http://example.com/abc/def
I'm just curious to know how this is done? How to add additional text in the copied text?
Example: Check this question (or any other) on answers.com. Copy the question text and paste. Tested with Firefox latest version.
There are many online tools which provide this and other website/blog management utilities. Answer.com is also using one such service named tynt. Open the link, scroll down to the bottom and you can see answer.com in featured clients ;).
For more information.
Zeroclipboard should help you modify the clipboard content. It's a flash movie that is hidden in the browser and exposes a JavaScript API to access the clipboard.
Example.
var clip = new ZeroClipboard.Client();
clip.addEventListener('complete', function(client, text) {
clip.setText(text + "Read more at www.");
});