Skip to content

Commit 2acdfe0

Browse files
author
Ajit Kumar
committed
fix: streamline supported_editor options in publishPlugin and plugin API
1 parent ac99333 commit 2acdfe0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

client/pages/publishPlugin/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,7 @@ export default async function PublishPlugin({ mode = 'publish', id }) {
115115
<td>
116116
<select name='supported_editor' id='editor_type' value={plugin?.supported_editor || 'cm'}>
117117
<option value='ace'>Ace</option>
118-
<option value='cm'>
119-
CodeMirror
120-
</option>
118+
<option value='cm'>CodeMirror</option>
121119
<option value='all'>Both</option>
122120
</select>
123121
</td>

server/apis/plugin.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ router.get('{/:pluginId}', async (req, res) => {
271271

272272
if (supported_editor && ['ace', 'cm', 'all'].includes(supported_editor)) {
273273
where.push([Plugin.SUPPORTED_EDITOR, supported_editor]);
274+
} else {
275+
where.push([Plugin.SUPPORTED_EDITOR, 'all'], 'OR', [Plugin.SUPPORTED_EDITOR, 'ace']);
274276
}
275277
}
276278

0 commit comments

Comments
 (0)