web/vendor/markitup/sets/html/set.js   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 30
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 28
dl 0
loc 30
rs 10
c 0
b 0
f 0
cc 0
nc 1
mnd 0
bc 1
fnc 1
bpm 1
cpm 1
noi 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A mySettings.markupSet.replaceWith 0 1 1
1
// ----------------------------------------------------------------------------
2
// markItUp!
3
// ----------------------------------------------------------------------------
4
// Copyright (C) 2008 Jay Salvat
5
// http://markitup.jaysalvat.com/
6
// ----------------------------------------------------------------------------
7
// Html tags
8
// http://en.wikipedia.org/wiki/html
9
// ----------------------------------------------------------------------------
10
// Basic set. Feel free to add more tags
11
// ----------------------------------------------------------------------------
12
mySettings = {
0 ignored issues
show
Bug introduced by
The variable mySettings seems to be never declared. Assigning variables without defining them first makes them global. If this was intended, consider making it explicit like using window.mySettings.
Loading history...
13
	onShiftEnter:	{keepDefault:false, replaceWith:'<br />\n'},
14
	onCtrlEnter:	{keepDefault:false, openWith:'\n<p>', closeWith:'</p>\n'},
15
	onTab:			{keepDefault:false, openWith:'	 '},
16
	markupSet: [
17
		{name:'Heading 1', key:'1', openWith:'<h1(!( class="[![Class]!]")!)>', closeWith:'</h1>', placeHolder:'Your title here...' },
18
		{name:'Heading 2', key:'2', openWith:'<h2(!( class="[![Class]!]")!)>', closeWith:'</h2>', placeHolder:'Your title here...' },
19
		{name:'Heading 3', key:'3', openWith:'<h3(!( class="[![Class]!]")!)>', closeWith:'</h3>', placeHolder:'Your title here...' },
20
		{name:'Heading 4', key:'4', openWith:'<h4(!( class="[![Class]!]")!)>', closeWith:'</h4>', placeHolder:'Your title here...' },
21
		{name:'Heading 5', key:'5', openWith:'<h5(!( class="[![Class]!]")!)>', closeWith:'</h5>', placeHolder:'Your title here...' },
22
		{name:'Heading 6', key:'6', openWith:'<h6(!( class="[![Class]!]")!)>', closeWith:'</h6>', placeHolder:'Your title here...' },
23
		{name:'Paragraph', openWith:'<p(!( class="[![Class]!]")!)>', closeWith:'</p>' },
24
		{separator:'---------------' },
25
		{name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)' },
26
		{name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)' },
27
		{name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>' },
28
		{separator:'---------------' },
29
		{name:'Ul', openWith:'<ul>\n', closeWith:'</ul>\n' },
30
		{name:'Ol', openWith:'<ol>\n', closeWith:'</ol>\n' },
31
		{name:'Li', openWith:'<li>', closeWith:'</li>' },
32
		{separator:'---------------' },
33
		{name:'Picture', key:'P', replaceWith:'<img src="[![Source:!:http://]!]" alt="[![Alternative text]!]" />' },
34
		{name:'Link', key:'L', openWith:'<a href="[![Link:!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...' },
35
		{separator:'---------------' },
36
		{name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },
37
		{name:'Preview', className:'preview', call:'preview' },
38
		{separator:'---------------' },
39
		{name:'More', className:'mMore', key:'M', openWith:'\n<!--more-->\n' }
40
	]
41
}