Skip to content

Commit

Permalink
Merge pull request #255 from liruchen32/fix/embedded-typo
Browse files Browse the repository at this point in the history
fix: embeded typo
  • Loading branch information
liruchen32 authored Aug 1, 2024
2 parents 5d801db + e1eab76 commit 032a37e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## 0.9.15-rc.0, 2024/08/01

### Notable Changes

- feat
- add `embededOnly` options for HTML type

### Commits

- [[`80deaf5ddf`](https://github.com/twreporter/keystone/commit/80deaf5ddf)] - **fix**: undo changelog (Lucien)
- [[`22a6de0023`](https://github.com/twreporter/keystone/commit/22a6de0023)] - **fix**: embeded typo (Lucien)

## 0.9.14, 2024/07/17

### Notable Changes
Expand Down
8 changes: 4 additions & 4 deletions fields/types/html/HtmlField.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
InlineStyleButtons,
} from './editor/editor-buttons';
import { Button, FormInput } from 'elemental';
import { ENTITY, ENTITY_SIMPLE, ENTITY_EMBEDEDONLY } from './editor/entities';
import { ENTITY, ENTITY_SIMPLE, ENTITY_EMBEDDEDONLY } from './editor/entities';
import AtomicBlockSwitcher from './editor/base/atomic-block-switcher';
import BlockModifier from './editor/modifiers/index';
import DraftConverter from './editor/draft-converter';
Expand Down Expand Up @@ -345,9 +345,9 @@ module.exports = Field.create({
expandBtnClass = ' expanded';
}

const blockGroup = this.props.embededOnly ? [] : (this.props.simple ? BLOCK_TYPES_SIMPLE : BLOCK_TYPES);
const inlineGroup = this.props.embededOnly ? [] : (this.props.simple ? INLINE_STYLES_SIMPLE : INLINE_STYLES);
const entityGroup = this.props.embededOnly ? ENTITY_EMBEDEDONLY : (this.props.simple ? ENTITY_SIMPLE : ENTITY);
const blockGroup = this.props.embeddedOnly ? [] : (this.props.simple ? BLOCK_TYPES_SIMPLE : BLOCK_TYPES);
const inlineGroup = this.props.embeddedOnly ? [] : (this.props.simple ? INLINE_STYLES_SIMPLE : INLINE_STYLES);
const entityGroup = this.props.embeddedOnly ? ENTITY_EMBEDDEDONLY : (this.props.simple ? ENTITY_SIMPLE : ENTITY);

return (
<div className={outerClassName}>
Expand Down
4 changes: 2 additions & 2 deletions fields/types/html/HtmlType.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function html(list, path, options) {
this.wysiwyg = options.wysiwyg || false;
this.height = options.height || 180;
this.simple = options.simple ? true : false;
this.embededOnly = options.embededOnly ? true : false;
this._properties = ['wysiwyg', 'height', 'simple', 'embededOnly'];
this.embeddedOnly = options.embeddedOnly ? true : false;
this._properties = ['wysiwyg', 'height', 'simple', 'embeddedOnly'];
html.super_.call(this, list, path, options);
}
util.inherits(html, FieldType);
Expand Down
2 changes: 1 addition & 1 deletion fields/types/html/editor/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const ENTITY_SIMPLE = {
},
};

export const ENTITY_EMBEDEDONLY = {
export const ENTITY_EMBEDDEDONLY = {
EMBEDDEDCODE: {
type: 'EMBEDDEDCODE',
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@twreporter/keystone",
"version": "0.9.14",
"version": "0.9.15-rc.0",
"description": "Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 032a37e

Please sign in to comment.