changeset 14:0cb206904499

formats set default format
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 07 Aug 2022 14:58:42 -0600
parents 8d32537e0ca7
children ea930990b601
files src/changes.txt src/examples/min.html src/examples/modified.html src/formats/bbcode.js src/formats/xhtml.js
diffstat 5 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/changes.txt	Sun Aug 07 14:28:14 2022 -0600
+++ b/src/changes.txt	Sun Aug 07 14:58:42 2022 -0600
@@ -1,6 +1,8 @@
 changes, most recent at top
 
 
+Formats set default format so the "format" option isn't needed.
+
 Allow selector for textarea.
 
 CSS cleanup.  Avoiding CSS includes is wrong for the same reason that minification is wrong.
--- a/src/examples/min.html	Sun Aug 07 14:28:14 2022 -0600
+++ b/src/examples/min.html	Sun Aug 07 14:58:42 2022 -0600
@@ -13,7 +13,6 @@
 		<script>
 			function init() {
 				sceditor.create('textarea', {
-					format: 'bbcode',
 				});
 			}
 		</script>
--- a/src/examples/modified.html	Sun Aug 07 14:28:14 2022 -0600
+++ b/src/examples/modified.html	Sun Aug 07 14:58:42 2022 -0600
@@ -72,7 +72,6 @@
 
 		<script>
 			sceditor.create('#example', {
-				format: 'bbcode',
 			});
 
 
--- a/src/formats/bbcode.js	Sun Aug 07 14:28:14 2022 -0600
+++ b/src/formats/bbcode.js	Sun Aug 07 14:58:42 2022 -0600
@@ -2683,4 +2683,5 @@
 
 	sceditor.formats.bbcode = bbcodeFormat;
 	sceditor.BBCodeParser = BBCodeParser;
+	sceditor.defaultOptions.format = 'bbcode';
 }(sceditor));
--- a/src/formats/xhtml.js	Sun Aug 07 14:28:14 2022 -0600
+++ b/src/formats/xhtml.js	Sun Aug 07 14:58:42 2022 -0600
@@ -1266,4 +1266,5 @@
 	xhtmlFormat.allowedEmptyTags = [];
 
 	sceditor.formats.xhtml = xhtmlFormat;
+	sceditor.defaultOptions.format = 'xhtml';
 }(sceditor));