|
|
@@ -49,8 +49,8 @@ export const TextFormatTools = (props: TextFormatToolsType): JSX.Element => {
|
|
|
codeMirrorEditor?.insertMarkdownElements(prefix, suffix);
|
|
|
};
|
|
|
|
|
|
- const onClickInsertPrefix = (prefix: string, isContinuous: boolean) => {
|
|
|
- codeMirrorEditor?.insertPrefix(prefix, isContinuous);
|
|
|
+ const onClickInsertPrefix = (prefix: string, noSpaceIfPrefixExists?: boolean) => {
|
|
|
+ codeMirrorEditor?.insertPrefix(prefix, noSpaceIfPrefixExists);
|
|
|
};
|
|
|
|
|
|
return (
|
|
|
@@ -74,16 +74,16 @@ export const TextFormatTools = (props: TextFormatToolsType): JSX.Element => {
|
|
|
<button type="button" className="btn btn-toolbar-button" onClick={() => onClickInsertMarkdownElements('`', '`')}>
|
|
|
<span className="material-symbols-outlined fs-5">code</span>
|
|
|
</button>
|
|
|
- <button type="button" className="btn btn-toolbar-button" onClick={() => onClickInsertPrefix('-', false)}>
|
|
|
+ <button type="button" className="btn btn-toolbar-button" onClick={() => onClickInsertPrefix('-', undefined)}>
|
|
|
<span className="material-symbols-outlined fs-5">format_list_bulleted</span>
|
|
|
</button>
|
|
|
- <button type="button" className="btn btn-toolbar-button" onClick={() => onClickInsertPrefix('1.', false)}>
|
|
|
+ <button type="button" className="btn btn-toolbar-button" onClick={() => onClickInsertPrefix('1.', undefined)}>
|
|
|
<span className="material-symbols-outlined fs-5">format_list_numbered</span>
|
|
|
</button>
|
|
|
- <button type="button" className="btn btn-toolbar-button" onClick={() => onClickInsertPrefix('>', false)}>
|
|
|
+ <button type="button" className="btn btn-toolbar-button" onClick={() => onClickInsertPrefix('>', undefined)}>
|
|
|
<span className="material-symbols-outlined fs-5">block</span>
|
|
|
</button>
|
|
|
- <button type="button" className="btn btn-toolbar-button" onClick={() => onClickInsertPrefix('- [ ]', false)}>
|
|
|
+ <button type="button" className="btn btn-toolbar-button" onClick={() => onClickInsertPrefix('- [ ]', undefined)}>
|
|
|
<span className="material-symbols-outlined fs-5">checklist</span>
|
|
|
</button>
|
|
|
</div>
|