update
This commit is contained in:
@@ -23,6 +23,12 @@ class AppUpdater {
|
||||
}
|
||||
}
|
||||
|
||||
// Enable live reload for all the files inside your project directory
|
||||
// require('electron-reload')(path.join(__dirname, 'src'), {
|
||||
// electron: require(`${__dirname}/node_modules/electron`)
|
||||
// });
|
||||
|
||||
|
||||
let mainWindow: BrowserWindow | null = null;
|
||||
|
||||
ipcMain.on('ipc-example', async (event, arg) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, useRef } from 'react';
|
||||
import { Input } from 'antd';
|
||||
import { Button, Flex } from 'antd'
|
||||
import { Button, Flex } from 'antd';
|
||||
// import Taro from "@tarojs/taro";
|
||||
// import {
|
||||
// View,
|
||||
@@ -11,7 +11,9 @@ import { Button, Flex } from 'antd'
|
||||
// Editor,
|
||||
// Textarea,
|
||||
// } from "@tarojs/components";
|
||||
import './APP.scss';
|
||||
// import './APP.scss';
|
||||
import styles from './App.module.scss';
|
||||
|
||||
// import { AtTabBar } from "taro-ui";
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
// import { AtGrid } from "taro-ui";
|
||||
@@ -229,7 +231,6 @@ renderer.paragraph = function (text) {
|
||||
// return `<p>${text}</p>\n`;
|
||||
// return `<p>${text}</p>`;
|
||||
return `<div>${text}</div>`;
|
||||
|
||||
};
|
||||
renderer.br = function () {
|
||||
return '<br>';
|
||||
@@ -276,9 +277,9 @@ const Index = () => {
|
||||
const copyToClipboard = () => {
|
||||
if (divRef.current) {
|
||||
const htmlContentinnerHTML = divRef.current.innerHTML;
|
||||
console.log('htmlContentinnerHTML',htmlContentinnerHTML)
|
||||
console.log('htmlContentinnerHTML', htmlContentinnerHTML);
|
||||
const htmlContentouterHTML = divRef.current.outerHTML;
|
||||
console.log('htmlContentouterHTML',htmlContentouterHTML)
|
||||
console.log('htmlContentouterHTML', htmlContentouterHTML);
|
||||
|
||||
const htmlContent = divRef.current.innerText;
|
||||
|
||||
@@ -294,32 +295,32 @@ const Index = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="index">
|
||||
<div className="up">
|
||||
<div className="upLeft">
|
||||
<div className={styles.index}>
|
||||
<div className={styles.up}>
|
||||
<div className={styles.upLeft}>
|
||||
{/* <button onClick={copyToClipboard}>Copy to Clipboardl</button> */}
|
||||
</div>
|
||||
<div className="upRight">
|
||||
<div className={styles.upRight}>
|
||||
{/* <button onClick={copyToClipboard}>Copy to Clipboarrd</button> */}
|
||||
{/* <Button type="primary" onClick={copyToClipboard}>复制</Button> */}
|
||||
<Button onClick={copyToClipboard}>复制</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="down">
|
||||
<div className={styles.down}>
|
||||
{' '}
|
||||
<div className="left">
|
||||
<div className={styles.left}>
|
||||
<TextArea
|
||||
// styles="background:#fff;width:100%;min-height:80px;padding:0 30rpx;"
|
||||
className="TextArea"
|
||||
className={styles.TextArea}
|
||||
autoFocus
|
||||
allowClear
|
||||
onChange={onInput}
|
||||
showCount
|
||||
/>
|
||||
</div>
|
||||
<div className="right">
|
||||
<div className={styles.right}>
|
||||
<div
|
||||
className="rightHtml"
|
||||
className={styles.rightHtml}
|
||||
ref={divRef}
|
||||
dangerouslySetInnerHTML={{ __html: marked(markText) }}
|
||||
></div>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import App from './App';
|
||||
|
||||
// "nodemon": "nodemon --watch src --ext tsx,js,json,scss,css --exec \"yarn start\""
|
||||
|
||||
const container = document.getElementById('root') as HTMLElement;
|
||||
const root = createRoot(container);
|
||||
root.render(<App />);
|
||||
|
||||
Reference in New Issue
Block a user