Mercurial Hosting > sceditor
comparison src/sceditor.js @ 7:df1e18048d97
add examples/min.html and better defaults
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 04 Aug 2022 23:46:09 -0600 |
parents | c26f7240e96b |
children | 9159df67520a |
comparison
equal
deleted
inserted
replaced
6:c26f7240e96b | 7:df1e18048d97 |
---|---|
1336 * Stylesheet to include in the WYSIWYG editor. This is what will style | 1336 * Stylesheet to include in the WYSIWYG editor. This is what will style |
1337 * the WYSIWYG elements | 1337 * the WYSIWYG elements |
1338 * | 1338 * |
1339 * @type {string} | 1339 * @type {string} |
1340 */ | 1340 */ |
1341 style: 'jquery.sceditor.default.css', | 1341 style: baseUrl+'themes/content/default.css', |
1342 | 1342 |
1343 /** | 1343 /** |
1344 * Comma separated list of fonts for the font selector | 1344 * Comma separated list of fonts for the font selector |
1345 * | 1345 * |
1346 * @type {string} | 1346 * @type {string} |
1453 /** | 1453 /** |
1454 * Width of the editor. Set to null for automatic with | 1454 * Width of the editor. Set to null for automatic with |
1455 * | 1455 * |
1456 * @type {?number} | 1456 * @type {?number} |
1457 */ | 1457 */ |
1458 width: null, | 1458 width: 600, |
1459 | 1459 |
1460 /** | 1460 /** |
1461 * Height of the editor including toolbar. Set to null for automatic | 1461 * Height of the editor including toolbar. Set to null for automatic |
1462 * height | 1462 * height |
1463 * | 1463 * |
1464 * @type {?number} | 1464 * @type {?number} |
1465 */ | 1465 */ |
1466 height: null, | 1466 height: 300, |
1467 | 1467 |
1468 /** | 1468 /** |
1469 * If to allow the editor to be resized | 1469 * If to allow the editor to be resized |
1470 * | 1470 * |
1471 * @type {boolean} | 1471 * @type {boolean} |
5974 | 5974 |
5975 // Add the editor to the container | 5975 // Add the editor to the container |
5976 appendChild(editorContainer, wysiwygEditor); | 5976 appendChild(editorContainer, wysiwygEditor); |
5977 appendChild(editorContainer, sourceEditor); | 5977 appendChild(editorContainer, sourceEditor); |
5978 | 5978 |
5979 // TODO: make this optional somehow | |
5980 base.dimensions( | 5979 base.dimensions( |
5981 options.width || width(original), | 5980 options.width, |
5982 options.height || height(original) | 5981 options.height |
5983 ); | 5982 ); |
5984 | 5983 |
5985 // Add ios to HTML so can apply CSS fix to only it | 5984 // Add ios to HTML so can apply CSS fix to only it |
5986 var className = ios ? ' ios' : ''; | 5985 var className = ios ? ' ios' : ''; |
5987 | 5986 |