梦幻二次元提示词:像点菜一样拼出壁纸级角色
<div class="ce-block ce-block--focused" data-id="jJCBtreZS1" ><div class="ce-block__content">
<div class="cdx-block image-tool image-tool--filled ">
<div class="image-tool__image">
<div class="image-tool__image-preloader" style=""></div>
<img id="aimg_jJCBtreZS1" class="image-tool__image-picture _zoom" src="https://bbs.gpt.com.cn/data/attachment/forum/202606/30/173827os2mhmkha5h22pbn.jpg" title="" alt="" data-aid="290"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="d7uYsu06RI" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><span md-inline="plain" class="md-plain" style="box-sizing: border-box;">用AI画二次元的时候,每次都要从头写一大段提示词,换个发色就得重新写提示词,太累。</span></div>
</div>
</div><div class="ce-block ce-block--focused" data-id="790HaTK363" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><span md-inline="plain" class="md-plain" style="box-sizing: border-box;">想想这个画面:月光银发、水晶蓝眼、飘逸白裙,一个仙气十足的少女站在柔光里。这种图不用你写提示词——从下面五个列表里各挑一个,拼在一起就行。</span></div>
</div>
</div><div class="ce-block" data-id="OHlCSWu6bl" >
<div class="ce-block__content" style="">
<h2 class="ce-header ce-header--left">能用在哪?</h2>
</div>
</div><div class="ce-block ce-block--focused" data-id="At4rrOdEqI" >
<div class="ce-block__content">
<ul class="cdx-list-unordered"><li class="cdx-list__item"><span md-inline="strong" class="md-pair-s " style="box-sizing: border-box;"><span md-inline="plain" class="md-plain" style="box-sizing: border-box;"><b>手机壁纸</b></span></span><span md-inline="plain" class="md-plain" style="box-sizing: border-box;">:仙气发色配柔光,每次解锁都好看</span></li><li class="cdx-list__item"><span md-inline="strong" class="md-pair-s " style="box-sizing: border-box;"><span md-inline="plain" class="md-plain" style="box-sizing: border-box;"><b>小说或游戏立绘</b></span></span><span md-inline="plain" class="md-plain" style="box-sizing: border-box;">:仙侠、奇幻、异世界题材直接用</span></li><li class="cdx-list__item"><span md-inline="strong" class="md-pair-s " style="box-sizing: border-box;"><span md-inline="plain" class="md-plain" style="box-sizing: border-box;"><b>自媒体封面</b></span></span><span md-inline="plain" class="md-plain" style="box-sizing: border-box;">:小红书、B站发二次元内容,梦幻风封面点击率高</span></li><li class="cdx-list__item"><span md-inline="strong" class="md-pair-s " style="box-sizing: border-box;"><span md-inline="plain" class="md-plain" style="box-sizing: border-box;"><b>二次元头像</b></span></span><span md-inline="plain" class="md-plain" style="box-sizing: border-box;">:换上这种头像,在哪都抢眼</span></li></ul>
</div>
</div><div class="ce-block" data-id="SA8YHqyiXo" >
<div class="ce-block__content" style="">
<h2 class="ce-header ce-header--left">怎么拼?</h2>
</div>
</div><div class="ce-block ce-block--focused" data-id="2mtnfHrd-5" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><span md-inline="plain" class="md-plain" style="box-sizing: border-box;">五个列表,每个选一项,按顺序拼成一句话,复制到豆包发送就行。</span></div>
</div>
</div><div class="ce-block" data-id="cKjxCqDFOp" >
<div class="ce-block__content" style="">
<h3 class="ce-header ce-header--left">角色(选一个)</h3>
</div>
</div><div class="ce-block ce-block--focused" data-id="np9bI40aKl" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><span role="presentation" style="box-sizing: border-box; padding-right: 0.1px;">梦幻女性 / 空灵女性 / 奇幻美人 / 浪漫女主角 / 优雅女性 / 迷人女性 / 精致如梦的女性 / 轻盈优雅的女性 / 温柔的奇幻女性 / 天穹般的美人</span></div>
</div>
</div><div class="ce-block" data-id="LYQ6AulIBA" >
<div class="ce-block__content" style="">
<h3 class="ce-header ce-header--left">发型(选一个)</h3>
</div>
</div><div class="ce-block ce-block--focused" data-id="tLDVKxeCLV" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><span role="presentation" style="box-sizing: border-box; padding-right: 0.1px;">月光银色长发 / 珍珠金色波浪长发 / 薰衣草色及腰长发 / 粉色丝滑长发 / 冰蓝色松散卷发 / 玫瑰金色波浪发 / 淡丁香色层次长发 / 香槟金色飘逸卷发 / 暮光紫色长发 / 星光银色长发</span></div>
</div>
</div><div class="ce-block" data-id="9ongYx1bvu" >
<div class="ce-block__content" style="">
<h3 class="ce-header ce-header--left">眼睛(选一个)</h3>
</div>
</div><div class="ce-block ce-block--focused" data-id="6PFtC4JfbR" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><span role="presentation" style="box-sizing: border-box; padding-right: 0.1px;">水晶蓝色眼睛 / 紫水晶色眼睛 / 月光银色眼睛 / 玫瑰石英色眼睛 / 薰衣草色眼睛 / 香槟金色眼睛 / 冰蓝色眼睛 / 欧泊灰色眼睛 / 蓝宝石蓝眼睛 / 梦幻绿松石色眼睛</span></div>
</div>
</div><div class="ce-block" data-id="_oDQHqDOgW" >
<div class="ce-block__content" style="">
<h3 class="ce-header ce-header--left">服装(选一个)</h3>
</div>
</div><div class="ce-block ce-block--focused" data-id="mLweK9_Y7m" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><span role="presentation" style="box-sizing: border-box; padding-right: 0.1px;">象牙白雪纺连衣裙带半透明袖子 / 薰衣草色露肩连衣裙配丝带腰饰 / 白色缎面吊带上衣搭配珍珠色长裙 / 月光银色吊带裙外搭半透明开衫 / 薄荷色连衣裙配金色点缀裙摆 / 白色挂脖连衣裙配半透明披肩 / 玫瑰米色露肩针织上衣配飘逸长裙 / 雾蓝色上衣配层叠薄纱裙 / 雾玫瑰色连衣裙配荷叶边袖子 / 淡金色针织上衣配缎面半裙</span></div>
</div>
</div><div class="ce-block" data-id="NReuPSrQwQ" >
<div class="ce-block__content" style="">
<h3 class="ce-header ce-header--left">姿势(选一个)</h3>
</div>
</div><div class="ce-block ce-block--focused" data-id="H6OPOaNCMY" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><span role="presentation" style="box-sizing: border-box; padding-right: 0.1px;">一只手轻触头发,另一只手臂自然垂在身侧 / 一只手轻轻提起裙摆,另一只手臂放松下垂 / 一只手放在锁骨附近,另一只手柔和下垂 / 一只手触碰腰间丝带,另一只手在裙摆旁 / 一只手将头发拢到耳后,另一只手臂放松 / 一只手轻触脸颊,另一只手臂下垂 / 一只手轻扶披肩边缘,另一只手放在腰间 / 一只手轻拂肩头,另一只手收拢裙摆 / 一只手轻搭腰间,另一只手触碰裙摆层次 / 一只手拂头发过肩,另一只手臂放松</span></div>
</div>
</div><div class="ce-block" data-id="oA6gcR8fi4" >
<div class="ce-block__content" style="">
<h2 class="ce-header ce-header--left">三组现成搭配</h2>
</div>
</div><div class="ce-block ce-block--focused" data-id="tKN6RWZmva" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><span md-inline="plain" class="md-plain" style="box-sizing: border-box;">不想自己挑?直接复制下面任意一组到豆包:</span></div>
</div>
</div><div class="ce-block" data-id="jB4eN6Xt-T" >
<div class="ce-block__content" style="">
<h3 class="ce-header ce-header--left">仙气银月</h3>
</div>
</div><div class="ce-block ce-block--focused" data-id="qY5MI4B-Pm" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">markdown</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-qY5MI4B-Pm">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-qY5MI4B-Pm">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-qY5MI4B-Pm" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-qY5MI4B-Pm">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?IpV"></script>
<script type="application/javascript">
const editorElem1784131191IYDmC = document.getElementById('codeflask-qY5MI4B-Pm');
var isCollapsed1784131191IYDmC = true;
const flask1784131191IYDmC = new CodeFlask(editorElem1784131191IYDmC, {
language: 'markdown',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1784131191IYDmC = `9:16竖版,二次元插画风格,精致细腻画风,高清细节。画面主体是一位梦幻女性,重点突出上半身与面容。她拥有水晶蓝色眼睛,眼神清澈空灵,带有仙气。她留着月光银色长发,发丝柔顺有光泽,随风轻扬。她身穿象牙白雪纺连衣裙,带有半透明袖子,气质飘逸梦幻。她一只手轻触头发,另一只手臂自然垂在身侧,姿态轻盈。背景简约纯净,柔和光影,氛围梦幻迷人。`;
code1784131191IYDmC = code1784131191IYDmC.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1784131191IYDmC.addLanguage('markdown', Prism.languages['markdown']);
flask1784131191IYDmC.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1784131191IYDmC.updateCode(code1784131191IYDmC);
const currentCode1784131191IYDmC = flask1784131191IYDmC.getCode();
var coderow1784131191IYDmC = parseInt('');
if (coderow1784131191IYDmC === undefined || coderow1784131191IYDmC !== coderow1784131191IYDmC || coderow1784131191IYDmC === 0) {
coderow1784131191IYDmC = flask1784131191IYDmC.lineNumber;
}
if (coderow1784131191IYDmC < 20) {
editorElem1784131191IYDmC.parentElement.style.height = '300px';
editorElem1784131191IYDmC.style.height = '300px';
} else if (coderow1784131191IYDmC >= 20) {
editorElem1784131191IYDmC.parentElement.style.height = '500px';
editorElem1784131191IYDmC.style.height = '500px';
}
//console.log({currentCode1784131191IYDmC})
const copyBtn1784131191IYDmC = document.getElementById('codeflask-copy-qY5MI4B-Pm');
copyBtn1784131191IYDmC.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1784131191IYDmC).then(function() {
// 复制成功提示
const originalText = copyBtn1784131191IYDmC.innerHTML;
copyBtn1784131191IYDmC.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1784131191IYDmC.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1784131191IYDmC);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1784131191IYDmC);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1784131191IYDmC.innerHTML;
copyBtn1784131191IYDmC.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1784131191IYDmC.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1784131191IYDmC = document.getElementById('codeflask-bottomBtn-qY5MI4B-Pm');
const Toggle1784131191IYDmC = document.getElementById('codeflask-Toggle-qY5MI4B-Pm');
bottomBtn1784131191IYDmC.addEventListener('click', function() {
if (isCollapsed1784131191IYDmC) {
// 展开代码
isCollapsed1784131191IYDmC = false;
const codeElement1784131191IYDmC = editorElem1784131191IYDmC.querySelector('.codeflask__code');
if (codeElement1784131191IYDmC) {
const actualHeight1784131191IYDmC = codeElement1784131191IYDmC.scrollHeight + 20;
editorElem1784131191IYDmC.parentElement.style.height = actualHeight1784131191IYDmC + 'px';
editorElem1784131191IYDmC.style.height = actualHeight1784131191IYDmC + 'px';
}
bottomBtn1784131191IYDmC.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1784131191IYDmC.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1784131191IYDmC = true;
if (coderow1784131191IYDmC < 20) {
editorElem1784131191IYDmC.parentElement.style.height = '300px';
editorElem1784131191IYDmC.style.height = '300px';
} else if (coderow1784131191IYDmC >= 20) {
editorElem1784131191IYDmC.parentElement.style.height = '500px';
editorElem1784131191IYDmC.style.height = '500px';
}
bottomBtn1784131191IYDmC.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1784131191IYDmC.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1784131191IYDmC.addEventListener('click', function() {
bottomBtn1784131191IYDmC.click();
});
</script><div class="ce-block" data-id="NT6jR8962_" >
<div class="ce-block__content" style="">
<h3 class="ce-header ce-header--left">暮光紫梦</h3>
</div>
</div><div class="ce-block ce-block--focused" data-id="FrPxHLJ8YW" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">markdown</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-FrPxHLJ8YW">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-FrPxHLJ8YW">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-FrPxHLJ8YW" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-FrPxHLJ8YW">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?IpV"></script>
<script type="application/javascript">
const editorElem1784131191xI98x = document.getElementById('codeflask-FrPxHLJ8YW');
var isCollapsed1784131191xI98x = true;
const flask1784131191xI98x = new CodeFlask(editorElem1784131191xI98x, {
language: 'markdown',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1784131191xI98x = `9:16竖版,二次元插画风格,精致细腻画风,高清细节。画面主体是一位空灵女性,重点突出上半身与面容。她拥有紫水晶色眼睛,眼神深邃神秘,带有空灵感。她留着暮光紫色长发,发丝柔顺有光泽,随风轻扬。她身穿薰衣草色露肩连衣裙,搭配柔和丝带腰饰,气质空灵优雅。她一只手轻轻提起裙摆,另一只手臂放松下垂,姿态从容。背景简约纯净,冷色调光影,氛围神秘空灵。`;
code1784131191xI98x = code1784131191xI98x.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1784131191xI98x.addLanguage('markdown', Prism.languages['markdown']);
flask1784131191xI98x.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1784131191xI98x.updateCode(code1784131191xI98x);
const currentCode1784131191xI98x = flask1784131191xI98x.getCode();
var coderow1784131191xI98x = parseInt('');
if (coderow1784131191xI98x === undefined || coderow1784131191xI98x !== coderow1784131191xI98x || coderow1784131191xI98x === 0) {
coderow1784131191xI98x = flask1784131191xI98x.lineNumber;
}
if (coderow1784131191xI98x < 20) {
editorElem1784131191xI98x.parentElement.style.height = '300px';
editorElem1784131191xI98x.style.height = '300px';
} else if (coderow1784131191xI98x >= 20) {
editorElem1784131191xI98x.parentElement.style.height = '500px';
editorElem1784131191xI98x.style.height = '500px';
}
//console.log({currentCode1784131191xI98x})
const copyBtn1784131191xI98x = document.getElementById('codeflask-copy-FrPxHLJ8YW');
copyBtn1784131191xI98x.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1784131191xI98x).then(function() {
// 复制成功提示
const originalText = copyBtn1784131191xI98x.innerHTML;
copyBtn1784131191xI98x.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1784131191xI98x.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1784131191xI98x);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1784131191xI98x);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1784131191xI98x.innerHTML;
copyBtn1784131191xI98x.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1784131191xI98x.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1784131191xI98x = document.getElementById('codeflask-bottomBtn-FrPxHLJ8YW');
const Toggle1784131191xI98x = document.getElementById('codeflask-Toggle-FrPxHLJ8YW');
bottomBtn1784131191xI98x.addEventListener('click', function() {
if (isCollapsed1784131191xI98x) {
// 展开代码
isCollapsed1784131191xI98x = false;
const codeElement1784131191xI98x = editorElem1784131191xI98x.querySelector('.codeflask__code');
if (codeElement1784131191xI98x) {
const actualHeight1784131191xI98x = codeElement1784131191xI98x.scrollHeight + 20;
editorElem1784131191xI98x.parentElement.style.height = actualHeight1784131191xI98x + 'px';
editorElem1784131191xI98x.style.height = actualHeight1784131191xI98x + 'px';
}
bottomBtn1784131191xI98x.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1784131191xI98x.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1784131191xI98x = true;
if (coderow1784131191xI98x < 20) {
editorElem1784131191xI98x.parentElement.style.height = '300px';
editorElem1784131191xI98x.style.height = '300px';
} else if (coderow1784131191xI98x >= 20) {
editorElem1784131191xI98x.parentElement.style.height = '500px';
editorElem1784131191xI98x.style.height = '500px';
}
bottomBtn1784131191xI98x.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1784131191xI98x.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1784131191xI98x.addEventListener('click', function() {
bottomBtn1784131191xI98x.click();
});
</script><div class="ce-block" data-id="8zXcNaU3xG" >
<div class="ce-block__content" style="">
<h3 class="ce-header ce-header--left">玫瑰金韵</h3>
</div>
</div><div class="ce-block ce-block--focused" data-id="ayp8Y_1CSq" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">markdown</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-ayp8Y_1CSq">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-ayp8Y_1CSq">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-ayp8Y_1CSq" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-ayp8Y_1CSq">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?IpV"></script>
<script type="application/javascript">
const editorElem1784131191iLftU = document.getElementById('codeflask-ayp8Y_1CSq');
var isCollapsed1784131191iLftU = true;
const flask1784131191iLftU = new CodeFlask(editorElem1784131191iLftU, {
language: 'markdown',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1784131191iLftU = `9:16竖版,二次元插画风格,精致细腻画风,高清细节。画面主体是一位浪漫女主角,重点突出上半身与面容。她拥有玫瑰石英色眼睛,眼神温柔浪漫,带有少女感。她留着玫瑰金色波浪发,发丝柔顺有光泽,随风轻扬。她身穿玫瑰米色露肩针织上衣,搭配飘逸长裙,气质温柔浪漫。她一只手轻搭腰间,另一只手触碰裙摆层次,姿态优雅。背景简约纯净,暖色光影,氛围浪漫迷人。`;
code1784131191iLftU = code1784131191iLftU.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1784131191iLftU.addLanguage('markdown', Prism.languages['markdown']);
flask1784131191iLftU.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1784131191iLftU.updateCode(code1784131191iLftU);
const currentCode1784131191iLftU = flask1784131191iLftU.getCode();
var coderow1784131191iLftU = parseInt('');
if (coderow1784131191iLftU === undefined || coderow1784131191iLftU !== coderow1784131191iLftU || coderow1784131191iLftU === 0) {
coderow1784131191iLftU = flask1784131191iLftU.lineNumber;
}
if (coderow1784131191iLftU < 20) {
editorElem1784131191iLftU.parentElement.style.height = '300px';
editorElem1784131191iLftU.style.height = '300px';
} else if (coderow1784131191iLftU >= 20) {
editorElem1784131191iLftU.parentElement.style.height = '500px';
editorElem1784131191iLftU.style.height = '500px';
}
//console.log({currentCode1784131191iLftU})
const copyBtn1784131191iLftU = document.getElementById('codeflask-copy-ayp8Y_1CSq');
copyBtn1784131191iLftU.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1784131191iLftU).then(function() {
// 复制成功提示
const originalText = copyBtn1784131191iLftU.innerHTML;
copyBtn1784131191iLftU.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1784131191iLftU.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1784131191iLftU);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1784131191iLftU);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1784131191iLftU.innerHTML;
copyBtn1784131191iLftU.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1784131191iLftU.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1784131191iLftU = document.getElementById('codeflask-bottomBtn-ayp8Y_1CSq');
const Toggle1784131191iLftU = document.getElementById('codeflask-Toggle-ayp8Y_1CSq');
bottomBtn1784131191iLftU.addEventListener('click', function() {
if (isCollapsed1784131191iLftU) {
// 展开代码
isCollapsed1784131191iLftU = false;
const codeElement1784131191iLftU = editorElem1784131191iLftU.querySelector('.codeflask__code');
if (codeElement1784131191iLftU) {
const actualHeight1784131191iLftU = codeElement1784131191iLftU.scrollHeight + 20;
editorElem1784131191iLftU.parentElement.style.height = actualHeight1784131191iLftU + 'px';
editorElem1784131191iLftU.style.height = actualHeight1784131191iLftU + 'px';
}
bottomBtn1784131191iLftU.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1784131191iLftU.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1784131191iLftU = true;
if (coderow1784131191iLftU < 20) {
editorElem1784131191iLftU.parentElement.style.height = '300px';
editorElem1784131191iLftU.style.height = '300px';
} else if (coderow1784131191iLftU >= 20) {
editorElem1784131191iLftU.parentElement.style.height = '500px';
editorElem1784131191iLftU.style.height = '500px';
}
bottomBtn1784131191iLftU.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1784131191iLftU.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1784131191iLftU.addEventListener('click', function() {
bottomBtn1784131191iLftU.click();
});
</script><style type="text/css">
.ce-block {
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
}
.image-tool {
--bg-color: #cdd1e0;
--front-color: #388ae5;
--border-color: #e8e8eb;
}
.image-tool__image {
border-radius: 3px;
overflow: hidden;
margin-bottom: 10px;
}
.image-tool__image-picture {
max-width: 100%;
vertical-align: bottom;
display: block;
margin-left: auto;
margin-right: auto;
}
.image-tool__image-preloader {
width: 50px;
height: 50px;
border-radius: 50%;
background-size: cover;
margin: auto;
position: relative;
background-color: #cdd1e0;
background-position: center center;
}
.image-tool__image-preloader::after {
content: "";
position: absolute;
z-index: 3;
width: 60px;
height: 60px;
border-radius: 50%;
border: 2px solid #cdd1e0;
border-top-color: #388ae5;
left: 50%;
top: 50%;
margin-top: -30px;
margin-left: -30px;
animation: image-preloader-spin 2s infinite linear;
box-sizing: border-box;
}
.image-tool__caption::before {
position: absolute !important;
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
display: none;
}
.image-tool__caption:empty::before {
display: block;
}
.image-tool__caption:empty:focus::before {
display: none;
}
.image-tool--empty .image-tool__image {
display: none;
}
.image-tool--empty .image-tool__caption, .image-tool--loading .image-tool__caption {
display: none;
}
.image-tool .cdx-button {
display: flex;
align-items: center;
justify-content: center;
}
.image-tool .cdx-button svg {
height: auto;
margin: 0 6px 0 0;
}
.image-tool--filled .cdx-button {
display: none;
}
.image-tool--filled .image-tool__image-preloader {
display: none;
}
.image-tool--loading .image-tool__image {
min-height: 200px;
display: flex;
border: 1px solid #e8e8eb;
background-color: #fff;
}
.image-tool--loading .image-tool__image-picture {
display: none;
}
.image-tool--loading .cdx-button {
display: none;
}
/**
* Tunes
* ----------------
*/
.image-tool--withBorder .image-tool__image {
border: 1px solid #e8e8eb;
}
.image-tool--withBackground .image-tool__image {
padding: 15px;
background: #cdd1e0;
}
.image-tool--withBackground .image-tool__image-picture {
max-width: 60%;
margin: 0 auto;
}
.image-tool--stretched .image-tool__image-picture {
width: 100%;
}
.image-tool__caption {
text-align: center;
font-size: 14px;
color: #a3a3a3;
}
@keyframes image-preloader-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style><style type="text/css">
.ce-block {
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
}
.ce-paragraph {
line-height: 1.6em;
outline: none;
text-indent: 2em;
font-size: 16px;
}
.ce-paragraph--right {
text-align: right;
}
.ce-paragraph--center {
text-align: center;
}
.ce-paragraph--left {
text-align: left;
}
.ce-paragraph--justify {
text-align: justify;
}
.ce-paragraph-text-indent {
text-align: justify;
}
.ce-paragraph:empty::before{
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
opacity: 0;
}
/** Show placeholder at the first paragraph if Editor is empty */
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty::before {
opacity: 1;
}
.codex-editor--toolbox-opened .ce-block:first-child .ce-paragraph:empty::before,
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty:focus::before {
opacity: 0;
}
.ce-paragraph p:first-of-type{
margin-top: 0;
}
.ce-paragraph p:last-of-type{
margin-bottom: 0;
}
.svg-icon {
width: 1em;
height: 1em;
}
.svg-icon path,
.svg-icon polygon,
.svg-icon rect {
fill: #4691f6;
}
.svg-icon circle {
stroke: #4691f6;
stroke-width: 1;
}
</style><style type="text/css">
.ce-block {
margin-top: 20px;
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
}
/**
* Plugin styles
*/
.ce-header {
position: relative;
padding: 1px 0px 1px 15px;
margin: 0;
line-height: 1.25em;
outline: none;
margin-bottom: 10px;
}
.ce-header p,
.ce-header div {
padding: 0 !important;
margin: 0 !important;
}
.ce-header::before {
content: "";
background-color: #3e8fe3;
width: 6px;
height: 100%;
position: absolute;
left: 0;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
/**
* Styles for Plugin icon in Toolbar
*/
.ce-header__icon {
}
.ce-header::before {
position: absolute;
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
display: none;
cursor: text;
}
.ce-header:empty::before {
display: block;
}
.ce-header:empty:focus::before {
display: none;
}
/* FontSize */
h1.ce-header {
font-size: 2.0em;
}
h2.ce-header {
font-size: 1.7em;
}
h3.ce-header {
font-size: 1.4em;
}
h4.ce-header {
font-size: 1.15em;
}
h5.ce-header {
font-size: 0.95em;
}
h6.ce-header {
font-size: 0.8em;
}
/* Alignment*/
.ce-header--right {
text-align: right;
}
.ce-header--center {
text-align: center;
}
.ce-header--left {
text-align: left;
}
.ce-header--justify {
text-align: justify;
}
</style><style type="text/css">
.ce-block {
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
}
.cdx-list {
margin:0;
outline:none;
display:block;
counter-reset:item;
padding:6px;
}
.cdx-list__item {
line-height:1.45em;
display:block;
padding-top:8px;
margin-left: 2em;
}
.cdx-list__item-children {
display:block;
}
.cdx-list__item {
outline:none
}
.cdx-list__item-content {
word-break:break-word;
white-space:pre-wrap;
grid-area:content;
padding-left:8px
}
.cdx-list__item:before {
counter-increment:item;
white-space:nowrap
}
.cdx-list-li-container {
display: flex;
}
.cdx-list-ordered .cdx-list__item:before {
/* content:counters(item,".",numeric) "." */
}
.cdx-list-ordered {
list-style-type: none;
margin-left: -15px;
counter-reset:item;
font-size: 16px;
}
.cdx-list-unordered {
font-size: 16px;
}
.cdx-list-unordered .cdx-list__item:before {
content:"•"
}
.cdx-list-checklist .cdx-list__item:before {
content:""
}
.cdx-list__settings .cdx-settings-button {
width:50%
}
.cdx-list__checkbox {
padding-top:calc((1.45em - 1.2em) / 2);
grid-area:checkbox;
width:1.2em;
height:1.2em;
display:flex;
cursor:pointer;
font-size: 16px;
}
.cdx-list__checkbox svg {
opacity:0;
height:1.2em;
width:1.2em;
left:-1px;
top:-1px;
position:absolute
}
@media (hover:hover) {
.cdx-list__checkbox:not(.cdx-list__checkbox--no-hover):hover .cdx-list__checkbox-check svg {
opacity:1
}
}.cdx-list__checkbox--checked-1 {
line-height:1.45em
}
@media (hover:hover) {
.cdx-list__checkbox--checked-1:not(.cdx-list__checkbox--checked-1--no-hover):hover .cdx-checklist__checkbox-check {
background:#0059AB;
border-color:#0059AB
}
}.cdx-list__checkbox--checked-1 .cdx-list__checkbox-check {
background:#369FFF;
border-color:#369FFF
}
.cdx-list__checkbox--checked-1 .cdx-list__checkbox-check svg {
opacity:1
}
.cdx-list__checkbox--checked-1 .cdx-list__checkbox-check svg path {
stroke:#fff
}
.cdx-list__checkbox--checked-1 .cdx-list__checkbox-check:before {
opacity:0;
visibility:visible;
transform:scale(2.5)
}
.cdx-list__checkbox-check {
cursor:pointer;
display:inline-block;
position:relative;
margin:0 auto;
width:1.2em;
height:1.2em;
box-sizing:border-box;
border-radius:5px;
border:1px solid #C9C9C9;
background:#fff
}
.cdx-list__checkbox-check:before {
content:"";
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
border-radius:100%;
background-color:#369FFF;
visibility:hidden;
pointer-events:none;
transform:scale(1);
transition:transform .4s ease-out,opacity .4s
}
.cdx-list__checkbox-check--disabled {
pointer-events:none
}
.cdx-list-start-with-field {
background:#F8F8F8;
border:1px solid rgba(226,226,229,.2);
border-radius:6px;
padding:2px;
display:grid;
grid-template-columns:auto auto 1fr;
grid-template-rows:auto
}
.cdx-list-start-with-field--invalid {
background:#FFECED;
border:1px solid #E13F3F
}
.cdx-list-start-with-field--invalid .cdx-list-start-with-field__input {
color:#e13f3f
}
.cdx-list-start-with-field__input {
font-size:16px;
outline:none;
font-weight:500;
font-family:inherit;
border:0;
background:transparent;
margin:0;
padding:0;
line-height:22px;
min-width:calc(100% - 10px)
}
.cdx-list-start-with-field__input::placeholder {
color:#797979;
font-weight:500
}
</style><style type="text/css">
.ce-block {
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
position: relative;
}
/* 主容器 */
.editorjs-codeFlask_Wrapper {
border: 1px solid #dcdfe6;
border-radius: 5px;
background-color: #f6f8fa;
margin-bottom: 10px;
position: relative;
transition: all 0.3s ease;
width: 100%;
min-height: 100px;
overflow: hidden;
}
/* 标题栏 */
.editorjs-codeFlask_Header {
display: flex;
justify-content: flex-end;
align-items: center;
padding: 8px 12px;
background-color: #e9ecef;
border-bottom: 1px solid #dcdfe6;
position: relative;
z-index: 0; /* 从10降低到2 */
}
/* 语言显示 */
.editorjs-codeFlask_LangDisplay {
padding: 2px 8px;
background-color: #409eff;
color: white;
border-radius: 3px;
font-size: 12px;
font-weight: 500;
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
}
/* 内容容器 - 禁止纵向滚动 */
.editorjs-codeFlask_ContentContainer {
position: relative;
min-height: 100px;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
transition: height 0.3s ease;
}
/* 编辑器容器 - 禁止纵向滚动 */
.editorjs-codeFlask_Editor {
position: relative;
min-height: 100px;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
transition: height 0.3s ease;
}
/* 底部按钮容器 - 优化为更简洁的样式 */
.editorjs-codeFlask_BottomButtonContainer {
display: flex;
justify-content: center;
align-items: center;
padding: 4px;
background-color: #f8f9fa;
border-top: 1px solid #e9ecef;
position: relative;
z-index: 0;
}
/* 底部横向折叠/展开按钮 - 优化样式,使其更融入设计 */
.editorjs-codeFlask_BottomToggle {
width: 100%;
background-color: transparent;
color: #606266;
border: none;
border-radius: 4px;
padding: 6px 12px;
font-size: 12px;
font-weight: 400;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
text-align: center;
position: relative;
}
.editorjs-codeFlask_BottomToggle:hover {
background-color: #e9ecef;
color: #409eff;
}
.editorjs-codeFlask_BottomToggle:active {
background-color: #dee2e6;
}
.editorjs-codeFlask_BottomToggle .toggle-icon {
font-size: 11px;
transition: transform 0.3s ease;
}
/* 展开按钮(显示"展开"文本)上边缘添加渐变虚化效果 */
.editorjs-codeFlask_BottomToggle:has(span.toggle-icon:contains("▲"))::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 6px;
background: linear-gradient(to bottom, rgba(248, 249, 250, 0) 0%, rgba(248, 249, 250, 1) 100%);
pointer-events: none;
}
/* 展开按钮(显示"展开"文本)上边缘添加渐变虚化效果 */
/* 删除不被广泛支持的:contains()选择器 */
.editorjs-codeFlask_BottomToggle.expand-mode::before {
content: '';
position: absolute;
top: -60px;
left: 0;
right: 0;
height: 60px;
background: linear-gradient(to bottom, rgb(255 255 255 / 0%) 0%, rgba(248, 249, 250, 1) 100%);
pointer-events: none;
}
/* CodeFlask 主容器样式 */
.editorjs-codeFlask_Editor .codeflask {
position: relative;
background: #fafafa;
border-radius: 0 0 4px 4px;
min-height: 100px;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}
/* 行号容器 */
.editorjs-codeFlask_Editor .codeflask.codeflask--has-line-numbers:before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 40px;
background-color: #f5f5f5;
border-right: 1px solid #e0e0e0;
z-index: 0;
}
/* 行号 */
.editorjs-codeFlask_Editor .codeflask__lines {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 40px;
padding: 10px 0;
background-color: #f5f5f5;
border-right: 1px solid #e0e0e0;
z-index: 0;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 21px;
color: #666;
text-align: right;
user-select: none;
overflow: hidden;
}
.editorjs-codeFlask_Editor .codeflask__lines__line {
padding-right: 8px;
}
/* 文本区域 - 输入框 */
.editorjs-codeFlask_Editor .codeflask__textarea {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 10px;
border: none;
background: transparent;
color: transparent;
caret-color: #333;
resize: none;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 21px;
z-index: 1;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
white-space: pre-wrap; /* 自动换行 */
tab-size: 4;
outline: none;
}
/* 添加选中文本样式 */
.editorjs-codeFlask_Editor .codeflask__textarea::selection {
background-color: #b3d4fc;
color: #333;
}
.editorjs-codeFlask_Editor .codeflask__textarea::-moz-selection {
background-color: #b3d4fc;
color: #333;
}
/* 代码预览区域 */
.editorjs-codeFlask_Editor .codeflask__pre {
position: absolute;
top: 0;
left: 0;
width: 100%; /* 确保宽度不超出容器 */
height: 100%;
padding: 10px;
margin: 0;
border: none;
background: transparent;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 21px;
z-index: 0;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
white-space: pre-wrap; /* 自动换行 */
pointer-events: none;
}
/* 代码高亮区域 */
.editorjs-codeFlask_Editor .codeflask__code {
display: block;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 21px;
color: #333;
white-space: pre-wrap; /* 自动换行 */
tab-size: 4;
overflow: visible;
}
/* 语法高亮样式 - 确保Prism.js样式正确应用 */
.editorjs-codeFlask_Editor .codeflask__code {
background: transparent !important;
}
/* 通用语法高亮token样式 */
.editorjs-codeFlask_Editor .token.comment,
.editorjs-codeFlask_Editor .token.prolog,
.editorjs-codeFlask_Editor .token.doctype,
.editorjs-codeFlask_Editor .token.cdata {
color: #708090;
}
.editorjs-codeFlask_Editor .token.punctuation {
color: #999;
}
.editorjs-codeFlask_Editor .token.namespace {
opacity: 0.7;
}
.editorjs-codeFlask_Editor .token.property,
.editorjs-codeFlask_Editor .token.tag,
.editorjs-codeFlask_Editor .token.boolean,
.editorjs-codeFlask_Editor .token.number,
.editorjs-codeFlask_Editor .token.constant,
.editorjs-codeFlask_Editor .token.symbol,
.editorjs-codeFlask_Editor .token.deleted {
color: #905;
}
.editorjs-codeFlask_Editor .token.selector,
.editorjs-codeFlask_Editor .token.attr-name,
.editorjs-codeFlask_Editor .token.string,
.editorjs-codeFlask_Editor .token.char,
.editorjs-codeFlask_Editor .token.builtin,
.editorjs-codeFlask_Editor .token.inserted {
color: #690;
}
.editorjs-codeFlask_Editor .token.operator,
.editorjs-codeFlask_Editor .token.entity,
.editorjs-codeFlask_Editor .token.url,
.editorjs-codeFlask_Editor .language-css .token.string,
.editorjs-codeFlask_Editor .style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, 0.5);
}
.editorjs-codeFlask_Editor .token.atrule,
.editorjs-codeFlask_Editor .token.attr-value,
.editorjs-codeFlask_Editor .token.keyword {
color: #07a;
}
.editorjs-codeFlask_Editor .token.function,
.editorjs-codeFlask_Editor .token.class-name {
color: #dd4a68;
}
.editorjs-codeFlask_Editor .token.regex,
.editorjs-codeFlask_Editor .token.important,
.editorjs-codeFlask_Editor .token.variable {
color: #e90;
}
/* 复制按钮样式 */
.editorjs-codeFlask_CopyButton {
background-color: #409eff;
color: white;
border: none;
border-radius: 3px;
padding: 6px 12px;
margin-right: 8px;
font-size: 12px;
cursor: pointer;
transition: background-color 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
min-width: 28px;
height: 28px;
}
.editorjs-codeFlask_CopyButton:hover {
background-color: #66b1ff;
}
.editorjs-codeFlask_CopyButton.copied {
background-color: #67c23a;
}
/* 折叠/展开按钮样式 */
.editorjs-codeFlask_Toggle {
background-color: #909399;
color: white;
border: none;
border-radius: 3px;
padding: 0 8px;
font-size: 12px;
cursor: pointer;
transition: background-color 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
min-width: 28px;
height: 28px;
font-weight: bold;
}
.editorjs-codeFlask_Toggle:hover {
background-color: #a6a9ad;
}
/* 响应式调整 */
@media (max-width: 768px) {
.editorjs-codeFlask_Header {
padding: 6px 8px;
}
.editorjs-codeFlask_Editor .codeflask__textarea,
.editorjs-codeFlask_Editor .codeflask__pre,
.editorjs-codeFlask_Editor .codeflask__code {
font-size: 13px;
line-height: 19px;
padding: 8px;
}
.editorjs-codeFlask_Editor .codeflask.codeflask--has-line-numbers:before {
width: 35px;
}
.editorjs-codeFlask_Editor .codeflask__lines {
width: 35px;
font-size: 12px;
}
}
/* 滚动条样式 - 完全隐藏纵向滚动条 */
.editorjs-codeFlask_Wrapper ::-webkit-scrollbar {
width: 0;/* 纵向滚动条宽度为0 */
height: 6px;/* 横向滚动条保持6px宽度 */
}
.editorjs-codeFlask_Wrapper ::-webkit-scrollbar-track {
background: transparent;
border-radius: 0;
}
.editorjs-codeFlask_Wrapper ::-webkit-scrollbar-thumb {
background: transparent;
border-radius: 0;
}
/* Firefox 滚动条隐藏 */
.editorjs-codeFlask_Wrapper {
scrollbar-width: none;/* Firefox 隐藏纵向滚动条 */
}
.editorjs-codeFlask_Wrapper ::-moz-scrollbar {
width: 0;
height: 6px;
}
/* 焦点状态 */
.editorjs-codeFlask_Wrapper:focus-within {
border-color: #409eff;
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}
/* 只读模式样式 */
.editorjs-codeFlask_Wrapper.readonly .editorjs-codeFlask_Header {
background-color: #f5f7fa;
}
.editorjs-codeFlask_Wrapper.readonly .editorjs-codeFlask_Editor .codeflask__textarea {
cursor: default;
}
/* 确保所有元素正确显示 */
.editorjs-codeFlask_Wrapper * {
box-sizing: border-box;
}
/* 修复行号对齐 */
.editorjs-codeFlask_Editor .codeflask--has-line-numbers .codeflask__textarea,
.editorjs-codeFlask_Editor .codeflask--has-line-numbers .codeflask__pre {
padding-left: 50px;
}
.editorjs-codeFlask_Editor .codeflask--has-line-numbers .codeflask__lines {
padding-top: 10px;
}
/* 语言显示元素 - 添加点击样式 */
.editorjs-codeFlask_LangDisplay {
padding: 2px 8px;
background-color: #409eff;
color: white;
border-radius: 3px;
font-size: 12px;
font-weight: 500;
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
transition: all 0.2s ease;
}
.editorjs-codeFlask_LangDisplay:hover {
background-color: #66b1ff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* 语言选择弹窗 */
.editorjs-codeFlask_LanguagePopup {
background-color: white;
border: 1px solid #dcdfe6;
border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
width: 250px;
max-height: 300px;
z-index: 1000;
overflow: hidden;
}
/* 搜索框 */
.editorjs-codeFlask_LanguageSearch {
width: 100%;
padding: 8px 12px;
border: none;
border-bottom: 1px solid #ebeef5;
font-size: 12px;
outline: none;
box-sizing: border-box;
}
/* 语言列表 */
.editorjs-codeFlask_LanguagesList {
max-height: 250px;
overflow-y: auto;
}
/* 语言选项 */
.editorjs-codeFlask_LanguageItem {
padding: 8px 12px;
font-size: 12px;
cursor: pointer;
transition: background-color 0.2s ease;
}
.editorjs-codeFlask_LanguageItem:hover {
background-color: #f5f7fa;
}
.editorjs-codeFlask_LanguageItem.selected {
background-color: #ecf5ff;
color: #409eff;
font-weight: 500;
}
/* 滚动条样式 */
.editorjs-codeFlask_LanguagesList::-webkit-scrollbar {
width: 6px;
}
.editorjs-codeFlask_LanguagesList::-webkit-scrollbar-track {
background-color: #f5f7fa;
}
.editorjs-codeFlask_LanguagesList::-webkit-scrollbar-thumb {
background-color: #c0c4cc;
border-radius: 3px;
}
.editorjs-codeFlask_LanguagesList::-webkit-scrollbar-thumb:hover {
background-color: #909399;
}
</style><style type="text/css">
.inline-code {
background: rgba(250, 239, 240, 0.78);
color: #b44437;
padding: 3px 4px;
border-radius: 5px;
margin: 0 1px;
font-family: inherit;
font-size: 0.86em;
font-weight: 500;
letter-spacing: 0.3px;
}
</style>
页:
[1]