@ -1,4 +1,5 @@
import Component from './ComponentText';
import { toLowerCase } from 'utils/mixins';
export default Component.extend(
{
@ -23,9 +24,8 @@ export default Component.extend(
isComponent(el) {
let result;
let avoidEdit;
if (el.tagName == 'A') {
if (toLowerCase(el.tagName) === 'a') {
result = {
type: 'link',
editable: 0
@ -33,7 +33,11 @@ describe('Component Types', () => {
});
test('<label> is correctly recognized', () => {
expectedType('<label>Hello</label>', 'label');
expectedType('<label attr-test="value">Hello</label>', 'label');
test('<a> is correctly recognized', () => {
expectedType('<a href="/link">link</a>', 'link');
test('<script> is correctly recognized', () => {