小编Nor*_*des的帖子

添加现有CustomProperty不会更新文档

我实际上使用库" DocX "从.Net生成Word文档(2007+).好处是它可以使用"docx"模板来重新创建或更新文档.

问题:当我" AddCustomProperty(...) "时,它不会更新word文档.我实际上需要打开它,然后选择所有并按F9.我想知道是否有办法使用DocX库自动更新"自定义属性".

要重现我的问题,您可以执行以下步骤:

  1. 打开DocX项目上提供的"示例".
  2. 运行一次(它将在debug\docs中创建文件)
  3. 打开发票模板,然后添加一行(带或不带文本)并保存文件
  4. 重新运行相同的示例项目(它将使用现有模板)
  5. 打开发票结果.执行此操作时,您可以看到表已创建,但是,在您选择全部然后再按CTRL + F9之前,所有其他字段尚未更新

如果有人有解决方案,我很乐意听听.

(注意:我不希望MS Word互操作)

项目和样品可在以下网址获得:http://docx.codeplex.com/

.net c# docx

6
推荐指数
1
解决办法
1838
查看次数

当我们将div显示为可见时,隐藏div中的TinyMCE不会显示为已启用

我遇到了tinyMCE(WYSIWYG编辑器)的问题.我实际上是在像DIV这样的HTML元素中添加textarea,它当前具有样式属性"display:none".

当我将DIV显示样式更改为可见时,tinyMCE编辑器显示为已禁用.

重要说明:导致问题的设置是"auto_resize"选项.这是我打开/关闭的唯一选项,使tinyMCE编辑器进入编辑或只读模式.

这是我的代码:

tinyMCE.init({
    mode: "specific_textareas",
                editor_selector: /(RichTextArea)/, 
                theme: "advanced",
                auto_reset_designmode: true,
                auto_resize:true,
                theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,fontselect,fontsizeselect,|,forecolor,backcolor,|,bullist,numlist,|,justifyleft,justifycenter,justifyright,justifyfull",
                theme_advanced_buttons2: "",
                theme_advanced_buttons3: "",
                theme_advanced_buttons4: "",
                theme_advanced_more_colors: 0,
                theme_advanced_toolbar_location: "external",
                theme_advanced_toolbar_align: "left"
});
Run Code Online (Sandbox Code Playgroud)

...

<a href="#" onclick='document.getElementById("myHiddenDiv").style.display = "block"; return false;'>Show WYSIWYG</a><br/>
<div id="myHiddenDiv" style="display:none">
    <!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
    <textarea class="RichTextArea" id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
        &lt;p&gt;This is the first paragraph.&lt;/p&gt;
        &lt;p&gt;This is the second paragraph.&lt;/p&gt;
        &lt;p&gt;This is the third paragraph.&lt;/p&gt;
    </textarea>
</div> …
Run Code Online (Sandbox Code Playgroud)

javascript tinymce

5
推荐指数
1
解决办法
8809
查看次数

Silverlight 4 RichTextBox使用DataContext绑定数据

我正在使用Silverlight 4并尝试将我的测试应用程序设置为多语言,但是当我到达"RichTextBox"控件时我遇到了一些麻烦.我可以通过执行反向代码(c#)来正确绑定它,但是当尝试使用"DataContext"属性时,我根本无法加载它.

我创建了一个FormatConverter,它返回一个用于测试的Block(段落)和我的RichTextBox看起来像我的代码:

   <RichTextBox x:Name="rtaTest" BorderThickness="0" IsReadOnly="True" UseLayoutRounding="True" 
DataContext="{Binding Source={StaticResource Localization}, Path=Home.MainContent, Converter={StaticResource ParagraphFormatConverter}}">
    </RichTextBox>
Run Code Online (Sandbox Code Playgroud)

我想知道是否有一种方法从XAML绑定RichTextBox.

silverlight richtextbox silverlight-4.0

2
推荐指数
1
解决办法
1万
查看次数