Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test site with all input elements #13

Closed
rugk opened this issue Nov 29, 2020 · 5 comments
Closed

Test site with all input elements #13

rugk opened this issue Nov 29, 2020 · 5 comments
Labels
community Not directly related to the prohect/the software, but related to community management, GitHub etc.

Comments

@rugk
Copy link
Owner

rugk commented Nov 29, 2020

Is there a test/reference site with all input elements as mentioned in #9 (comment)?

If not, we could create a simple one.

My aim is also to include this in the bug report templates so that people could test whether it works in all fields to say more exactly what is broken without us needing to ask again.

@rugk rugk added the community Not directly related to the prohect/the software, but related to community management, GitHub etc. label Nov 29, 2020
@tdulcet
Copy link
Collaborator

tdulcet commented Nov 30, 2020

Is there a test/reference site with all input elements

My demo from rugk/awesome-emoji-picker#66 includes the three input types, although I would not recommend using that with this add-on enabled, as they will likely interfere with each other.

If not, we could create a simple one.

If you wanted to create a new website, the HTML is very simple (this is adapted from my demo):

<h3>Input</h3>
<input type="text">

<h3>Textarea</h3>
<textarea></textarea>

<h3>ContentEditable Div</h3>
<div contenteditable="true">This text can be edited by the user.<br>
	Some <strong>bold</strong> and <em>italic and <strong>bold</strong></em> text.</div>

@rugk
Copy link
Owner Author

rugk commented Mar 25, 2021

We have that website on https://rugk.github.io/unicodify/ now.

@tdulcet
Copy link
Collaborator

tdulcet commented Jul 26, 2022

@rugk - Here is an updated version that supports better simulating Thunderbird:

<h3>Input</h3>
<input type="text">

<h3>Textarea</h3>
<textarea></textarea>

<h3>ContentEditable Div</h3>
<fieldset>
	<legend>Select a Paragraph Separator:</legend>

	<div>
		<input type="radio" id="div" name="separator" value="div" checked>
		<label for="div">Div (Modern Firefox/Chromium browser default)</label>
	</div>

	<div>
		<input type="radio" id="p" name="separator" value="p">
		<label for="p">Paragraph (Thunderbird default)</label>
	</div>

	<div>
		<input type="radio" id="louie" name="separator" value="br">
		<label for="br">Line Break (Thunderbird's "Body text" mode, Firefox only)</label>
	</div>
</fieldset>
<br>
<div contenteditable="true">This text can be edited by the user.<br>
	Some <strong>bold</strong> and <em>italic and <strong>bold</strong></em> text.</div>
<script>
	"use strict";

	const separators = Array.from(document.getElementsByName("separator"));

	function toggle() {
		const separator = separators.find((r) => r.checked).value;
		console.log("Separator", separator);
		document.execCommand("defaultParagraphSeparator", false, separator);
	}

	window.addEventListener('load', toggle);

	for (const radio of separators) {
		radio.addEventListener('change', toggle);
	}
</script>

@rugk
Copy link
Owner Author

rugk commented Jul 27, 2022

@tdulcet just push it to the gh-pages branch. 🙃

Note you may also want to edit the issue templates accordingly…

@tdulcet
Copy link
Collaborator

tdulcet commented Jul 28, 2022

Nice, I was wondering how you created that page. I pushed the changes in 8cc7ccd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Not directly related to the prohect/the software, but related to community management, GitHub etc.
Projects
None yet
Development

No branches or pull requests

2 participants