Tiny MCE Default Content - tinymce

I want to load TinyMCe with default content as below when loaded .
<html>
<body>
</body>
</html>
I have set cleanup : false . Still it wraps html with <p></p> and removes my code .
Any solution to this ?

Got it solved . Just had to enable full html plugin.

Related

create default html opening code in Visual Studio Code

In some html editors when you create a new html file, some default codes as below created automatically:
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8"/>
</head>
<body>
</body>
</html>
how can I enable this feature in VSCode editor?
Thanks.
Press shift and 1 (!) It will show two options select the first one or type html:5 and enter the option it will give you default boilerplate for html
Just give the ! sign and then press Tab.

How can I disable this annoying CodeIntel autocomplete pop up in Sublime 2?

For example, when I type html + tab,
the html boilerplate automatically loads:
`<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>`
then if I type ol + tab, it automatically loads the opening tag and the closing one:
`<ol></ol>`
and because of this very annoying autocomplete pop up, I can't directly type enter between the tags to get the closing tag under the opening one,
I already tried to change the settings just like it's said in the SublimeCodeIntel Github page :
" Do NOT edit the default SublimeCodeIntel settings. Your changes will be lost when SublimeCodeIntel is updated. ALWAYS edit the user SublimeCodeIntel settings by selecting "Preferences->Package Settings->SublimeCodeIntel->Settings - User". Note that individual settings you include in your user settings will completely replace the corresponding default setting, so you must provide that setting in its entirety. "
and " Live autocomplete can be disabled by setting "codeintel_live"
to false. "
So I did this, okay, no very annoying autocomplete pop up anymore, awesome ! But when I type html + tab, no html boilerplate loading anymore ! Yikes !
I also have to tell I'm an absolute beginner at coding.
Thanks a lot for your help !
It seems like you solved your problem, but at the expense of the HTML boilerplate shortcut.
Try these steps to fix it:
Sublime Text -> Tools -> New Snippet...
Copy-paste the following text into the new snippet file:
--
<snippet>
<content><![CDATA[
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>html</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.html</scope>
</snippet>
--
Save the new file into your Sublime Text user packages directory.
By default the file should save into this directory, but in case it does not, this is the location for each OS:
OSX: /Users/{user}/Library/Application\ Support/Sublime Text 2/Packages/User/
Windows: C:\Users\{user}\AppData\Roaming\Sublime Text 2\Packages\User
Linux: /home/{user}/.config/sublime-text-2/Packages/User

Change the Browser title

I am using links to display PDF files. I wish to show the PDF in a new tab so I add target="_blank". This works fine. A new tab is opened but I wish to change the title of the tab.
The link redirects me to this controller code as follows:-
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename="' . $filename . '"');
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . filesize($file));
header('Accept-Ranges: bytes');
#readfile($file);
The pdf is displayed correctly but there is no view script so I have no control via the script. Is there a header("Browser title: ???") I can use?
TIA Effy
For this problem, I use this trick:
I use a simple html page with an iframe like this:
<html>
<head>
<title>Your PDF Title</title>
<link type="image/x-icon" rel="icon" href="">
</head>
<body>
<iframe src="/module/controller/action/param..." id="ifrm" name="ifrm" width="100%" height="100%">
</iframe>
</body>
</html>
The iframe contains the PDF and the page has title.
Of course, you can use javascript to have a dynamic title
The internal pdfviewer in Firefox seems to fetch the title of the document from the metadata in the pdf.
With for instance Zend_Pdf this metadata can be manipulated.
$title = 'My custom title';
$pdf = Zend_Pdf::load($filepath);
$metadata = $pdf->getMetadata();
$metadataDOM = new DOMDocument();
$metadataDOM->loadXML($metadata);
$domTitle = $metadataDOM->getElementsByTagName('title')->item(0);
$domTitle->nodeValue = $title;
$pdf->setMetadata($metadataDOM->saveXML());
//maybe old style document info:
$pdf->properties['Title'] = $title;//this didn't work for me
echo $pdf->render();
I'm no DOM manipulation expert, but this worked for me with a file created with Illustrator CS5. Freely based on the Zend Framework Documentation. You might need to do some error checking along the way.

Laravel4: how to style an email

I an a newsletter app, i send a view as a template of mail.
Inside the view there a variable that hold the content taken from a form.
I try to apply different inline style to the view, but no one worked.
This is the view, now there is only one style (color:blue) to test css:
<html>
<body style="color:blue;">
{{ $content }}
</body>
</html>
How can i do to style this view, and send a mail with the proper css style?
Thank you
You can do styling like this,
<!DOCTYPE html>
<html>
<body>
<p style="font-style:italic">
{{ $content }}
</p>
</body>
</html>
It works for me.

How to remove file template in Emacs

Every time I create an HTML file in Emacs a template is being loaded. It asks me for title and creates the following text:
<html>
<head>
<title></title>
</head>
<body>
<h1></h1>
<address>
</address>
</body>
</html>
But I don't need it. How to disable this template? I am using yasnippet, maybe, it creates it?
I found it. The cause were these lines in .emacs:
(auto-insert-mode)
(setq auto-insert-query nil)
Seems, that this module inserts the template when you are creating a file.