Mercurial Hosting > sceditor
comparison src/formats/xhtml.js @ 17:a199722647d0
finish last commit
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 08 Aug 2022 12:28:55 -0600 |
parents | 0cb206904499 |
children | 80a86fb8f2b7 |
comparison
equal
deleted
inserted
replaced
16:8bd52902156a | 17:a199722647d0 |
---|---|
56 }, | 56 }, |
57 justify: { | 57 justify: { |
58 txtExec: ['<div style="text-align:justify;">', '</div>'] | 58 txtExec: ['<div style="text-align:justify;">', '</div>'] |
59 }, | 59 }, |
60 font: { | 60 font: { |
61 txtExec: function (caller) { | 61 txtExec: function (editor, caller) { |
62 var editor = this; | |
63 | |
64 getEditorCommand('font')._dropDown( | 62 getEditorCommand('font')._dropDown( |
65 editor, | 63 editor, |
66 caller, | 64 caller, |
67 function (font) { | 65 function (font) { |
68 editor.insertText('<span style="font-family:' + | 66 editor.insertText('<span style="font-family:' + |
70 } | 68 } |
71 ); | 69 ); |
72 } | 70 } |
73 }, | 71 }, |
74 size: { | 72 size: { |
75 txtExec: function (caller) { | 73 txtExec: function (editor, caller) { |
76 var editor = this; | |
77 | |
78 getEditorCommand('size')._dropDown( | 74 getEditorCommand('size')._dropDown( |
79 editor, | 75 editor, |
80 caller, | 76 caller, |
81 function (size) { | 77 function (size) { |
82 editor.insertText('<span style="font-size:' + | 78 editor.insertText('<span style="font-size:' + |
84 } | 80 } |
85 ); | 81 ); |
86 } | 82 } |
87 }, | 83 }, |
88 color: { | 84 color: { |
89 txtExec: function (caller) { | 85 txtExec: function (editor, caller) { |
90 var editor = this; | |
91 | |
92 getEditorCommand('color')._dropDown( | 86 getEditorCommand('color')._dropDown( |
93 editor, | 87 editor, |
94 caller, | 88 caller, |
95 function (color) { | 89 function (color) { |
96 editor.insertText('<span style="color:' + | 90 editor.insertText('<span style="color:' + |
113 }, | 107 }, |
114 code: { | 108 code: { |
115 txtExec: ['<code>', '</code>'] | 109 txtExec: ['<code>', '</code>'] |
116 }, | 110 }, |
117 image: { | 111 image: { |
118 txtExec: function (caller, selected) { | 112 txtExec: function (editor, caller, selected) { |
119 var editor = this; | |
120 | |
121 getEditorCommand('image')._dropDown( | 113 getEditorCommand('image')._dropDown( |
122 editor, | 114 editor, |
123 caller, | 115 caller, |
124 selected, | 116 selected, |
125 function (url, width, height) { | 117 function (url, width, height) { |
139 } | 131 } |
140 ); | 132 ); |
141 } | 133 } |
142 }, | 134 }, |
143 email: { | 135 email: { |
144 txtExec: function (caller, selected) { | 136 txtExec: function (editor, caller, selected) { |
145 var editor = this; | |
146 | |
147 getEditorCommand('email')._dropDown( | 137 getEditorCommand('email')._dropDown( |
148 editor, | 138 editor, |
149 caller, | 139 caller, |
150 function (url, text) { | 140 function (url, text) { |
151 editor.insertText( | 141 editor.insertText( |
156 } | 146 } |
157 ); | 147 ); |
158 } | 148 } |
159 }, | 149 }, |
160 link: { | 150 link: { |
161 txtExec: function (caller, selected) { | 151 txtExec: function (editor, caller, selected) { |
162 var editor = this; | |
163 | |
164 getEditorCommand('link')._dropDown( | 152 getEditorCommand('link')._dropDown( |
165 editor, | 153 editor, |
166 caller, | 154 caller, |
167 function (url, text) { | 155 function (url, text) { |
168 editor.insertText( | 156 editor.insertText( |
176 }, | 164 }, |
177 quote: { | 165 quote: { |
178 txtExec: ['<blockquote>', '</blockquote>'] | 166 txtExec: ['<blockquote>', '</blockquote>'] |
179 }, | 167 }, |
180 youtube: { | 168 youtube: { |
181 txtExec: function (caller) { | 169 txtExec: function (editor, caller) { |
182 var editor = this; | |
183 | |
184 getEditorCommand('youtube')._dropDown( | 170 getEditorCommand('youtube')._dropDown( |
185 editor, | 171 editor, |
186 caller, | 172 caller, |
187 function (id, time) { | 173 function (id, time) { |
188 editor.insertText( | 174 editor.insertText( |